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

@ -51,7 +51,7 @@
<div class="statement-container disclaimer">
<strong class="big">
<svg viewBox="0 0 16 16" fill="currentColor" height="16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="M7.906.094C7.38.066 6.867.375 6.47 1.063L.219 12.656C-.316 13.621.266 15 1.313 15h13.156c.98 0 1.902-1.16 1.219-2.344L9.375 1.125C8.977.48 8.434.121 7.906.094M9 4v5c.008.527-.473 1-1 1s-1.008-.473-1-1V4zm-1 7c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m0 0"/></svg>
Disclaimer(s)
Disclaimer
</strong>
{{ page.extra.disclaimer | markdown | safe }}
</div>

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>