summaryrefslogtreecommitdiffstats
path: root/src/themes/serene/templates/_footer.html
diff options
context:
space:
mode:
Diffstat (limited to 'src/themes/serene/templates/_footer.html')
-rw-r--r--src/themes/serene/templates/_footer.html24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/themes/serene/templates/_footer.html b/src/themes/serene/templates/_footer.html
index e9c1dd1..78d62c8 100644
--- a/src/themes/serene/templates/_footer.html
+++ b/src/themes/serene/templates/_footer.html
@@ -1,5 +1,10 @@
-{% if config.extra.blog_section_path is defined %}
-{% set blog_section_path = config.extra.blog_section_path %}
+{% set show_rss = false %}
+{% if section is defined and section.generate_feeds %}
+ {% set rss_path = section.path ~ config.feed_filenames[0] %}
+ {% set show_rss = true %}
+{% elif config.generate_feeds %}
+ {% set rss_path = "/" ~ config.feed_filenames[0] %}
+ {% set show_rss = true %}
{% endif %}
<footer>
<div class="left">
@@ -13,18 +18,11 @@
</div>
<div class="right">
- {% if blog_section_path is defined and section.path is starting_with(blog_section_path) %}
- {% if section.generate_feeds %}
- {% set_global rss_path = blog_section_path ~ "/" ~ config.feed_filenames.0 %}
- {% elif config.generate_feeds %}
- {% set_global rss_path = "/" ~ config.feed_filenames.0 %}
- {% endif %}
- {% if section.generate_feeds or config.generate_feeds %}
+ {% if show_rss %}
<a id="rss-btn" href="{{ get_url(path=rss_path) }}">RSS</a>
{% endif %}
- {% endif %}
- {% if not config.extra.force_theme %}
+ {% if color_scheme == "auto" %}
{% set moon_icon = load_data(path="icon/moon.svg") %}
{% set sun_icon = load_data(path="icon/sun.svg") %}
<button id="theme-toggle" aria-label="theme switch">
@@ -35,8 +33,7 @@
</div>
</footer>
-{% if blog_section_path is defined and section.path is starting_with(blog_section_path) %}
-{% if section.generate_feeds or config.generate_feeds %}
+{% if show_rss %}
{% set link = get_url(path=rss_path) %}
<dialog id="rss-mask">
<div>
@@ -49,4 +46,3 @@
</div>
</dialog>
{% endif %}
-{% endif %}