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

@ -4,8 +4,9 @@ paige:
home: 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). 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) greeting: You know [best](https://www.youtube.com/watch?v=1WDW8XKEGgU)
image_stretch: true image:
image_url: stretch.webp stretch: true
url: stretch.webp
page: page:
reading_time: reading_time:
hide: true hide: true

@ -4,17 +4,17 @@
<article> <article>
{{ partial "paige/metadata.html" $page }} {{ partial "paige/metadata.html" $page }}
<section> <section>
{{ if $page.Param "paige.home.image_url" }} {{ 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" }} {{ $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" }} {{ $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 {{ partial "paige/img.html" (dict
"class" $class "class" $class
"fetchpriority" "high" "fetchpriority" "high"
"loading" "eager" "loading" "eager"
"raw" ($page.Param "paige.home.image_raw") "raw" ($page.Param "paige.home.image.raw")
"src" ($page.Param "paige.home.image_url") "src" ($page.Param "paige.home.image.url")
"style" $style "style" $style
) }} ) }}
</p> </p>

Loading…
Cancel
Save