Introduce a struct for child members and use that instead of string names.

This commit is contained in:
yagigreg committed 2025-05-04 16:14:47 -05:00
1 parent 2473fdd24b
commit a6ea9ed048
2 files changed
+32 -22

No files matched your search

+5 -5
View File
@@ -82,12 +82,12 @@
<p class="title"><a href="{{ relative_root | safe }}{{ page.parent.url }}">{{ page.parent.name }}</a></p>
<ul>
{% for child in page.parent.children %}
<li{% if child == page.name %} class="highlight"{% endif %}>
<a href="{% if page.is_directory %}../{% endif %}{{ child }}">{{ child | file_stem }}</a>
{% if page.is_directory and child == page.name %}
<li{% if child.name == page.name %} class="highlight"{% endif %}>
<a href="{% if page.is_directory %}../{% endif %}{{ child.name }}">{{ child.title }}</a>
{% if page.is_directory and child.name == page.name %}
<ul>
{% for child in page.children %}
<li><a href="{{ child }}">{{ child | file_stem }}</a></li>
<li><a href="{{ child.name }}">{{ child.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
@@ -100,7 +100,7 @@
<p class="title"><a href="{{ relative_root | safe }}{{ page.url }}">{{ page.name }}</a></p>
<ul>
{% for child in page.children %}
<li><a href="{{ child }}">{{ child | file_stem }}</a></li>
<li><a href="{{ child.name }}">{{ child.title }}</a></li>
{% endfor %}
</ul>
</div>