37 lines
1.4 KiB
HTML
37 lines
1.4 KiB
HTML
<nav role="navigation" data-breakpoint="my-md" id="site-navbar">
|
|
<ul>
|
|
<h2>{{ SITESUBTITLE }}</h2>
|
|
</ul>
|
|
<input type="checkbox" id="hamburger">
|
|
<label id="hamburger-label" for="hamburger" aria-label="Menu" aria-controls="main-menu-items">
|
|
≡
|
|
</label>
|
|
<ul id="main-menu-items" role="list">
|
|
{% for title, link in MENUITEMS %}
|
|
{% if link is iterable and link is not string %}{% set submenu = true %}{% endif %}
|
|
<li role="listitem"{% if output_file[-10:] == "index.html" and (output_file[:-10] == link or (submenu and output_file[:-10] == link[0][1])) %} aria-current="page"{% endif %}>
|
|
{% if submenu %}
|
|
<details class="dropdown">
|
|
<summary><a href="{{ SITEURL }}/{{ link[0][1]}}">{{ title }}</a></summary>
|
|
<ul>
|
|
{% for t, l in link %}
|
|
{% if not loop.first %}
|
|
<li role="listitem"{% if output_file[-10:] == "index.html" and output_file[:-10] == l %} aria-current="page"{% endif %}><a href="{{ SITEURL }}/{{ l }}">{{ t }}</a></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</details>
|
|
{% else %}
|
|
<a href="{{ SITEURL }}/{{ link }}">{{ title }}</a>
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
<li role="listitem" class="sun-moon-li">
|
|
<label id="sun-moon-label">
|
|
<input id="sun-moon" name="color-mode-toggle" role="switch" type="checkbox" value="1"
|
|
aria-label="Toggle Light or Dark Mode">
|
|
</label>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
{# {% debug %} #} |