diff --git a/README.md b/README.md index 1f97db83..eb80be6f 100644 --- a/README.md +++ b/README.md @@ -261,6 +261,17 @@ paige: menu_breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items menu_style: "pills" # Menu item style; must be "links" or "pills"; default is "pills" metadata_max_width: "100ch" # Page metadata max width + pages: # Page lists in list and term default layouts + authors_class: "text-center text-secondary" # Page authors class attribute + date_class: "text-center text-secondary" # Page date class attribute + description_class: "text-center" # Page description class attribute + header_class: "h5 text-center" # Month and year header class attribute + hide_description: false # Hide the page description (default is true) + show_authors: false # Show the page authors (default is false) + show_date: false # Show the page date (default is false) + show_summary: false # Show the page summary (default is false) + summary_class: "text-center" # Page summary class attribute + title_class: "text-center" # Page title class attribute rss: managing_editor: "Michael Bluth" web_master: "Michael Bluth" @@ -305,6 +316,17 @@ Additional optional list page parameters: ```yaml paige: + pages: # Page list + authors_class: "text-center text-secondary" # Page authors class attribute + date_class: "text-center text-secondary" # Page date class attribute + description_class: "text-center" # Page description class attribute + header_class: "h5 text-center" # Month and year header class attribute + hide_description: false # Hide the page description (default is true) + show_authors: false # Show the page authors (default is false) + show_date: false # Show the page date (default is false) + show_summary: false # Show the page summary (default is false) + summary_class: "text-center" # Page summary class attribute + title_class: "text-center" # Page title class attribute show_full_pages: true # Show full pages, not just page titles and descriptions ``` diff --git a/layouts/partials/paige/about.html b/layouts/partials/paige/about.html index f45ccf22..df4bf8bc 100644 --- a/layouts/partials/paige/about.html +++ b/layouts/partials/paige/about.html @@ -1,11 +1,12 @@ {{ $authors := partial "paige/func-authors.html" . }} +{{ $class := .Param "paige.about_class" | default "text-center text-secondary" }} +{{ $aboveclass := print "mb-0" " " $class }} -{{ if or $authors .PublishDate}} - {{ $class := .Params.paige.about_class | default "text-center text-secondary" }} - +{{ with $authors }} +
{{ . }}
+{{ end }} +{{ with .PublishDate }}
- {{- with $authors }}{{ . }}{{ end -}}
- {{- if and $authors .PublishDate }}
{{ end -}}
- {{- with .PublishDate }}{{ end -}}
+
- {{ .Title | markdownify }}{{ with .Description }}
{{ . | markdownify }}{{ end }}
+ {{ $class := "text-center" }}
+
+ {{ $authors := cond ($.Param "paige.pages.show_authors" | not | not) (partial "paige/func-authors.html" .) "" }}
+ {{ $authorsclass := $.Param "paige.pages.authors_class" | default (print $class " text-secondary") }}
+ {{ $date := cond ($.Param "paige.pages.show_date" | not | not) .PublishDate "" }}
+ {{ $dateclass := $.Param "paige.pages.date_class" | default (print $class " text-secondary") }}
+ {{ $description := cond ($.Param "paige.pages.hide_description" | not) (.Description | markdownify) "" }}
+ {{ $descriptionclass := $.Param "paige.pages.description_class" | default $class }}
+ {{ $gap := "mb-0" }}
+ {{ $summary := cond ($.Param "paige.pages.show_summary" | not | not) (.Summary | strings.TrimPrefix "
" | strings.TrimSuffix "
") "" }} + {{ $summaryclass := $.Param "paige.pages.summary_class" | default $class }} + {{ $title := .Title | markdownify }} + {{ $titleclass := $.Param "paige.pages.title_class" | default $class }} + + + {{ with $description }} + + {{ end }} + {{ with $authors }} + + {{ end }} + {{ with $date }} ++ +
+ {{ end }} + {{ if $summary }} +{{ $summary }}
+ {{ end }} {{ end }} {{ end }}