Combine paige.home.image_* params under paige.home.image

master
Will Faught 2 years ago
parent 32694e101c
commit cce3a8d97c

@ -248,9 +248,10 @@ paige:
home:
blurb: "There's a new daddy in town." # Displayed below the greeting
greeting: "You know best" # Displayed below the image
image_raw: true # Do not copy or process the image
image_stretch: true # Stretch the image fully horizontally if true; center the image otherwise
image_url: "me.jpg" # A page, site, or remote resource glob
image:
raw: true # Do not copy or process the image
stretch: true # Stretch the image fully horizontally if true; center the image otherwise
url: "me.jpg" # A page, site, or remote resource glob
hide_credit_data: true # Don't credit this project in a data attribute
hide_credit_link: true # Don't credit this project in the footer
list:
@ -375,9 +376,10 @@ paige:
home:
blurb: "There's a new daddy in town." # Displayed below the greeting
greeting: "You know best" # Displayed below the image
image_raw: true # Do not copy or process the image
image_stretch: true # Stretch the image fully horizontally if true; center the image otherwise
image_url: "me.jpg" # A page, site, or remote resource glob
image:
raw: true # Do not copy or process the image
stretch: true # Stretch the image fully horizontally if true; center the image otherwise
url: "me.jpg" # A page, site, or remote resource glob
```
Additional optional list page parameters:

@ -4,8 +4,9 @@ paige:
home:
blurb: There's a new daddy in town. A discipline daddy. If I make this comeback, I'll buy you a hundred George Michaels that you can teach to drive! These are my awards, Mother. From Army. The seal is for marksmanship, and the gorilla is for sand racing. We'll have to find something to do so that people can look at you without wanting to kill [themselves](https://bluthipsum.com).
greeting: You know [best](https://www.youtube.com/watch?v=1WDW8XKEGgU)
image_stretch: true
image_url: stretch.webp
image:
stretch: true
url: stretch.webp
page:
reading_time:
hide: true

@ -4,17 +4,17 @@
<article>
{{ partial "paige/metadata.html" $page }}
<section>
{{ if $page.Param "paige.home.image_url" }}
{{ $class := cond ($page.Param "paige.home.image_stretch" | not) "mw-100 rounded-4 shadow" "rounded-4 shadow w-100" }}
{{ $style := cond ($page.Param "paige.home.image_stretch" | not) "height: 20rem" "height: 20rem; object-fit: cover" }}
{{ if $page.Param "paige.home.image.url" }}
{{ $class := cond ($page.Param "paige.home.image.stretch" | not) "mw-100 rounded-4 shadow" "rounded-4 shadow w-100" }}
{{ $style := cond ($page.Param "paige.home.image.stretch" | not) "height: 20rem" "height: 20rem; object-fit: cover" }}
<p {{ if not ($page.Param "paige.home.image_stretch") }} class="text-center" {{ end }}>
<p {{ if not ($page.Param "paige.home.image.stretch") }} class="text-center" {{ end }}>
{{ partial "paige/img.html" (dict
"class" $class
"fetchpriority" "high"
"loading" "eager"
"raw" ($page.Param "paige.home.image_raw")
"src" ($page.Param "paige.home.image_url")
"raw" ($page.Param "paige.home.image.raw")
"src" ($page.Param "paige.home.image.url")
"style" $style
) }}
</p>

Loading…
Cancel
Save