Add code and style for 'hamburger' menu nav

Ref #114 #126
This commit is contained in:
benjamin melançon 2025-07-15 01:42:21 -04:00
parent a638bc8fcc
commit 234bc216c5
2 changed files with 27 additions and 0 deletions

View file

@ -62,3 +62,21 @@
.node--type-people.node--view-mode-teaser {
margin-bottom: 1rem;
}
// Main navigation, goes to code in page.html.twig
details .burger-icon {
transition: transform 0.1s;
display: block;
width: 1.5rem;
height: 1.5rem;
padding: .25rem;
cursor: pointer;
}
details[open] .burger-icon {
transform: rotate(90deg);
}
summary {
list-style-type: none;
}

View file

@ -24,6 +24,13 @@
{{ page.navbar_branding }}
{% endblock navbar_branding %}
<nav class="navigation column">
<details>
<summary>
<div class="burger-icon"><svg aria-label="Navigation Menu" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 4h24M0 12h24M0 20h24" stroke="black" stroke-width="2" />
</svg></div>
</summary>
<div class="columns">
{% block navbar_social %}
{% if page.navbar_social %}
@ -45,6 +52,8 @@
</div>
{% endif %}
</div>
</details>
</nav>
</div>
{% if is_front %}