Post image style setting

This commit is contained in:
Sodbileg Gansukh 2022-05-19 21:46:26 +08:00
parent 5fc101fb2c
commit c74be0e346
2 changed files with 6 additions and 3 deletions

View File

@ -144,12 +144,13 @@
],
"default": "Light"
},
"post_image_width": {
"post_image_style": {
"type": "select",
"options": [
"Wide",
"Full",
"Small"
"Small",
"Hidden"
],
"default": "Wide",
"group": "post"

View File

@ -8,7 +8,7 @@ into the {body} tag of the default.hbs template --}}
{{!-- Everything inside the #post block pulls data from the post --}}
<main id="site-main" class="site-main">
<article class="article {{post_class}} {{#match @custom.post_image_width "Full"}}image-full{{else match @custom.post_image_width "=" "Small"}}image-small{{/match}}">
<article class="article {{post_class}} {{#match @custom.post_image_style "Full"}}image-full{{else match @custom.post_image_style "=" "Small"}}image-small{{/match}}">
<header class="article-header gh-canvas">
@ -52,6 +52,7 @@ into the {body} tag of the default.hbs template --}}
</section>
</div>
{{#match @custom.post_image_style "!=" "Hidden"}}
{{#if feature_image}}
<figure class="article-image">
{{!-- This is a responsive image, it loads different sizes depending on device
@ -70,6 +71,7 @@ into the {body} tag of the default.hbs template --}}
{{/if}}
</figure>
{{/if}}
{{/match}}
</header>