summaryrefslogtreecommitdiff
path: root/sysret.org/themes/tabi-lean/templates/series.html
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2025-09-13 15:01:06 -0600
committerAlejandro Soto <alejandro@34project.org>2025-09-13 15:01:06 -0600
commitf4fcda54638685899c730b3fa90a87d80d6dbef5 (patch)
tree0737e627cce304c3a9c4e757bc5f6571a7456091 /sysret.org/themes/tabi-lean/templates/series.html
parentd8b9cf1f61cc07d625f1c37ccc28adfd58918416 (diff)
parent2c13119932765c6d788f08fb53abc244407c0d80 (diff)
Merge commit '6a7d3111b31e73fc66af5360149d41f690fbcaa4'
Diffstat (limited to 'sysret.org/themes/tabi-lean/templates/series.html')
-rw-r--r--sysret.org/themes/tabi-lean/templates/series.html62
1 files changed, 62 insertions, 0 deletions
diff --git a/sysret.org/themes/tabi-lean/templates/series.html b/sysret.org/themes/tabi-lean/templates/series.html
new file mode 100644
index 0000000..5a4cc0c
--- /dev/null
+++ b/sysret.org/themes/tabi-lean/templates/series.html
@@ -0,0 +1,62 @@
+{% extends "base.html" %}
+
+{% block main_content %}
+
+{# Throw an error if the section is not flagged as a series. #}
+{# This page would be displayed properly but it would become impossible for the series' child pages to reference their series. #}
+{%- if "series" not in section.extra or not section.extra.series -%}
+ {{ throw(message="Section is not flagged as a series. Set `section.extra.series` to `true` if you want to use `series.html` template.") }}
+{%- endif -%}
+
+<main>
+{%- if section.extra.header %}
+ {%- include "partials/home_banner.html" -%}
+{% endif -%}
+
+ {%- set show_jump = false -%}
+ {%- set show_jump_hierarchy = macros_settings::evaluate_setting_priority(setting="show_jump_to_posts", page=section) -%}
+ {%- if show_jump_hierarchy == "true" -%}
+ {%- set show_jump = true -%}
+ {%- elif show_jump_hierarchy != "false" -%}
+ {#- Default to true if the content is long and var is unset #}
+ {%- if section.content | length > 2000 -%}
+ {%- set show_jump = true -%}
+ {%- endif -%}
+ {%- endif -%}
+
+ {%- if show_jump -%}
+ <div class="title-with-jump bottom-divider">
+ <h1 class="title-container section-title">{{ section.title }}</h1>
+ <a href="#posts-list" class="jump-link">{{ macros_translate::translate(key="jump_to_posts", default="Jump to posts", language_strings=language_strings) }} ↓</a>
+ </div>
+ {%- else -%}
+ {{ macros_page_header::page_header(title=section.title) }}
+ {%- endif -%}
+
+ <section class="body">
+ {{ section.content | safe }}
+ </section>
+
+ <div id="posts-list">
+ <h2 class="bottom-divider">
+ {{ macros_translate::translate(key="all_posts", default="All posts", language_strings=language_strings) }}
+ </h2>
+ {%- if paginator %}
+ {%- set pages = paginator.pages -%}
+ {% else %}
+ {%- set pages = section.pages -%}
+ {% endif -%}
+
+ {% set max_posts = section.extra.max_posts | default(value=999999) %}
+ {{ macros_list_posts::list_posts(posts=pages, max=max_posts, metadata="indexes", language_strings=language_strings, section_path=section.path, paginator=paginator | default(value="")) }}
+ </div>
+
+ {% if paginator %}
+ {%- include "partials/paginate.html" -%}
+ {% endif %}
+
+</main>
+
+{%- include "partials/extra_features.html" -%}
+
+{% endblock main_content %}