fix(header): simplify layout and use .stop on logo link to prevent menu triggers
All checks were successful
Deploy Theme / deploy (push) Successful in 13s

This commit is contained in:
2026-02-19 20:17:11 +01:00
parent c2af21ae42
commit 2937173a81
2 changed files with 6 additions and 6 deletions

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 flex-wrap p-5 flex-col md:flex-row items-center justify-between">
<a href="{{@site.url}}" class="flex title-font font-medium items-center text-[var(--text-primary)] mb-4 md:mb-0">
<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)]">
{{#if @site.logo}}
<img src="{{@site.logo}}" alt="{{@site.title}}" class="h-10 w-auto site-logo">
{{else}}
@@ -9,10 +9,10 @@
<span class="ml-3 text-xl font-bold">{{@site.title}}</span>
</a>
<div class="flex items-center">
<nav class="hidden md:flex flex-wrap items-center justify-center">
<div class="flex items-center space-x-4">
<nav class="hidden md:flex items-center space-x-4">
{{navigation type="primary"}}
<button @click="theme = (theme === 'dark' ? 'light' : 'dark')" class="ml-4 p-2 rounded-full bg-[var(--bg-secondary)] stroke-[var(--text-primary)] hover:bg-[var(--bg-tertiary)] transition-colors duration-200">
<button @click="theme = (theme === 'dark' ? 'light' : 'dark')" class="p-2 rounded-full bg-[var(--bg-secondary)] stroke-[var(--text-primary)] hover:bg-[var(--bg-tertiary)] transition-colors duration-200">
<svg x-show="theme === 'dark'" class="theme-toggle-dark-icon w-5 h-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z" />
</svg>

View File

@@ -13,7 +13,7 @@
<!-- Mobile Menu Header -->
<div class="flex justify-between items-center p-5 flex-none">
<a href="{{@site.url}}" class="flex items-center text-[var(--text-primary)]" @click="$store.mobileMenu.close()">
<a href="{{@site.url}}" class="flex items-center text-[var(--text-primary)]" @click.stop="$store.mobileMenu.close()">
{{#if @site.logo}}
<img src="{{@site.logo}}" alt="{{@site.title}}" class="h-10 w-auto site-logo">
{{else}}