From 3572a8a65d4355d13c7b213114b97a13f684324e Mon Sep 17 00:00:00 2001 From: "John Siu (imacpro)" Date: Thu, 2 Jul 2020 14:28:43 -0400 Subject: Add comment and minor update --- layouts/_default/list.html | 15 ++++++++------- layouts/_default/single.html | 18 ++++++++++++++---- layouts/partials/header.html | 2 ++ 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 5a5b443..1923e23 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,23 +1,24 @@ {{define "main"}} -{{if .Site.Params.mainType}} - {{.Scratch.Set "type" .Site.Params.mainType}} -{{else}} - {{.Scratch.Set "type" "post"}} -{{end}} + +{{.Scratch.Set "type" (default "post" .Site.Params.mainType)}} + {{if .IsHome}} - {{.Scratch.Set "Paginator" (.Paginate (where .Site.RegularPages "Type" (.Scratch.Get "type")))}} +{{.Scratch.Set "Paginator" (.Paginate (where .Site.RegularPages "Type" (.Scratch.Get "type")))}} {{else}} - {{.Scratch.Set "Paginator" .Paginator}} +{{.Scratch.Set "Paginator" .Paginator}} {{end}} {{$paginator:=(.Scratch.Get "Paginator")}} + + + {{template "_internal/pagination.html" .}} {{end}} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 2ce0fa8..9010f40 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,25 +1,35 @@ {{define "main"}} +

{{.Title}}

+ + {{.Date.Format "2006-01-30"}} + + {{.TableOfContents}} + + {{.Content}} + -{{with .PrevInSection}}{{.Title}}{{end }} -{{with .NextInSection}}{{.Title}}{{end }} + +{{with .PrevInSection}}Prev {{.Title}}{{end}} +{{with .NextInSection}}Next {{.Title}}{{end}} + {{$related := .Site.RegularPages.Related . | first 5}} {{with $related}}

See Also

{{end}} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index bf161ee..137fac4 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,2 +1,4 @@ + {{.Site.Title}} + {{with .Site.Params.subtitle}} / {{.}}{{end}} \ No newline at end of file -- cgit v1.2.3