fix(mobile-menu): add event isolation to all links and state logging
All checks were successful
Deploy Theme / deploy (push) Successful in 13s

This commit is contained in:
2026-02-19 20:51:44 +01:00
parent 5203e616d0
commit 265cee9b97
3 changed files with 6 additions and 2 deletions

View File

@@ -8,11 +8,15 @@
localStorage.setItem('theme', val);
document.documentElement.setAttribute('data-theme', val);
});
$watch('mobileMenuOpen', val => {
console.log('Mobile menu open state changed to:', val);
});
document.documentElement.setAttribute('data-theme', this.theme);
document.documentElement.classList.remove('hidden');
// Close mobile menu on HTMX navigation
document.addEventListener('htmx:beforeRequest', () => {
console.log('HTMX beforeRequest: closing menu');
this.mobileMenuOpen = false;
});
}

View File

@@ -1,6 +1,6 @@
<header class="text-[var(--text-primary)] body-font shadow-lg bg-[var(--bg-primary)]">
<div class="container mx-auto flex p-5 items-center justify-between">
<a href="{{@site.url}}" class="flex title-font font-medium items-center text-[var(--text-primary)]">
<a href="{{@site.url}}" class="flex title-font font-medium items-center text-[var(--text-primary)]" @click.stop>
{{#if @site.logo}}
<img src="{{@site.logo}}" alt="{{@site.title}}" class="h-10 w-auto site-logo">
{{else}}

View File

@@ -1,5 +1,5 @@
<article class="post-grid-item opacity-0 relative bg-[var(--bg-secondary)] rounded-lg shadow-lg overflow-hidden group">
<a href="{{url}}" class="block">
<a href="{{url}}" class="block" @click.stop>
{{#if feature_image}}
<img
class="w-full h-72 object-cover transition-transform duration-300 ease-in-out group-hover:scale-105"