forked from deepStateMirrors/tabi
🐛 fix: show feed icon without socials
Previously the feed icon would not display when it was the only configured "social" option, as the containing <ul> required either socials or email to be present. Fixes #456
This commit is contained in:
parent
28fe074ea0
commit
de6fa58fe3
1 changed files with 10 additions and 7 deletions
|
@ -8,17 +8,20 @@
|
||||||
{%- set blank_target = "" -%}
|
{%- set blank_target = "" -%}
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
|
||||||
|
{#- Feed icon -#}
|
||||||
|
{#- Zola 0.19.0 uses `generate_feeds`. Prior versions use `generate_feed` -#}
|
||||||
|
{%- set generate_feed = config.generate_feeds | default(value=config.generate_feed) -%}
|
||||||
|
{%- set feed_url = config.feed_filenames[0] | default(value=(config.feed_filename)) -%}
|
||||||
|
{%- set should_show_feed = generate_feed and config.extra.feed_icon and feed_url -%}
|
||||||
|
|
||||||
|
{%- set should_show_footer_icons = should_show_feed or config.extra.socials or config.extra.email -%}
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<section>
|
<section>
|
||||||
<nav class="socials nav-navs">
|
<nav class="socials nav-navs">
|
||||||
{%- if config.extra.socials or config.extra.email %}
|
{%- if should_show_footer_icons -%}
|
||||||
<ul>
|
<ul>
|
||||||
{# Feed icon #}
|
{%- if should_show_feed -%}
|
||||||
{# Zola 0.19.0 uses `generate_feeds`. Prior versions use `generate_feed` #}
|
|
||||||
{% set generate_feed = config.generate_feeds | default(value=config.generate_feed) %}
|
|
||||||
{% set feed_url = config.feed_filenames[0] | default(value=(config.feed_filename)) %}
|
|
||||||
|
|
||||||
{%- if generate_feed and config.extra.feed_icon and feed_url -%}
|
|
||||||
<li>
|
<li>
|
||||||
<a class="nav-links no-hover-padding social" rel="{{ rel_attributes }}" {{ blank_target }} href="{{ get_url(path=feed_url, lang=lang, trailing_slash=false) | safe }}">
|
<a class="nav-links no-hover-padding social" rel="{{ rel_attributes }}" {{ blank_target }} href="{{ get_url(path=feed_url, lang=lang, trailing_slash=false) | safe }}">
|
||||||
<img loading="lazy" alt="feed" title="feed" src="{{ get_url(path='/social_icons/rss.svg') }}">
|
<img loading="lazy" alt="feed" title="feed" src="{{ get_url(path='/social_icons/rss.svg') }}">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue