Replace about_class with {authors,date}_class

master
Will Faught 2 years ago
parent ffb4ff8b5f
commit 5d9cf618a5

@ -214,6 +214,7 @@ paige:
domain: "example.com"
yandex: # metrica.yandex.com
account_id: "123456"
authors_class: "text-center text-secondary" # Page authors class
bootstrap:
icons:
link_href: "https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.2/font/bootstrap-icons.css" # Local or remote file
@ -245,6 +246,7 @@ paige:
account_id: "123456"
utterances: # utteranc.es
github_repo: "example/foo"
date_class: "text-center text-secondary" # Page date class
date_format: "2006 January 2" # Hugo date format for page dates
hide_theme_comment: true # Don't put a link to this project in a code comment
hide_theme_link: true # Don't put a link to this project in the footer
@ -294,8 +296,9 @@ authors: [
]
link: "https://youtu.be/dQw4w9WgXcQ" # The reference for an anchor around the title
paige:
about_class: "h6 text-end" # Page about class
authors_class: "text-center text-secondary" # Page authors class
content_class: "fst-italic" # Page content class
date_class: "text-center text-secondary" # Page date class
description_class: "h5 text-start" # Page description class
math: true # Enable math typesetting with KaTeX
title_class: "display-1 fw-medium text-start" # Page title class

@ -1,12 +1,14 @@
{{ $authors := partial "paige/func-authors.html" . }}
{{ $class := .Param "paige.about_class" | default "text-center text-secondary" }}
{{ $aboveclass := print "mb-0" " " $class }}
{{ $authorsclass := .Param "paige.authors_class" | default "text-center text-secondary" }}
{{ $gap := "mb-0" }}
{{ $date := .PublishDate }}
{{ $dateclass := .Param "paige.date_class" | default "text-center text-secondary" }}
{{ with $authors }}
<p class="{{ cond ($.PublishDate | not | not) $aboveclass $class }}">{{ . }}</p>
<p class="{{ if $date }} {{ $gap }} {{ end }} {{ $authorsclass }}">{{ . }}</p>
{{ end }}
{{ with .PublishDate }}
<p class="{{ $class }}">
{{ with $date }}
<p class="{{ $dateclass }}">
<time datetime="{{ .Format `2006-01-02` }}">{{ time.Format (site.Params.paige.date_format | default ":date_long") . }}</time>
</p>
{{ end }}

Loading…
Cancel
Save