From 8d52e2c7584979bafeac33ed644ad10d6a57812b Mon Sep 17 00:00:00 2001 From: tdro Date: Fri, 6 May 2022 22:16:04 -0400 Subject: themes/default/layouts/partials: Allow setting default gallery Correct spelling error. --- config.json | 3 ++- config.toml | 1 + config.yaml | 1 + themes/default/layouts/_default/list.html | 8 +++++++- themes/default/layouts/partials/gallery-images.html | 2 +- themes/default/layouts/partials/navigator-right-default.html | 8 ++++---- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/config.json b/config.json index 3cc0cf7..449f33d 100644 --- a/config.json +++ b/config.json @@ -11,7 +11,8 @@ "author": { "default": { "user": "default", - "webring": "canory" + "webring": "canory", + "picturegallery": "canory" }, "footer": "A Micro Blog\n" }, diff --git a/config.toml b/config.toml index 4f494ea..a2eb008 100644 --- a/config.toml +++ b/config.toml @@ -13,6 +13,7 @@ enableRobotsTXT = true [author.default] user = "default" webring = "canory" + picturegallery = "canory" [taxonomies] tag = "tags" diff --git a/config.yaml b/config.yaml index 5cb8ae2..3a52fb2 100644 --- a/config.yaml +++ b/config.yaml @@ -14,6 +14,7 @@ author: default: user: default webring: canory + picturegallery: canory footer: > A Micro Blog diff --git a/themes/default/layouts/_default/list.html b/themes/default/layouts/_default/list.html index f35f275..651a074 100644 --- a/themes/default/layouts/_default/list.html +++ b/themes/default/layouts/_default/list.html @@ -23,7 +23,13 @@ {{ end }} {{ define "right" }} + {{ range first 1 (where .Site.Pages "Params.Author" .Site.Author.default.picturegallery) }} + {{- partial "gallery-images.html" . -}} + {{ end }} + + {{- partial "author-list.html" . -}} + {{ range first 1 (where .Site.Pages "Params.Author" .Site.Author.default.webring) }} - {{- partial "navigator-right.html" . -}} + {{- partial "web-ring.html" . -}} {{ end }} {{ end }} diff --git a/themes/default/layouts/partials/gallery-images.html b/themes/default/layouts/partials/gallery-images.html index 1dfe611..f3790ba 100644 --- a/themes/default/layouts/partials/gallery-images.html +++ b/themes/default/layouts/partials/gallery-images.html @@ -1,7 +1,7 @@ {{ $folder := print "/content/" (partial "author-user.html" .) "/media/" }} -

Picture Gallary

+

Picture Gallery

{{ partial "gallery-walk.html" $folder }}
diff --git a/themes/default/layouts/partials/navigator-right-default.html b/themes/default/layouts/partials/navigator-right-default.html index 0b57b8a..44b4bbd 100644 --- a/themes/default/layouts/partials/navigator-right-default.html +++ b/themes/default/layouts/partials/navigator-right-default.html @@ -1,4 +1,4 @@ -{{ range first 1 (where .Site.Pages "Params.Author" .Site.Author.default.webring) }} - {{- partial "author-list.html" . -}} - {{- partial "web-ring.html" . -}} -{{ end }} +{{- partial "author-list.html" . -}} +{{- range first 1 (where .Site.Pages "Params.Author" .Site.Author.default.webring) -}} + {{- partial "web-ring.html" . -}} +{{- end -}} -- cgit v1.2.3