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}}
|
{{ghost_head}}
|
||||||
</head>
|
</head>
|
||||||
<body
|
<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 --}}
|
{{!-- The Mobile Menu is outside the swap target and stays alive --}}
|
||||||
{{> mobile-menu}}
|
{{> mobile-menu}}
|
||||||
|
|
||||||
{{!--
|
{{!--
|
||||||
We target only this container for HTMX page swaps.
|
This container is the target for HTMX swaps.
|
||||||
This keeps root Alpine state (like mobileMenuOpen) persistent.
|
|
||||||
--}}
|
--}}
|
||||||
<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}}
|
{{> header}}
|
||||||
|
|
||||||
<main class="flex-grow">
|
<main class="flex-grow">
|
||||||
|
|||||||
Reference in New Issue
Block a user