aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-12-13 20:09:15 -0500
committertdro <tdro@noreply.example.com>2022-12-13 20:09:15 -0500
commit42158b769b623a8666ad8963dd3a0abfab08a7f2 (patch)
tree32a5ae98ff698be37c8e201dd2620c2faf35ad72
parent6a92600be3b56822f3648f77ba878744b727cad3 (diff)
downloadcanory-42158b769b623a8666ad8963dd3a0abfab08a7f2.tar.gz
canory-42158b769b623a8666ad8963dd3a0abfab08a7f2.tar.bz2
canory-42158b769b623a8666ad8963dd3a0abfab08a7f2.zip
themes/default/layouts/partials/following-list: No content message in both conditions
-rw-r--r--assets/css/default.css7
-rw-r--r--themes/default/layouts/partials/following-list.html116
2 files changed, 66 insertions, 57 deletions
diff --git a/assets/css/default.css b/assets/css/default.css
index eede530..6a403c2 100644
--- a/assets/css/default.css
+++ b/assets/css/default.css
@@ -1528,6 +1528,13 @@ following-list aside {
border-radius: 1rem;
}
+web-ring aside footer,
+author-list aside footer,
+following-list aside footer {
+ background-color: #fefefe;
+ background-color: var(--background);
+}
+
web-ring aside {
padding: 1rem;
}
diff --git a/themes/default/layouts/partials/following-list.html b/themes/default/layouts/partials/following-list.html
index 6dbf6e8..e99a86b 100644
--- a/themes/default/layouts/partials/following-list.html
+++ b/themes/default/layouts/partials/following-list.html
@@ -10,68 +10,70 @@
<following-list>
<h1>Following</h1>
- {{ if $feeds }}
- <aside>
- {{- range first 3 (shuffle $feeds) -}}
- {{- $sources := where $.Site.RegularPages "Params.feed.source" . -}}
- {{- $via := where $.Site.RegularPages "Params.Author" $author.user -}}
- {{- $following := $via | intersect $sources -}}
+ <aside>
+ {{- range first 3 (shuffle $feeds) -}}
+ {{- $sources := where $.Site.RegularPages "Params.feed.source" . -}}
+ {{- $via := where $.Site.RegularPages "Params.Author" $author.user -}}
+ {{- $following := $via | intersect $sources -}}
- {{- range first 1 $following -}}
+ {{- range first 1 $following -}}
- {{- $href := or .Params.feed.home (print "http://" .Params.feed.domain) -}}
+ {{- $href := or .Params.feed.home (print "http://" .Params.feed.domain) -}}
- <micro-author>
- <micro-card>
- <micro-summary>
- <micro-thumbnail>
- <figure>
- <a
- title="{{ .Params.feed.name }}"
- href="{{ $href }}">
- <picture>
- <img
- width="64"
- height="64"
- alt="{{ .Params.feed.name }}"
- src="{{ .Params.feed.favicon }}"
- />
- </picture>
- </a>
- </figure>
- </micro-thumbnail>
- <micro-header>
- <h2>
- <b>{{ .Params.feed.name }}</b>
- </h2>
- <h3>
- <a
- title="{{ .Params.feed.name }}"
- href="{{ $href }}">
- @{{ .Params.feed.domain }}
- </a>
- </h3>
- <time
- title="{{ .Date | time.Format "Monday, January 2, 2006 at 15:04:05 MST" }}"
- datetime="{{ .Date | time.Format "2006-01-02T15:04:05Z" }}">
- {{ (.Date.Local | time.Format "3:04 PM Jan 2 2006") -}}
- </time>
- </micro-header>
- <a
- title="Follow {{ .Params.feed.name }}"
- href="{{ $href }}">
- {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/rss.svg")) }}
- <span>Follow</span>
- </a>
- </micro-summary>
- </micro-card>
- </micro-author>
- {{- end -}}
+ <micro-author>
+ <micro-card>
+ <micro-summary>
+ <micro-thumbnail>
+ <figure>
+ <a
+ title="{{ .Params.feed.name }}"
+ href="{{ $href }}">
+ <picture>
+ <img
+ width="64"
+ height="64"
+ alt="{{ .Params.feed.name }}"
+ src="{{ .Params.feed.favicon }}"
+ />
+ </picture>
+ </a>
+ </figure>
+ </micro-thumbnail>
+ <micro-header>
+ <h2>
+ <b>{{ .Params.feed.name }}</b>
+ </h2>
+ <h3>
+ <a
+ title="{{ .Params.feed.name }}"
+ href="{{ $href }}">
+ @{{ .Params.feed.domain }}
+ </a>
+ </h3>
+ <time
+ title="{{ .Date | time.Format "Monday, January 2, 2006 at 15:04:05 MST" }}"
+ datetime="{{ .Date | time.Format "2006-01-02T15:04:05Z" }}">
+ {{ (.Date.Local | time.Format "3:04 PM Jan 2 2006") -}}
+ </time>
+ </micro-header>
+ <a
+ title="Follow {{ .Params.feed.name }}"
+ href="{{ $href }}">
+ {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/rss.svg")) }}
+ <span>Follow</span>
+ </a>
+ </micro-summary>
+ </micro-card>
+ </micro-author>
+ {{- else -}}
+ <footer>
+ <code>No feeds found!</code>
+ </footer>
{{- end -}}
- </aside>
- {{ else }}
+ {{- else -}}
<footer>
<code>No feeds found!</code>
</footer>
- {{ end }}
+ {{- end -}}
+ </aside>
</following-list>