From 5eb2116060a84c915f9a4dba1d671f96e856f2eb Mon Sep 17 00:00:00 2001 From: tdro Date: Sun, 24 Jul 2022 18:12:43 -0400 Subject: themes/default/layouts/partials: Add following aside Add basic following aside for now. --- assets/css/default.css | 8 ++-- themes/default/layouts/_default/list.html | 3 +- themes/default/layouts/partials/author-user.html | 2 +- .../default/layouts/partials/following-list.html | 53 ++++++++++++++++++++++ .../default/layouts/partials/navigator-right.html | 1 + 5 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 themes/default/layouts/partials/following-list.html diff --git a/assets/css/default.css b/assets/css/default.css index db82650..0958e2e 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -92,7 +92,7 @@ } } -/* ----- Psuedo ----- */ +/* ----- Pseudo ----- */ *, ::before, @@ -1107,6 +1107,7 @@ paginator-navigation svg { web-ring, author-list, +following-list, gallery-images { padding-bottom: 1rem; display: block; @@ -1114,6 +1115,7 @@ gallery-images { web-ring > h1, author-list > h1, +following-list > h1, gallery-images > h1 { font-size: 95%; margin: 0.5rem 0 1rem 0; @@ -1191,20 +1193,20 @@ web-ring-item:not(:last-child) { display: block; } +following-list aside, web-ring aside, author-list section { background-color: #f9f9f9; background-color: var(--widget-background); + border-radius: 1rem; } web-ring aside { - border-radius: 1rem; padding: 1rem; } author-list section { display: block; - border-radius: 1rem; } search-entry { diff --git a/themes/default/layouts/_default/list.html b/themes/default/layouts/_default/list.html index 5cc563b..8f3c5f5 100644 --- a/themes/default/layouts/_default/list.html +++ b/themes/default/layouts/_default/list.html @@ -30,7 +30,8 @@ {{ end }} {{ range first 1 (where .Site.Pages "Params.Author" .Site.Author.default.webring) }} - {{- partial "web-ring.html" . -}} + {{- partial "following-list.html" . -}} + {{- partial "web-ring.html" . -}} {{ end }} {{ end }} diff --git a/themes/default/layouts/partials/author-user.html b/themes/default/layouts/partials/author-user.html index 797610b..6c6613e 100644 --- a/themes/default/layouts/partials/author-user.html +++ b/themes/default/layouts/partials/author-user.html @@ -5,4 +5,4 @@ {{- $author = index .Site.Data ((or .Params.author .Site.Author.default.user) | default "default") -}} {{- end -}} -{{- $author.user | markdownify -}} +{{- $author.user -}} diff --git a/themes/default/layouts/partials/following-list.html b/themes/default/layouts/partials/following-list.html new file mode 100644 index 0000000..3adb2fd --- /dev/null +++ b/themes/default/layouts/partials/following-list.html @@ -0,0 +1,53 @@ +{{- $following := slice -}} +{{- range (where .Site.Pages "Params.Author" (partial "author-user.html" .)) -}} + {{- if .Params.feed -}} + {{- + $following = $following | append (dict + "Name" .Params.feed.name + "Domain" .Params.feed.domain + "Description" .Params.feed.description + ) + -}} + {{- end -}} +{{- end -}} + + +

Following

+ + {{- if not $following -}} + + {{- end -}} +
diff --git a/themes/default/layouts/partials/navigator-right.html b/themes/default/layouts/partials/navigator-right.html index abe0d28..fc598c2 100644 --- a/themes/default/layouts/partials/navigator-right.html +++ b/themes/default/layouts/partials/navigator-right.html @@ -1,3 +1,4 @@ {{- partial "author-list.html" . -}} {{- partial "gallery-images.html" . -}} +{{- partial "following-list.html" . -}} {{- partial "web-ring.html" . -}} -- cgit v1.2.3