diff options
| author | Jieiku | 2023-08-19 10:39:52 -0700 |
|---|---|---|
| committer | Jieiku | 2023-08-19 10:39:52 -0700 |
| commit | 211d08f9804c70943d7395175f25096483f006d0 (patch) | |
| tree | c2c98891259fc353826b9346ee424101bb4c2e05 /templates/base.html | |
| parent | 3e5d8a96e9eae21a799f327cd8a52adb891ebe66 (diff) | |
| download | abridge-2.0.0.tar.gz abridge-2.0.0.tar.bz2 abridge-2.0.0.zip | |
Version 2.0.0 Refactor, Add PWA Support2.0.0
Diffstat (limited to 'templates/base.html')
| -rw-r--r-- | templates/base.html | 27 |
1 files changed, 17 insertions, 10 deletions
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 @@ <meta name="apple-mobile-web-app-status-bar-style" content="default" /> {{- macros_head::security(config=config) }} {{- macros_head::favicons(config=config) }} - <noscript><link rel="stylesheet" href="{{ get_url(path='nojs.css', trailing_slash=false) | safe }}" /></noscript> + {{- macros_head::pwa(config=config) }} {%- block comments_init %} {%- endblock comments_init %} + <noscript><link rel="stylesheet" href="{{ get_url(path='nojs.css', trailing_slash=false) | safe }}" /></noscript> </head> <body> {%- 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 %} - <p{%- if config.extra.footer_size %} class="{{ config.extra.footer_size }}"{% endif %}> {{ copyright_start_string ~ copyright_start_year ~ copyright_end_year ~ copyright_entity ~ copyright_end_string }}</p> + {%- 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 %} + <p{%- if config.extra.footer_size %} class="{{ config.extra.footer_size }}"{% endif %}> {{ copyright_string | safe }}</p> + {%- endif -%} {#- Copyright END #} + {%- if config.extra.menu_footer %} <nav> {%- for i in config.extra.menu_footer -%} |
