pyro/templates/menu.html
Irrlicht 1a164b5317
[template][menu] Allow for more customizing of the menu
- Allow customizing the menu with a pair of name and link. Compatible
  with the aria-current tag
- Make links relative, not absolute
2026-01-11 00:23:41 +01:00

59 lines
2.2 KiB
HTML

<nav class="menu-list">
<menu>
<li class="menu-item"{% if page_name=='index' %} aria-current="page" {% endif %}>
<a href="/">
Accueil
</a>
</li>
{% if MENU_PAGES and MENU_PAGES|length > 0 %}
{% for p in MENU_PAGES %}
<li class="menu-item"{% if page is defined and p[0] == page.title or p[0] == category or p[0] == tag %} aria-current="page" {% endif %}>
<a href="{{ p[1] }}">{{ p[0] }}</a>
</li>
{% endfor %}
{% endif %}
{% if DISPLAY_CATEGORIES_ON_MENU %}
<li class="menu-item"{% if page_name=='categories' %} aria-current="page" {% endif %}>
<a href="/categories">Categories</a>
</li>
{% endif %}
{% if DISPLAY_TAGS_ON_MENU %}
<li class="menu-item"{% if page_name=='tags' %} aria-current="page" {% endif %}>
<a href="/tags">Tags</a>
</li>
{% endif %}
</menu>
</nav>
<nav id="nav-stack">
<menu>
<li class="menu-item stack"{% if page_name=='index' %} aria-current="page" {% endif %}>
<a href="/">
Accueil
</a>
</li>
{% if MENU_PAGES and MENU_PAGES|length > 0 %}
{% for p in MENU_PAGES %}
<li class="menu-item stack"{% if page is defined and p[0] == page.title or p[0] == category or p[0] == tag %} aria-current="page" {% endif %}>
<a href="{{ p[1] }}">{{ p[0] }}</a>
</li>
{% endfor %}
{% endif %}
{% if DISPLAY_CATEGORIES_ON_MENU %}
<li class="menu-item stack"{% if page_name=='categories' %} aria-current="page" {% endif %}>
<a href="/categories">Categories</a>
</li>
{% endif %}
{% if DISPLAY_TAGS_ON_MENU %}
<li class="menu-item stack"{% if page_name=='tags' %} aria-current="page" {% endif %}>
<a href="/tags">Tags</a>
</li>
{% endif %}
<div class="menu-stack-footer">
<button id="return-button" class="menu-button" title="retour">
<img class="icon" src="/theme/icons/return.svg" alt="logo return">
</button>
</div>
</menu>
</nav>
</div>