Rename page_list to list
This commit is contained in:
@@ -286,7 +286,7 @@ paige:
|
|||||||
title:
|
title:
|
||||||
class: "display-5 fw-bold text-center" # Default is "display-5 fw-bold text-center"
|
class: "display-5 fw-bold text-center" # Default is "display-5 fw-bold text-center"
|
||||||
hide: false # Default is false
|
hide: false # Default is false
|
||||||
page_list:
|
list:
|
||||||
authors:
|
authors:
|
||||||
class: "text-center text-secondary" # Default is "text-center text-secondary"
|
class: "text-center text-secondary" # Default is "text-center text-secondary"
|
||||||
hide: false # Default is false
|
hide: false # Default is false
|
||||||
@@ -373,7 +373,7 @@ Additional optional list page parameters:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
paige:
|
paige:
|
||||||
page_list:
|
list:
|
||||||
authors:
|
authors:
|
||||||
class: "text-center text-secondary" # Default is "text-center text-secondary"
|
class: "text-center text-secondary" # Default is "text-center text-secondary"
|
||||||
show: false # Default is false
|
show: false # Default is false
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ $page := . }}
|
{{ $page := . }}
|
||||||
|
|
||||||
{{ if $page.Param "paige.page_list.content.show" | not }}
|
{{ if $page.Param "paige.list.content.show" | not }}
|
||||||
{{ partial "paige/article.html" $page }}
|
{{ partial "paige/article.html" $page }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ partial "paige/pages.html" $page }}
|
{{ partial "paige/pages.html" $page }}
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
"integrity" ($page.Param "paige.bootstrap.style.link_integrity")
|
"integrity" ($page.Param "paige.bootstrap.style.link_integrity")
|
||||||
"raw" ($page.Param "paige.bootstrap.style.raw")
|
"raw" ($page.Param "paige.bootstrap.style.raw")
|
||||||
) }}
|
) }}
|
||||||
{{ if or ($page.Param "paige.math") (and ($page.Param "paige.page_list.content.show") (where $page.Pages "Params.paige.math" "eq" true)) }}
|
{{ if or ($page.Param "paige.math") (and ($page.Param "paige.list.content.show") (where $page.Pages "Params.paige.math" "eq" true)) }}
|
||||||
{{ partial "paige/link.html" (dict
|
{{ partial "paige/link.html" (dict
|
||||||
"href" ($page.Param "paige.math.style.link_href" | default "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css")
|
"href" ($page.Param "paige.math.style.link_href" | default "https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css")
|
||||||
"integrity" ($page.Param "paige.math.style.link_integrity" | default "sha256-NJNVfEC6jfEt62wQMafLNT2eI6BaWONXbpkSEVAs3+8=")
|
"integrity" ($page.Param "paige.math.style.link_integrity" | default "sha256-NJNVfEC6jfEt62wQMafLNT2eI6BaWONXbpkSEVAs3+8=")
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
{{ $class := "mb-0 text-center" }}
|
{{ $class := "mb-0 text-center" }}
|
||||||
|
|
||||||
{{ if $page.Pages }}
|
{{ if $page.Pages }}
|
||||||
{{ if $page.Param "paige.page_list.content.show" }}
|
{{ if $page.Param "paige.list.content.show" }}
|
||||||
{{ $p := $page.Paginate $page.Pages }}
|
{{ $p := $page.Paginate $page.Pages }}
|
||||||
<section>
|
<section>
|
||||||
{{ range $p.Pages }}
|
{{ range $p.Pages }}
|
||||||
@@ -22,33 +22,33 @@
|
|||||||
{{ $p := $page.Paginate ($page.Pages.ByDate.Reverse.GroupByDate "January 2006") }}
|
{{ $p := $page.Paginate ($page.Pages.ByDate.Reverse.GroupByDate "January 2006") }}
|
||||||
<section>
|
<section>
|
||||||
{{ range $p.PageGroups }}
|
{{ range $p.PageGroups }}
|
||||||
{{ if $page.Param "paige.page_list.date_header.hide" | not }}
|
{{ if $page.Param "paige.list.date_header.hide" | not }}
|
||||||
<h2 class="{{ $.Param `paige.page_list.date_header.class` | default `h5 text-center` }}">{{ .Key }}</h2>
|
<h2 class="{{ $.Param `paige.list.date_header.class` | default `h5 text-center` }}">{{ .Key }}</h2>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
{{ $authors := cond ($page.Param "paige.page_list.authors.hide" | not) (partial "paige/func-authors.html" .) "" }}
|
{{ $authors := cond ($page.Param "paige.list.authors.hide" | not) (partial "paige/func-authors.html" .) "" }}
|
||||||
{{ $authorsclass := $page.Param "paige.page_list.authors.class" | default (print $class " text-secondary") }}
|
{{ $authorsclass := $page.Param "paige.list.authors.class" | default (print $class " text-secondary") }}
|
||||||
{{ $categories := cond ($page.Param "paige.page_list.terms.hide" | not) (.Params.categories | default slice) slice | sort | uniq }}
|
{{ $categories := cond ($page.Param "paige.list.terms.hide" | not) (.Params.categories | default slice) slice | sort | uniq }}
|
||||||
{{ $date := cond ($page.Param "paige.page_list.date.hide" | not) .PublishDate "" }}
|
{{ $date := cond ($page.Param "paige.list.date.hide" | not) .PublishDate "" }}
|
||||||
{{ $dateclass := $page.Param "paige.page_list.date.class" | default (print $class " text-secondary") }}
|
{{ $dateclass := $page.Param "paige.list.date.class" | default (print $class " text-secondary") }}
|
||||||
{{ $dateformat := $page.Param "paige.page_list.date.format" | default ":date_long" }}
|
{{ $dateformat := $page.Param "paige.list.date.format" | default ":date_long" }}
|
||||||
{{ $description := cond ($page.Param "paige.page_list.description.hide" | not) (.Description | markdownify) "" }}
|
{{ $description := cond ($page.Param "paige.list.description.hide" | not) (.Description | markdownify) "" }}
|
||||||
{{ $descriptionclass := $page.Param "paige.page_list.description.class" | default $class }}
|
{{ $descriptionclass := $page.Param "paige.list.description.class" | default $class }}
|
||||||
{{ $draft := .Draft }}
|
{{ $draft := .Draft }}
|
||||||
{{ $expired := and .ExpiryDate (lt .ExpiryDate now) }}
|
{{ $expired := and .ExpiryDate (lt .ExpiryDate now) }}
|
||||||
{{ $flags := slice }}
|
{{ $flags := slice }}
|
||||||
{{ $future := and .PublishDate (gt .PublishDate now) }}
|
{{ $future := and .PublishDate (gt .PublishDate now) }}
|
||||||
{{ $modified := and .PublishDate .Lastmod (lt .PublishDate .Lastmod) }}
|
{{ $modified := and .PublishDate .Lastmod (lt .PublishDate .Lastmod) }}
|
||||||
{{ $readingtime := cond ($page.Param "paige.page_list.reading_time.hide" | not) .ReadingTime "" }}
|
{{ $readingtime := cond ($page.Param "paige.list.reading_time.hide" | not) .ReadingTime "" }}
|
||||||
{{ $readingtimeclass := $page.Param "paige.page_list.reading_time.class" | default (print $class " text-secondary") }}
|
{{ $readingtimeclass := $page.Param "paige.list.reading_time.class" | default (print $class " text-secondary") }}
|
||||||
{{ $sectionclass := $page.Param "paige.page_list.section.class" | default "mb-3 w-100" }}
|
{{ $sectionclass := $page.Param "paige.list.section.class" | default "mb-3 w-100" }}
|
||||||
{{ $summary := cond ($page.Param "paige.page_list.summary.hide" | not) (.Summary | strings.TrimPrefix "<p>" | strings.TrimSuffix "</p>" | htmlUnescape | plainify) "" }}
|
{{ $summary := cond ($page.Param "paige.list.summary.hide" | not) (.Summary | strings.TrimPrefix "<p>" | strings.TrimSuffix "</p>" | htmlUnescape | plainify) "" }}
|
||||||
{{ $summaryclass := $page.Param "paige.page_list.summary.class" | default (print "fst-italic " $class) }}
|
{{ $summaryclass := $page.Param "paige.list.summary.class" | default (print "fst-italic " $class) }}
|
||||||
{{ $tags := cond ($page.Param "paige.page_list.terms.hide" | not) (.Params.tags | default slice) slice | sort | uniq }}
|
{{ $tags := cond ($page.Param "paige.list.terms.hide" | not) (.Params.tags | default slice) slice | sort | uniq }}
|
||||||
{{ $termsinnerclass := $page.Param "paige.page_list.terms.inner_class" | default "badge text-bg-secondary text-decoration-none" }}
|
{{ $termsinnerclass := $page.Param "paige.list.terms.inner_class" | default "badge text-bg-secondary text-decoration-none" }}
|
||||||
{{ $termsouterclass := $page.Param "paige.page_list.terms.outer_class" | default $class }}
|
{{ $termsouterclass := $page.Param "paige.list.terms.outer_class" | default $class }}
|
||||||
{{ $title := cond ($page.Param "paige.page_list.title.hide" | not) (.Title | markdownify) "" }}
|
{{ $title := cond ($page.Param "paige.list.title.hide" | not) (.Title | markdownify) "" }}
|
||||||
{{ $titleclass := $page.Param "paige.page_list.title.class" | default $class }}
|
{{ $titleclass := $page.Param "paige.list.title.class" | default $class }}
|
||||||
{{ $titlelink := .RelPermalink }}
|
{{ $titlelink := .RelPermalink }}
|
||||||
|
|
||||||
{{ if $draft }}
|
{{ if $draft }}
|
||||||
|
@@ -53,7 +53,7 @@ addEventListener("resize", paigeResize);
|
|||||||
"raw" ($page.Param "paige.bootstrap.script.raw")
|
"raw" ($page.Param "paige.bootstrap.script.raw")
|
||||||
"src" ($page.Param "paige.bootstrap.script.script_src" | default "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js")
|
"src" ($page.Param "paige.bootstrap.script.script_src" | default "https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js")
|
||||||
) }}
|
) }}
|
||||||
{{ if or ($page.Param "paige.math") (and ($page.Param "paige.page_list.content.show") (where $page.Pages "Params.paige.math" "eq" true)) }}
|
{{ if or ($page.Param "paige.math") (and ($page.Param "paige.list.content.show") (where $page.Pages "Params.paige.math" "eq" true)) }}
|
||||||
{{ partial "paige/script.html" (dict
|
{{ partial "paige/script.html" (dict
|
||||||
"integrity" ($page.Param "paige.math.script.script_integrity")
|
"integrity" ($page.Param "paige.math.script.script_integrity")
|
||||||
"raw" ($page.Param "paige.math.script.raw")
|
"raw" ($page.Param "paige.math.script.raw")
|
||||||
|
Reference in New Issue
Block a user