✨ feat(footer): add configurable copyright notice (#112)
This commit is contained in:
@@ -50,17 +50,25 @@
|
||||
{% endif %}
|
||||
</nav>
|
||||
<div class="credits">
|
||||
{# Shows "Powered by Zola & tabi" #}
|
||||
{# Shows link to remote repository if repository is set and `show_remote_source` is not false #}
|
||||
{% set show_source = config.extra.show_remote_source | default(value=true) %}
|
||||
<small>
|
||||
{# Shows optional Copyright notice #}
|
||||
{%- if config.extra.copyright -%}
|
||||
{% set current_year = now() | date(format="%Y") %}
|
||||
{# Translate the copyright if set in the config #}
|
||||
{%- if config.extra.translate_copyright and lang != config.default_language -%}
|
||||
<p>{{ trans(key="copyright", lang=lang) | replace(from="$CURRENT_YEAR", to=current_year) | markdown | safe }}</p>
|
||||
{%- else -%}
|
||||
<p>{{ config.extra.copyright | replace(from="$CURRENT_YEAR", to=current_year) | markdown | safe }}</p>
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
|
||||
{# Shows "Powered by Zola & tabi" notice #}
|
||||
{%- if lang != config.default_language -%}
|
||||
{{ trans(key="powered_by" | safe, lang=lang) }}
|
||||
{%- else -%}
|
||||
Powered by
|
||||
{%- endif -%}
|
||||
<a href="https://www.getzola.org" target="_blank">Zola</a>
|
||||
|
||||
{%- if lang != config.default_language -%}
|
||||
{{ trans(key="and" | safe, lang=lang) }}
|
||||
{%- else -%}
|
||||
@@ -68,6 +76,8 @@
|
||||
{%- endif -%}
|
||||
<a href="https://github.com/welpo/tabi" target="_blank">tabi</a>
|
||||
|
||||
{# Shows link to remote repository if repository is set and `show_remote_source` is not false #}
|
||||
{% set show_source = config.extra.show_remote_source | default(value=true) %}
|
||||
{%- if config.extra.remote_repository_url and show_source -%}
|
||||
{{ separator }}
|
||||
<a href="{{ config.extra.remote_repository_url }}" target="_blank">
|
||||
|
Reference in New Issue
Block a user