diff options
| author | Clayton Craft | 2022-04-17 15:19:06 -0700 |
|---|---|---|
| committer | Jieiku | 2022-05-30 22:20:18 -0700 |
| commit | 04b9162a2698dc2bbd0bfecc7cb9cebcaeaf30e8 (patch) | |
| tree | f9eeea5577870c185ec27d6a5bdbe9c122a642a1 /templates/base.html | |
| parent | 2c6fd450834a1452ef2c5436aa27d90f12f5a7f0 (diff) | |
| download | abridge-04b9162a2698dc2bbd0bfecc7cb9cebcaeaf30e8.tar.gz abridge-04b9162a2698dc2bbd0bfecc7cb9cebcaeaf30e8.tar.bz2 abridge-04b9162a2698dc2bbd0bfecc7cb9cebcaeaf30e8.zip | |
base: add options to set copyright start/end years
start_year and end_year are both optional. If start_year is unset, then
it's omitted from what is generated, so it'll be something like
"Copyright (c) 2022". if end_year is unset, then it defaults to the
current year.
fixes #4
Diffstat (limited to 'templates/base.html')
| -rw-r--r-- | templates/base.html | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/templates/base.html b/templates/base.html index 7f6f95f..0e826da 100644 --- a/templates/base.html +++ b/templates/base.html @@ -120,7 +120,13 @@ <hr> <center> <p>{{ social_macros::social_links(social_config=config.extra.social) }}</p> - {# Copyright #}<p>Copyright © 2019-{{ now() | date(format="%Y") }} {{ config.title }}</p> + + {# Copyright #} + {% set start_year=config.extra.start_year | default(value="") %} + {% if start_year %}{% set start_year=start_year ~ "-" %}{% endif %} + {% set end_year=config.extra.end_year | default(value=now() | date(format="%Y")) %} + <p>Copyright © {{ start_year ~ end_year}} {{ config.title }}</p> + <p>{% for i in config.extra.menu_footer %}<a href="{{ get_url(path=i.url, trailing_slash=i.slash) }}">{{ i.name }}</a> {% endfor %}</p> {# Optional footer credit #} {% if config.extra.footer_credit %} |
