From 7df26217f80d11101d1b23e2cc77953c24165857 Mon Sep 17 00:00:00 2001 From: daudix Date: Sat, 14 Sep 2024 04:02:11 +0300 Subject: [PATCH] Turn "Feed" button to a dropdown if multiple feeds are avaiable (fixes #72) --- CHANGELOG.md | 2 ++ templates/partials/head.html | 2 +- templates/partials/nav.html | 23 ++++++++++++++++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b18197c..34da41a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add active state to footer's "Powered by" links. - Add active state to footnotes' go back button. - Add active state to slider thumb. +- Add Bahasa Melayu translation (#78). - Add fading on top/bottom of the search results container. - Add loading animation to "Load Comments" button. - Add margin between comment author name and timestamp. @@ -26,6 +27,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add zoom-on-hover to custom comment emojis. - Return the scrollbar styling. - Style mentions and hashtags in comments. +- Turn "Feed" button to a dropdown if multiple feeds are avaiable (#72). ### Changed diff --git a/templates/partials/head.html b/templates/partials/head.html index 46b15cc..a5b6ee0 100644 --- a/templates/partials/head.html +++ b/templates/partials/head.html @@ -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 %} diff --git a/templates/partials/nav.html b/templates/partials/nav.html index 2180153..e911980 100644 --- a/templates/partials/nav.html +++ b/templates/partials/nav.html @@ -105,7 +105,28 @@ {%- endif %} - {%- if config.generate_feeds and config.extra.nav.show_feed %} + {%- if config.feed_filenames | length > 1 and config.extra.nav.show_feed -%} +
  • +
    + + + + +
    +
  • + {%- elif config.generate_feeds and config.extra.nav.show_feed %}