This commit is contained in:
giles 2024-09-15 22:39:51 +01:00
parent 6169de80db
commit 6a76b7de75
1 changed files with 78 additions and 82 deletions

View File

@ -1,63 +1,56 @@
<article class="single {{post_class}}"> <article class="single {{post_class}}">
{{#match @page.show_title_and_feature_image}} {{#match @page.show_title_and_feature_image}}
<header class="single-header gh-canvas"> <header class="single-header gh-canvas">
{{#is "post"}} {{#is "post"}}
<div class="single-meta"> <div class="single-meta">
<!-- <!--
<span class="single-meta-item single-meta-date"> <span class="single-meta-item single-meta-date">
<time datetime="{{date format="YYYY-MM-DD"}}"> <time datetime="{{date format="YYYY-MM-DD"}}">
{{date published_at}} {{date published_at}}
</time> </time>
</span> </span>
--> -->
<span class="single-meta-item single-meta-length"> <span class="single-meta-item single-meta-length">
{{reading_time}} {{reading_time}}
</span> </span>
{{#primary_tag}} {{#primary_tag}}
<span class="single-meta-item single-meta-tag"> <span class="single-meta-item single-meta-tag">
<a class="post-tag post-tag-{{slug}}" href="{{url}}">{{name}}</a> <a class="post-tag post-tag-{{slug}}" href="{{url}}">{{name}}</a>
</span> </span>
{{/primary_tag}} {{/primary_tag}}
</div> </div>
{{/is}} {{/is}}
<h1 class="single-title">{{title}}</h1> <h1 class="single-title">{{title}}</h1>
<div id="total-rose-ash-shop" hx-get="shop/orders/total"
hx-trigger="load delay:1ms, configured from:body, ordered from:body delay:1ms, paid from:body"
hx-swap="innerHTML">
</div>
<div id="order-rose-ash-shop" hx-get="order" {{#if custom_excerpt}}
hx-trigger="load delay:1ms, configured from:body, paid from:body, ordered from:body delay:1ms" <div class="single-excerpt">
hx-on::config-request="event.detail.path = !(new URLSearchParams(window.location.search).get('order')) ? 'shop/order/?embed=true' : 'shop/order/?embed=true&orderId=' + new URLSearchParams(window.location.search).get('order');" {{custom_excerpt}}
hx-swap="innerHTML"> </div>
</div>
{{#if custom_excerpt}}
<div class="single-excerpt">
{{custom_excerpt}}
</div>
{{/if}}
<div id="order-detail-rose-ash-shop" hx-get="order" hx-trigger="load delay:1ms, paid from:body"
hx-on::config-request="event.detail.path = new URLSearchParams(window.location.search).get('order') ? 'shop/order/' + new URLSearchParams(window.location.search).get('order')+ '/?embed=true' : null; //6a919002-94eb-467d-a226-5dd05b7f44a3 '"
hx-on::confirm=" if (!new URLSearchParams(window.location.search).get('order')) { event.preventDefault(); }"
hx-swap="innerHTML">
</div>
{{#if feature_image}}
{{#unless no_image}}
<figure class="single-media kg-width-{{width}}">
<img srcset="{{> " srcset"}}" sizes="(min-width: 1023px) 920px, calc(90vw)"
src="{{img_url feature_image size=" l"}}"
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}">
{{#if feature_image_caption}}
<figcaption>{{feature_image_caption}}</figcaption>
{{/if}} {{/if}}
</figure> <div
{{/unless}} id="order-detail-rose-ash-shop"
{{/if}} hx-get="order"
</header> hx-trigger="load delay:1ms, paid from:body"
hx-on::config-request="event.detail.path = new URLSearchParams(window.location.search).get('order') ? 'shop/order/' + new URLSearchParams(window.location.search).get('order')+ '/?embed=true' : null; //6a919002-94eb-467d-a226-5dd05b7f44a3 '"
hx-on::confirm = " if (!new URLSearchParams(window.location.search).get('order')) { event.preventDefault(); }"
hx-swap="innerHTML"
>
</div>
{{#if feature_image}}
{{#unless no_image}}
<figure class="single-media kg-width-{{width}}">
<img srcset="{{> "srcset"}}" sizes="(min-width: 1023px) 920px, calc(90vw)" src="{{img_url feature_image size="l"}}" alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}">
{{#if feature_image_caption}}
<figcaption>{{feature_image_caption}}</figcaption>
{{/if}}
</figure>
{{/unless}}
{{/if}}
</header>
{{/match}} {{/match}}
<div class="single-content gh-content gh-canvas"> <div class="single-content gh-content gh-canvas">
@ -66,55 +59,58 @@
{{#is "post"}} {{#is "post"}}
<div class="gh-canvas"> <div class="gh-canvas">
<footer class="single-footer"> <footer class="single-footer">
<div class="single-footer-left"> <div class="single-footer-left">
{{#prev_post}} {{#prev_post}}
<div class="navigation navigation-previous"> <div class="navigation navigation-previous">
<a class="navigation-link" href="{{url}}" aria-label="Previous post"> <a class="navigation-link" href="{{url}}" aria-label="Previous post">
<span class="navigation-icon">{{> "icons/arrow-left"}}</span> <span class="navigation-icon">{{> "icons/arrow-left"}}</span>
</a> </a>
</div>
{{/prev_post}}
</div> </div>
{{/prev_post}}
</div>
<div class="single-footer-middle"> <div class="single-footer-middle">
{{#if @custom.show_author}} {{#if @custom.show_author}}
<div class="single-footer-top"> <div class="single-footer-top">
<h3 class="single-footer-title">Published by:</h3> <h3 class="single-footer-title">Published by:</h3>
<div class="author-list"> <div class="author-list">
{{#foreach authors}} {{#foreach authors}}
<div class="author-image-placeholder u-placeholder square"> <div class="author-image-placeholder u-placeholder square">
<a href="{{url}}" title="{{name}}"> <a href="{{url}}" title="{{name}}">
{{#if profile_image}} {{#if profile_image}}
<img class="author-image u-object-fit" src="{{img_url profile_image size=" xs"}}" <img class="author-image u-object-fit" src="{{img_url profile_image size="xs"}}" alt="{{name}}" loading="lazy">
alt="{{name}}" loading="lazy">
{{else}} {{else}}
<span class="u-object-fit">{{> "icons/avatar"}}</span> <span class="u-object-fit">{{> "icons/avatar"}}</span>
{{/if}} {{/if}}
</a> </a>
</div> </div>
{{/foreach}} {{/foreach}}
</div>
</div> </div>
{{/if}}
</div> </div>
{{/if}}
</div>
<div class="single-footer-right"> <div class="single-footer-right">
{{#next_post}} {{#next_post}}
<div class="navigation navigation-next"> <div class="navigation navigation-next">
<a class="navigation-link" href="{{url}}" aria-label="Next post"> <a class="navigation-link" href="{{url}}" aria-label="Next post">
<span class="navigation-icon">{{> "icons/arrow-right"}}</span> <span class="navigation-icon">{{> "icons/arrow-right"}}</span>
</a> </a>
</div>
{{/next_post}}
</div> </div>
</footer> {{/next_post}}
<div id="configure-product" name="configure-product" hx-get="shop/configure?embed" hx-trigger="load">
</div>
<div id="orders-rose-ash-shop" hx-get="shop/orders" hx-trigger="load, paid from:body, configured from:body"
hx-swap="innerHTML">
</div> </div>
</footer>
<div id="configure-product" name="configure-product" hx-get="shop/configure?embed" hx-trigger="load">
</div>
<div
id="orders-rose-ash-shop"
hx-get="shop/orders"
hx-trigger="load, paid from:body, configured from:body"
hx-swap="innerHTML"
>
</div>
</div> </div>
{{/is}} {{/is}}