Iterate A Summer's End shrine pages

This commit is contained in:
Helen Chong 2024-04-18 18:57:34 +08:00
parent 6bd4b3f229
commit 69c32a8a5b
1 changed files with 10 additions and 4 deletions

View File

@ -1,9 +1,15 @@
{% extends "global/navbar.njk" %}
{% block navbarLinks %}
<li><a href="/shrines/asummersend/">Shrine Home</a></li>
<li><a href="/shrines/asummersend/playlists">Playlists</a></li>
<li><a href="/shrines/asummersend/trivia">Trivia</a></li>
<li><a href="/shrines/asummersend/gallery">Gallery</a></li>
{% set shrineHomeUrl %}/shrines/asummersend/{% endset %}
{% set currentUrl %}{{ page.url }}{% endset %}
<li>
<a {% if currentUrl === shrineHomeUrl %}aria-current="page"{% endif %} href="{{ shrineHomeUrl }}">Shrine Home</a>
</li>
{% for page in collections["a summers end shrine page"] %}
<li>
<a {% if currentUrl === page.url %}aria-current="page"{% endif %} href="{{ page.url }}">{{ page.data.title }}</a>
</li>
{% endfor %}
<li><a href="/">Main Site</a></li>
{% endblock %}