aboutsummaryrefslogtreecommitdiff
path: root/templates/base.html
diff options
context:
space:
mode:
authorClayton Craft2022-04-17 15:19:06 -0700
committerJieiku2022-05-30 22:20:18 -0700
commit04b9162a2698dc2bbd0bfecc7cb9cebcaeaf30e8 (patch)
treef9eeea5577870c185ec27d6a5bdbe9c122a642a1 /templates/base.html
parent2c6fd450834a1452ef2c5436aa27d90f12f5a7f0 (diff)
downloadabridge-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.html8
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 &copy; 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 &copy; {{ 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> &nbsp; {% endfor %}</p>
{# Optional footer credit #}
{% if config.extra.footer_credit %}