From 9a38bf790011a771a753ef6e01bf7c2b5d5635c8 Mon Sep 17 00:00:00 2001 From: tdro Date: Tue, 21 Nov 2023 15:42:01 -0500 Subject: themes/default/layouts/_default/index: Simplify Sooner rather than later --- assets/css/default.css | 5 ++++- themes/default/layouts/_default/index.html | 12 +----------- .../default/layouts/partials/navigator-right.html | 22 +--------------------- 3 files changed, 6 insertions(+), 33 deletions(-) diff --git a/assets/css/default.css b/assets/css/default.css index edcf076..e1ef839 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -1737,7 +1737,10 @@ gallery-overlay { border-color: var(--border-lighter); } -web-ring { +web-ring, +[data-kind="home"] author-list, +[data-kind="term"] author-list, +[data-kind="taxonomy"] author-list { border-radius: 1rem; position: sticky; position: -webkit-sticky; diff --git a/themes/default/layouts/_default/index.html b/themes/default/layouts/_default/index.html index 2f97bbd..1de28d6 100644 --- a/themes/default/layouts/_default/index.html +++ b/themes/default/layouts/_default/index.html @@ -30,15 +30,5 @@ {{- end -}} {{- define "right" -}} - {{- $author := "Section" -}} - {{- partial "author-list.html" . -}} - - {{- range first 1 (where .Site.Pages $author .Site.Author.default.gallery) -}} - {{- partial "gallery.html" . -}} - {{- end -}} - - {{- range first 1 (where .Site.Pages $author .Site.Author.default.webring) -}} - {{- partial "following-list.html" . -}} - {{- partial "webring.html" . -}} - {{- end -}} + {{- partial "navigator-right.html" . -}} {{- end -}} diff --git a/themes/default/layouts/partials/navigator-right.html b/themes/default/layouts/partials/navigator-right.html index 4ad5d42..c2e6f4c 100644 --- a/themes/default/layouts/partials/navigator-right.html +++ b/themes/default/layouts/partials/navigator-right.html @@ -1,27 +1,7 @@ {{- partial "author-list.html" . -}} -{{- $author := "Section" -}} - -{{- if or - (eq .Page.Kind "page") - (eq .Page.Kind "section") --}} +{{- if (in (slice "page" "section") .Page.Kind) -}} {{- partial "gallery.html" . -}} {{- partial "following-list.html" . -}} - -{{- end -}} - -{{- if or - (eq .Page.Kind "page") - (eq .Page.Kind "section") --}} - {{- partial "webring.html" . -}} - -{{- else -}} - - {{- range first 1 (where .Site.Pages $author .Site.Author.default.webring) -}} - {{- partial "webring.html" . -}} - {{- end -}} - {{- end -}} -- cgit v1.2.3