clause agent mode "make it look like papermod"
Some checks failed
CSS Code Linting / Lint CSS (push) Has been cancelled
JS Code Linting / Lint JS (push) Has been cancelled
PHP Code Linting / Parallel lint (push) Has been cancelled
PHP Code Linting / PHPCS check (push) Has been cancelled

This commit is contained in:
gribse 2025-07-26 16:24:01 +02:00
parent 1c59bd66ea
commit 582e4491c0
91 changed files with 2139 additions and 202 deletions

9
js/navigation.js Normal file → Executable file
View file

@ -27,13 +27,14 @@
return;
}
if ( ! menu.classList.contains( 'nav-menu' ) ) {
menu.classList.add( 'nav-menu' );
// Add primary-menu class if it doesn't exist
if ( ! menu.classList.contains( 'primary-menu' ) ) {
menu.classList.add( 'primary-menu' );
}
// Toggle the .toggled class and the aria-expanded value each time the button is clicked.
button.addEventListener( 'click', function() {
siteNavigation.classList.toggle( 'toggled' );
menu.classList.toggle( 'toggled' );
if ( button.getAttribute( 'aria-expanded' ) === 'true' ) {
button.setAttribute( 'aria-expanded', 'false' );
@ -47,7 +48,7 @@
const isClickInside = siteNavigation.contains( event.target );
if ( ! isClickInside ) {
siteNavigation.classList.remove( 'toggled' );
menu.classList.remove( 'toggled' );
button.setAttribute( 'aria-expanded', 'false' );
}
} );