Rewrite footer to support links and socials, tweak heading sizes, deprecate page/site links and replace with "external" class, change discalimer heading from plural to singular

This commit is contained in:
David Lapshin
2024-05-02 17:58:27 +03:00
parent af84b56ede
commit 8aa03d03fa
7 changed files with 142 additions and 27 deletions

View File

@ -1,20 +1,54 @@
<footer id="site-footer">
{% if config.extra.footer.links %}
<nav>
<ul id="links">
{% for link in config.extra.footer.links %}
{%- if link.url is matching('https?://') %}
<li>
<a href="{{ link.url | safe }}">{{ link.name }}</a>
</li>
{%- else %}
<li>
<a href="{{ get_url(path=link.url | safe )}}">{{ link.name }}</a>
</li>
{%- endif %}
{% endfor %}
</ul>
</nav>
{% endif %}
{% if config.extra.footer.show_copyright %}
<p title="Last built at {{ now() | date(format='%F %a %R') }}">&copy; {{ config.title }}, {{ now() | date(format="%Y") }}</p>
{% endif %}
{% if config.extra.footer.show_source %}
<p><a href="{{ config.extra.source_url | safe }}">Website source</a></p>
<p>
<a href="{{ config.extra.source_url | safe }}">Website source</a>
</p>
{% endif %}
{% if config.extra.footer.show_powered_by %}
<p><small>Powered by <a href="https://www.getzola.org">Zola</a> and <a href="https://daudix.codeberg.page/duckquill">Duckquill</a></small></p>
<p>
<small>
Powered by <a href="https://www.getzola.org">Zola</a> and <a href="https://daudix.codeberg.page/duckquill">Duckquill</a>
</small>
</p>
{% endif %}
{% if config.extra.footer.show_johnvert %}
<details>
<summary>Johnvertisement</summary>
<iframe id="johnvertisement" title="Johnvertisement" src="https://john.citrons.xyz/embed?ref={{ config.extra.footer.johnvert_ref }}"></iframe>
<iframe id="johnvertisement" src="https://john.citrons.xyz/embed?ref={{ config.extra.footer.johnvert_ref }}" title="Johnvertisement"></iframe>
</details>
{% endif %}
</footer>
{% if config.extra.footer.socials %}
<ul id="socials">
{% for link in config.extra.footer.socials %}
<li>
<a style='mask-image: url("data:image/svg+xml,{{ link.icon }}"); -webkit-mask-image: url("data:image/svg+xml,{{ link.icon }}")' href="{{ link.url | safe }}" rel="me" title="{{ link.name }}"><span>{{ link.name }}</span></a>
</li>
{% endfor %}
</ul>
{% endif %}
</footer>