46 lines
2.3 KiB
HTML
46 lines
2.3 KiB
HTML
|
|
<!-- Footer -->
|
||
|
|
<footer class="mx-auto flex lg:mt-5 max-w-3xl flex-wrap items-center px-4 py-3 text-sm opacity-60">
|
||
|
|
<div class="mr-auto basis-full lg:basis-1/2">
|
||
|
|
{%- set lang_base_url = get_url(path=``, lang=lang) %}
|
||
|
|
{%- if config.extra.footer.copyright %}
|
||
|
|
{%- set copyright = config.extra.footer.copyright | replace(from=`$BASE_URL`, to=lang_base_url) %}
|
||
|
|
{%- if config.extra.footer.license_url %}
|
||
|
|
{%- set license_url = m_url::rel(there=m_url::get(url=config.extra.footer.license_url), here=g_here, base=g_base) %}
|
||
|
|
{%- set copyright = copyright | replace(from=`$LICENSE_URL`, to=license_url) %}
|
||
|
|
{%- endif %}
|
||
|
|
{%- else %}
|
||
|
|
{%- if config.author %}
|
||
|
|
{%- set author_name = m_profiles::get_name(username=config.author) %}
|
||
|
|
{%- set copyright = "© $YEAR " ~ author_name %}
|
||
|
|
{%- else %}
|
||
|
|
{%- set copyright = "© $YEAR" %}
|
||
|
|
{%- endif %}
|
||
|
|
{%- if config.extra.footer.license_url %}
|
||
|
|
{%- set license_url = m_url::rel(there=m_url::get(url=config.extra.footer.license_url), here=g_here, base=g_base) %}
|
||
|
|
{%- set copyright = '[' ~ copyright ~ '](' ~ license_url ~ ')' %}
|
||
|
|
{%- endif %}
|
||
|
|
{%- endif %}
|
||
|
|
{%- set current_year = now() | date(format=`%Y`) | int %}
|
||
|
|
{%- if config.extra.footer.since and config.extra.footer.since != current_year %}
|
||
|
|
{%- set copyright_years = '<time datetime="' ~ config.extra.footer.since ~ '">' ~
|
||
|
|
config.extra.footer.since ~ '</time> - <time datetime="' ~ current_year ~ '">' ~
|
||
|
|
current_year ~ '</time>' %}
|
||
|
|
{%- else %}
|
||
|
|
{%- set copyright_years = '<time datetime="' ~ current_year ~ '">' ~ current_year ~ '</time>' %}
|
||
|
|
{%- endif %}
|
||
|
|
{%- set copyright = copyright | replace(from=`$YEAR`, to=copyright_years) %}
|
||
|
|
{{ copyright | markdown(inline=true) | safe }}
|
||
|
|
</div>
|
||
|
|
<div class="flex basis-full lg:basis-1/2 lg:justify-end">
|
||
|
|
<span class="mr-6 lg:ml-6">
|
||
|
|
<a class="link" href="https://www.getzola.org/" target="_blank">{{
|
||
|
|
m_i18n::tr(key=`footer_powered_by`, lk=g_lang_k, d=g_trans_d) }}</a>
|
||
|
|
</span>
|
||
|
|
<a class="link" href="https://www.getzola.org/themes/linkita/" target="_blank">✎ {{
|
||
|
|
m_i18n::tr(key=`footer_theme_name`, lk=g_lang_k, d=g_trans_d) }}</a>
|
||
|
|
</div>
|
||
|
|
<!-- Begin Footer inject -->
|
||
|
|
{% include "injects/footer.html" ignore missing %}
|
||
|
|
<!-- End Footer inject -->
|
||
|
|
</footer>
|