This commit is contained in:
giles 2024-09-26 19:44:56 +01:00
parent 72aee58d4e
commit 3a4780915d
2 changed files with 40 additions and 50 deletions

View File

@ -42,12 +42,12 @@
</header>
{{/match}}
<div class="single-content gh-content gh-canvas ">
<div class="single-content gh-content gh-canvas">
{{content}}
</div>
{{#is "post"}}
<div class="kg-width-{{width}}">
<div class="single-content gh-content gh-canvas kg-width-{{width}}">
{{> "shop/top"}}
</div>
@ -95,7 +95,9 @@
{{/next_post}}
</div>
</footer>
{{#is "post"}}
{{> "shop/configure-product"}}
{{/is}}
</div>
{{/is}}

View File

@ -2,47 +2,35 @@
<div
hx-get="shop/totals/"
hx-trigger="load delay:1ms"
hx-on::config-request = "
hx-on::config-request="
event.detail.path = !(
new URLSearchParams(window.location.search
).get('order'))
? 'shop/totals/'
: 'shop/totals/?orderId=' + new URLSearchParams(window.location.search).get('order');
";
"
hx-swap="outerHTML"
></div>
<div
id="order-form-rose-ash-shop"
hx-get="shop/order"
hx-swap="outerHTML"
hx-trigger="load delay:1ms"
hx-target="#order-form-rose-ash-shop"
hx-trigger="every 1s"
hx-on::config-request="event.detail.path += window.location.search;"
hx-on::confirm="
console.log(window.location.search)
console.log('checking...')
if (false && new URLSearchParams(window.location.search).get('show') !== 'buy') {
event.preventDefault();
}
"
>
<div class="spinner-border" role="status">
<span class="sr-only">Loading...</span>
</div>
</div>
<!--
<div
id="order-detail-rose-ash-shop"
hx-get="shop/order"
hx-trigger="load delay:1ms"
hx-on::config-request="event.detail.path = new URLSearchParams(window.location.search).get('orderId') ? 'shop/order/' + new URLSearchParams(window.location.search).get('orderId')+ '/' : null; "
hx-on::confirm = " if (!new URLSearchParams(window.location.search).get('orderId')) { event.preventDefault(); }"
hx-on::confirm=" if (!new URLSearchParams(window.location.search).get('orderId')) { event.preventDefault(); }"
hx-swap="innerHTML"
>
</div>
</div>
-->
</div>