fix(htmx): move hx-boost to body to capture mobile menu navigation
All checks were successful
Deploy Theme / deploy (push) Successful in 13s
All checks were successful
Deploy Theme / deploy (push) Successful in 13s
This commit is contained in:
11
default.hbs
11
default.hbs
@@ -34,16 +34,19 @@
|
||||
{{ghost_head}}
|
||||
</head>
|
||||
<body
|
||||
class="{{body_class}} font-sans antialiased">
|
||||
class="{{body_class}} font-sans antialiased"
|
||||
hx-boost="true"
|
||||
hx-target="#viewport"
|
||||
hx-select="#viewport"
|
||||
>
|
||||
|
||||
{{!-- The Mobile Menu is outside the swap target and stays alive --}}
|
||||
{{> mobile-menu}}
|
||||
|
||||
{{!--
|
||||
We target only this container for HTMX page swaps.
|
||||
This keeps root Alpine state (like mobileMenuOpen) persistent.
|
||||
This container is the target for HTMX swaps.
|
||||
--}}
|
||||
<div id="viewport" class="min-h-screen flex flex-col" hx-boost="true" hx-target="#viewport" hx-select="#viewport">
|
||||
<div id="viewport" class="min-h-screen flex flex-col">
|
||||
{{> header}}
|
||||
|
||||
<main class="flex-grow">
|
||||
|
||||
Reference in New Issue
Block a user