This commit is contained in:
object-Object 2023-07-16 22:55:25 -04:00
parent 047907d4bb
commit 0b7c8ca989
3 changed files with 22 additions and 7 deletions

View file

@ -1,16 +1,13 @@
{% import "macros.html.jinja" as macros %} {% import "macros.html.jinja" as macros -%}
<section id="{{ category.id.path }}"> <section id="{{ category.id.path }}">
{% call macros.maybe_spoilered(category) %} {% call macros.maybe_spoilered(category) %}
<h2 class="category-title page-header"> {{ macros.header(category, "category-title") }}
{{ category.name | hexdoc_block }}
{{ macros.jump_to_top() }}
{{ macros.permalink(category.id.path) }}
</h2>
{{ category.description | hexdoc_block }} {{ category.description | hexdoc_block }}
{% endcall %} {% endcall %}
{% for entry in category.entries %} {% for entry in category.entries %}
{% if entry.id not in blacklist %} {% if entry.id not in blacklist %}
entry {% include "entry.html.jinja" %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</section> </section>

10
doc/templates/entry.html.jinja vendored Normal file
View file

@ -0,0 +1,10 @@
{% import "macros.html.jinja" as macros -%}
<div id="{{ entry.id.path }}">
{% call macros.maybe_spoilered(entry) %}
{{ macros.header(entry, "entry-title") }}
{% for page in entry.pages %}
page
{% endfor %}
{% endcall %}
</div>

View file

@ -25,3 +25,11 @@
<i class="bi bi-box-arrow-up"></i> <i class="bi bi-box-arrow-up"></i>
</a> </a>
{%- endmacro %} {%- endmacro %}
{% macro header(value, class_name) %}
<h3 class="{{ class_name }} page-header">
{{ value.name | hexdoc_block }}
{{ jump_to_top() }}
{{ permalink(value.id.path) }}
</h3>
{%- endmacro %}