Align the fullscreen menu's left edge with the hamburger icon
The menu content is now wrapped in the same max-w-6xl mx-auto container the header uses, so its left inset matches the hamburger icon's position exactly at every viewport width - previously they only lined up on narrow screens, since the header's centered container adds extra outer margin on wide viewports that the overlay wasn't accounting for. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
b8af58d8d0
commit
17333f5988
1 changed files with 15 additions and 13 deletions
|
|
@ -120,13 +120,14 @@ export default function Navbar() {
|
|||
{mounted &&
|
||||
createPortal(
|
||||
<div
|
||||
className="fixed inset-0 z-[100] flex flex-col items-start justify-center gap-5 overflow-y-auto px-8 py-24 text-left backdrop-blur-xl"
|
||||
className="fixed inset-0 z-[100] overflow-y-auto text-left backdrop-blur-xl"
|
||||
style={{ background: 'linear-gradient(135deg, #f1f5f9 0%, #e3f0cf 50%, #f8fafc 100%)' }}
|
||||
>
|
||||
<div className="relative mx-auto flex min-h-full max-w-6xl flex-col items-start justify-center gap-5 py-24 pl-6 pr-8 sm:pl-8">
|
||||
<button
|
||||
onClick={() => setOpen(false)}
|
||||
aria-label="Menü schließen"
|
||||
className="absolute left-6 top-6 flex items-center gap-2 text-neutral-600 hover:text-brand-600"
|
||||
className="absolute left-6 top-6 flex items-center gap-2 text-neutral-600 hover:text-brand-600 sm:left-8"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" className="h-6 w-6">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" d="M6 6l12 12M18 6 6 18" />
|
||||
|
|
@ -177,6 +178,7 @@ export default function Navbar() {
|
|||
<DynamicIcon name="shopping-bag" className="h-4 w-4" />
|
||||
Zum Shop
|
||||
</a>
|
||||
</div>
|
||||
</div>,
|
||||
document.body
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in a new issue