From 211d08f9804c70943d7395175f25096483f006d0 Mon Sep 17 00:00:00 2001 From: Jieiku Date: Sat, 19 Aug 2023 10:39:52 -0700 Subject: Version 2.0.0 Refactor, Add PWA Support --- templates/base.html | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'templates/base.html') diff --git a/templates/base.html b/templates/base.html index 228b396..db58b72 100644 --- a/templates/base.html +++ b/templates/base.html @@ -27,9 +27,10 @@ {{- macros_head::security(config=config) }} {{- macros_head::favicons(config=config) }} - + {{- macros_head::pwa(config=config) }} {%- block comments_init %} {%- endblock comments_init %} +
{%- block header %} @@ -120,16 +121,22 @@ {{- social_macros::social_links(config=config) }} {#- Copyright START #} - {%- set copyright_start_string=config.extra.copyright_start_string | default(value="©") %} - {%- if copyright_start_string %}{%- set copyright_start_string=copyright_start_string ~ " " %}{%- endif %} - {%- set copyright_start_year=config.extra.copyright_start_year | default(value="") %} - {%- if copyright_start_year %}{%- set copyright_start_year=copyright_start_year ~ "-" %}{%- endif %} - {%- set copyright_end_year=config.extra.copyright_end_year | default(value=now() | date(format="%Y")) %} - {%- if config.extra.copyright_entity %}{%- set copyright_entity= " " ~ config.extra.copyright_entity %}{%- else %}{%- set copyright_entity= " " ~ config.title %}{%- endif %} - {%- set copyright_end_string=config.extra.copyright_end_string | default(value="") %} - {%- if copyright_end_string %}{%- set copyright_end_string= " " ~ copyright_end_string %}{%- endif %} - + {%- if config.extra.copyright | default(value=true) -%} + {%- set current_year = now() | date(format="%Y") %} + + {%- if config.extra.copyright_override -%} + {%- if lang != config.default_language %} + {%- set copyright_string = trans(key="copyright_override", lang=lang) | replace(from="$CURRENT_YEAR", to=current_year) | replace(from="$SITE_TITLE", to=config.title) %} + {% else %} + {%- set copyright_string = config.extra.copyright_override | replace(from="$CURRENT_YEAR", to=current_year) | replace(from="$SITE_TITLE", to=config.title) %} + {% endif -%} + {%- else -%} + {%- set copyright_string = "© " ~ current_year ~ " " ~ config.title %} + {%- endif %} + + {%- endif -%} {#- Copyright END #} + {%- if config.extra.menu_footer %}