chore: tidy up markup

This commit is contained in:
Cory Dransfeldt 2024-06-20 09:35:31 -07:00
parent ee9b7aa778
commit ebd98b1f34
No known key found for this signature in database
4 changed files with 4 additions and 10 deletions

View file

@ -1,6 +1,6 @@
{
"name": "coryd.dev",
"version": "19.5.10",
"version": "19.5.11",
"description": "The source for my personal site. Built using 11ty.",
"type": "module",
"scripts": {

View file

@ -4,16 +4,14 @@
<script>{{ js }}</script>
<div class="flex-centered">
<input id="menu-toggle" type="checkbox" aria-hidden="true" />
<label class="menu-button-container" for="menu-toggle" aria-controls="primary-navigation" aria-expanded="false" tabindex="0">
<label class="menu-button-container" for="menu-toggle" aria-expanded="false" tabindex="0">
<span id="menu-label-text" class="screen-readers-only">Toggle mobile menu</span>
<div class="menu-closed" aria-hidden="true">{% tablericon "menu" "Menu closed" %}</div>
<div class="menu-open" aria-hidden="true">{% tablericon "x" "Menu open" %}</div>
</label>
<ul class="menu-primary" aria-label="Primary site navigation" id="primary-navigation" role="menu">
{% for link in nav.menu %}
<li role="menu-item">
{% render "partials/nav/link.liquid", page:page, link:link.name, icon:link.icon %}
</li>
<li>{% render "partials/nav/link.liquid", page:page, link:link.name, icon:link.icon %}</li>
{% endfor %}
</ul>
{% render "partials/nav/theme-toggle.liquid" %}

View file

@ -2,7 +2,7 @@ window.addEventListener('load', () => {
const menuInput = document.getElementById('menu-toggle')
const menuLabelText = document.getElementById('menu-label-text')
const menuButtonContainer = document.querySelector('.menu-button-container')
const menuItems = document.querySelectorAll('.menu-primary li[role="menu-item"]')
const menuItems = document.querySelectorAll('.menu-primary li')
const isMobile = () => window.innerWidth <= 768
const udpateMenuState = () => {

View file

@ -73,10 +73,6 @@
}
}
a[role="menu-item"]:focus {
outline: none;
}
@media (max-width: 768px) {
.menu-primary {
position: absolute;