Turn "Feed" button to a dropdown if multiple feeds are avaiable (fixes #72)
This commit is contained in:
@ -130,7 +130,7 @@
|
||||
{%- set scripts = scripts | concat(with=["theme-switcher.js"]) %}
|
||||
{%- endif %}
|
||||
|
||||
{%- if config.extra.nav.links.menu or config.languages | length > 0 or config.extra.nav.show_theme_switcher %}
|
||||
{%- if config.extra.nav.links.menu or config.languages | length > 0 or config.extra.nav.show_theme_switcher or config.feed_filenames | length > 1 and config.extra.nav.show_feed %}
|
||||
{%- set scripts = scripts | concat(with=["details.js"]) %}
|
||||
{%- endif %}
|
||||
|
||||
|
@ -105,7 +105,28 @@
|
||||
</details>
|
||||
</li>
|
||||
{%- endif %}
|
||||
{%- if config.generate_feeds and config.extra.nav.show_feed %}
|
||||
{%- if config.feed_filenames | length > 1 and config.extra.nav.show_feed -%}
|
||||
<li id="feed">
|
||||
<details>
|
||||
<summary class="circle" title="{{ macros_translate::translate(key='feed', default='Feed', language_strings=language_strings) }}">
|
||||
<i class="icon"></i>
|
||||
</summary>
|
||||
<ul>
|
||||
{%- for feed in config.feed_filenames %}
|
||||
<li>
|
||||
<a href="{{ get_url(path=feed, lang=lang) }}" rel="{{ rel_attributes }}">
|
||||
{%- if feed == "rss.xml" -%}
|
||||
RSS
|
||||
{%- elif feed == "atom.xml" -%}
|
||||
Atom
|
||||
{%- endif -%}
|
||||
</a>
|
||||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
</details>
|
||||
</li>
|
||||
{%- elif config.generate_feeds and config.extra.nav.show_feed %}
|
||||
<li id="feed">
|
||||
<a class="circle" href="{{ get_url(path=config.feed_filenames[0], lang=lang) }}" title="{{ macros_translate::translate(key='feed', default='Feed', language_strings=language_strings) }}">
|
||||
<i class="icon"></i>
|
||||
|
Reference in New Issue
Block a user