Convert home default layout into paige/home layout
parent
80abfc9189
commit
ae540b9b7f
@ -0,0 +1,227 @@
|
||||
---
|
||||
authors: ["michael_bluth"]
|
||||
categories: ["paige"]
|
||||
date: "2023-02-22"
|
||||
description: "Demonstration of the Paige home layout."
|
||||
layout: "paige/home"
|
||||
paige:
|
||||
home:
|
||||
blurb: "This is the blurb."
|
||||
greeting: "This is the greeting"
|
||||
image:
|
||||
raw: false
|
||||
stretch: false
|
||||
url: "landscape.webp"
|
||||
main:
|
||||
metadata:
|
||||
authors:
|
||||
hide: true
|
||||
date:
|
||||
hide: true
|
||||
reading_time:
|
||||
hide: true
|
||||
terms:
|
||||
hide: true
|
||||
title:
|
||||
class: "display-1 fw-bold text-center"
|
||||
social:
|
||||
discord:
|
||||
bootstrap_icon: "discord"
|
||||
name: "Discord"
|
||||
url: "https://discord.com/users/username"
|
||||
dribbble:
|
||||
bootstrap_icon: "dribbble"
|
||||
name: "Dribbble"
|
||||
url: "https://dribbble.com/username"
|
||||
email:
|
||||
bootstrap_icon: "envelope"
|
||||
name: "E-mail"
|
||||
url: "mailto:username@example.com"
|
||||
facebook:
|
||||
bootstrap_icon: "facebook"
|
||||
name: "Facebook"
|
||||
url: "https://facebook.com/username"
|
||||
github:
|
||||
bootstrap_icon: "github"
|
||||
name: "GitHub"
|
||||
url: "https://github.com/username"
|
||||
instagram:
|
||||
bootstrap_icon: "instagram"
|
||||
name: "Instagram"
|
||||
url: "https://instagram.com/username"
|
||||
linkedin:
|
||||
bootstrap_icon: "linkedin"
|
||||
name: "LinkedIn"
|
||||
url: "https://linkedin.com/in/username"
|
||||
medium:
|
||||
bootstrap_icon: "medium"
|
||||
name: "Medium"
|
||||
url: "https://medium.com/@username"
|
||||
pinterest:
|
||||
bootstrap_icon: "pinterest"
|
||||
name: "Pinterest"
|
||||
url: "https://pinterest.com/username"
|
||||
quora:
|
||||
bootstrap_icon: "quora"
|
||||
name: "Quora"
|
||||
url: "https://quora.com/profile/username"
|
||||
reddit:
|
||||
bootstrap_icon: "reddit"
|
||||
name: "Reddit"
|
||||
url: "https://reddit.com/u/username"
|
||||
spotify:
|
||||
bootstrap_icon: "spotify"
|
||||
name: "Spotify"
|
||||
url: "https://open.spotify.com/user/username"
|
||||
stackoverflow:
|
||||
bootstrap_icon: "stack-overflow"
|
||||
name: "Stack Overflow"
|
||||
url: "https://stackoverflow.com/users/username"
|
||||
strava:
|
||||
bootstrap_icon: "strava"
|
||||
name: "Strava"
|
||||
url: "https://strava.com/athletes/username"
|
||||
twitch:
|
||||
bootstrap_icon: "twitch"
|
||||
name: "Twitch"
|
||||
url: "https://twitch.tv/username"
|
||||
twitter:
|
||||
bootstrap_icon: "twitter"
|
||||
name: "Twitter"
|
||||
url: "https://twitter.com/username"
|
||||
vimeo:
|
||||
bootstrap_icon: "vimeo"
|
||||
name: "Vimeo"
|
||||
url: "https://vimeo.com/username"
|
||||
wordpress:
|
||||
bootstrap_icon: "wordpress"
|
||||
name: "Wordpress"
|
||||
url: "https://username.wordpress.com"
|
||||
yelp:
|
||||
bootstrap_icon: "yelp"
|
||||
name: "Yelp"
|
||||
url: "https://yelp.com/user_details?userid=username"
|
||||
youtube:
|
||||
bootstrap_icon: "youtube"
|
||||
name: "YouTube"
|
||||
url: "https://youtube.com/user/username"
|
||||
title: "Home Layout"
|
||||
---
|
||||
|
||||
Paige provides a `paige/home` layout for a home page.
|
||||
|
||||
<!--more-->
|
||||
|
||||
These are the parameters for this page:
|
||||
|
||||
```yaml
|
||||
---
|
||||
authors: ["michael_bluth"]
|
||||
categories: ["paige"]
|
||||
date: "2023-02-22"
|
||||
description: "Demonstration of the Paige home layout."
|
||||
layout: "paige/home"
|
||||
paige:
|
||||
home:
|
||||
blurb: "This is the blurb."
|
||||
greeting: "This is the greeting"
|
||||
image:
|
||||
raw: false
|
||||
stretch: false
|
||||
url: "landscape.webp"
|
||||
main:
|
||||
metadata:
|
||||
authors:
|
||||
hide: true
|
||||
date:
|
||||
hide: true
|
||||
reading_time:
|
||||
hide: true
|
||||
terms:
|
||||
hide: true
|
||||
title:
|
||||
class: "display-1 fw-bold text-center"
|
||||
social:
|
||||
discord:
|
||||
bootstrap_icon: "discord"
|
||||
name: "Discord"
|
||||
url: "https://discord.com/users/username"
|
||||
dribbble:
|
||||
bootstrap_icon: "dribbble"
|
||||
name: "Dribbble"
|
||||
url: "https://dribbble.com/username"
|
||||
email:
|
||||
bootstrap_icon: "envelope"
|
||||
name: "E-mail"
|
||||
url: "mailto:username@example.com"
|
||||
facebook:
|
||||
bootstrap_icon: "facebook"
|
||||
name: "Facebook"
|
||||
url: "https://facebook.com/username"
|
||||
github:
|
||||
bootstrap_icon: "github"
|
||||
name: "GitHub"
|
||||
url: "https://github.com/username"
|
||||
instagram:
|
||||
bootstrap_icon: "instagram"
|
||||
name: "Instagram"
|
||||
url: "https://instagram.com/username"
|
||||
linkedin:
|
||||
bootstrap_icon: "linkedin"
|
||||
name: "LinkedIn"
|
||||
url: "https://linkedin.com/in/username"
|
||||
medium:
|
||||
bootstrap_icon: "medium"
|
||||
name: "Medium"
|
||||
url: "https://medium.com/@username"
|
||||
pinterest:
|
||||
bootstrap_icon: "pinterest"
|
||||
name: "Pinterest"
|
||||
url: "https://pinterest.com/username"
|
||||
quora:
|
||||
bootstrap_icon: "quora"
|
||||
name: "Quora"
|
||||
url: "https://quora.com/profile/username"
|
||||
reddit:
|
||||
bootstrap_icon: "reddit"
|
||||
name: "Reddit"
|
||||
url: "https://reddit.com/u/username"
|
||||
spotify:
|
||||
bootstrap_icon: "spotify"
|
||||
name: "Spotify"
|
||||
url: "https://open.spotify.com/user/username"
|
||||
stackoverflow:
|
||||
bootstrap_icon: "stack-overflow"
|
||||
name: "Stack Overflow"
|
||||
url: "https://stackoverflow.com/users/username"
|
||||
strava:
|
||||
bootstrap_icon: "strava"
|
||||
name: "Strava"
|
||||
url: "https://strava.com/athletes/username"
|
||||
twitch:
|
||||
bootstrap_icon: "twitch"
|
||||
name: "Twitch"
|
||||
url: "https://twitch.tv/username"
|
||||
twitter:
|
||||
bootstrap_icon: "twitter"
|
||||
name: "Twitter"
|
||||
url: "https://twitter.com/username"
|
||||
vimeo:
|
||||
bootstrap_icon: "vimeo"
|
||||
name: "Vimeo"
|
||||
url: "https://vimeo.com/username"
|
||||
wordpress:
|
||||
bootstrap_icon: "wordpress"
|
||||
name: "Wordpress"
|
||||
url: "https://username.wordpress.com"
|
||||
yelp:
|
||||
bootstrap_icon: "yelp"
|
||||
name: "Yelp"
|
||||
url: "https://yelp.com/user_details?userid=username"
|
||||
youtube:
|
||||
bootstrap_icon: "youtube"
|
||||
name: "YouTube"
|
||||
url: "https://youtube.com/user/username"
|
||||
title: "Home Layout"
|
||||
---
|
||||
```
|
@ -1,45 +0,0 @@
|
||||
{{ define "main" }}
|
||||
{{ $page := . }}
|
||||
|
||||
{{ $stretch := $page.Param "paige.home.image.stretch" }}
|
||||
|
||||
<article>
|
||||
{{ partial "paige/metadata.html" $page }}
|
||||
|
||||
<section>
|
||||
{{ if $page.Param "paige.home.image.url" }}
|
||||
{{ $class := cond ($stretch | not) "mw-100 rounded-4 shadow" "rounded-4 shadow w-100" }}
|
||||
{{ $style := cond ($stretch | not) "height: 20rem" "height: 20rem; object-fit: cover" }}
|
||||
|
||||
<p {{ if not $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")
|
||||
"style" $style
|
||||
) }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with $page.Param "paige.home.greeting" }}
|
||||
<p class="display-5 fw-bold h2 text-center">{{ . | markdownify }}</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with $page.Param "paige.home.blurb" }}
|
||||
<div class="container-fluid">
|
||||
<div class="justify-content-center row">
|
||||
<div class="col col-auto col-lg-7 px-0">
|
||||
<p class="lead text-center">{{ . | markdownify }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
|
||||
{{ partial "paige/toc.html" $page }}
|
||||
{{ partial "paige/content.html" $page }}
|
||||
{{ partial "paige/social.html" $page }}
|
||||
</article>
|
||||
{{ end }}
|
@ -0,0 +1,49 @@
|
||||
{{ define "main" }}
|
||||
{{ $page := . }}
|
||||
|
||||
{{ $stretch := $page.Params.paige.home.image.stretch }}
|
||||
|
||||
<article class="paige-article">
|
||||
<div class="align-items-center d-flex flex-column mb-0">
|
||||
{{ partial "paige/metadata.html" $page }}
|
||||
|
||||
{{ if or $page.Params.paige.home.image.url $page.Params.paige.home.greeting $page.Params.paige.home.blurb }}
|
||||
<section>
|
||||
{{ if $page.Params.paige.home.image.url }}
|
||||
{{ $class := cond ($stretch | not) "mw-100 rounded-4 shadow" "rounded-4 shadow w-100" }}
|
||||
{{ $style := cond ($stretch | not) "height: 20rem; width: auto" "height: 20rem; object-fit: cover; width: 100%" }}
|
||||
|
||||
<p {{ if not $stretch }} class="text-center" {{ end }}>
|
||||
{{ partial "paige/img.html" (dict
|
||||
"class" $class
|
||||
"fetchpriority" "high"
|
||||
"loading" "eager"
|
||||
"raw" $page.Params.paige.home.image.raw
|
||||
"src" $page.Params.paige.home.image.url
|
||||
"style" $style
|
||||
) }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with $page.Params.paige.home.greeting }}
|
||||
<p class="display-5 fw-bold h2 text-center">{{ . | markdownify }}</p>
|
||||
{{ end }}
|
||||
|
||||
{{ with $page.Params.paige.home.blurb }}
|
||||
<div class="container-fluid">
|
||||
<div class="justify-content-center row">
|
||||
<div class="col col-auto col-lg-7 px-0">
|
||||
<p class="lead text-center">{{ . | markdownify }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "paige/toc.html" $page }}
|
||||
{{ partial "paige/content.html" $page }}
|
||||
{{ partial "paige/social.html" $page }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
Loading…
Reference in New Issue