From 0b7c8ca989d59cd4171f59678c35595ca1b7ec98 Mon Sep 17 00:00:00 2001 From: object-Object Date: Sun, 16 Jul 2023 22:55:25 -0400 Subject: [PATCH] Entry --- doc/templates/category.html.jinja | 11 ++++------- doc/templates/entry.html.jinja | 10 ++++++++++ doc/templates/macros.html.jinja | 8 ++++++++ 3 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 doc/templates/entry.html.jinja diff --git a/doc/templates/category.html.jinja b/doc/templates/category.html.jinja index 9a5af51f..0d00a729 100644 --- a/doc/templates/category.html.jinja +++ b/doc/templates/category.html.jinja @@ -1,16 +1,13 @@ -{% import "macros.html.jinja" as macros %} +{% import "macros.html.jinja" as macros -%} +
{% call macros.maybe_spoilered(category) %} - + {{ macros.header(category, "category-title") }} {{ category.description | hexdoc_block }} {% endcall %} {% for entry in category.entries %} {% if entry.id not in blacklist %} - entry + {% include "entry.html.jinja" %} {% endif %} {% endfor %}
\ No newline at end of file diff --git a/doc/templates/entry.html.jinja b/doc/templates/entry.html.jinja new file mode 100644 index 00000000..a1334aa2 --- /dev/null +++ b/doc/templates/entry.html.jinja @@ -0,0 +1,10 @@ +{% import "macros.html.jinja" as macros -%} + +
+ {% call macros.maybe_spoilered(entry) %} + {{ macros.header(entry, "entry-title") }} + {% for page in entry.pages %} + page + {% endfor %} + {% endcall %} +
\ No newline at end of file diff --git a/doc/templates/macros.html.jinja b/doc/templates/macros.html.jinja index ac5db9f9..47909ab7 100644 --- a/doc/templates/macros.html.jinja +++ b/doc/templates/macros.html.jinja @@ -25,3 +25,11 @@ {%- endmacro %} + +{% macro header(value, class_name) %} + +{%- endmacro %}