aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2023-08-03 21:07:07 -0400
committertdro <tdro@noreply.example.com>2023-08-07 20:51:07 -0400
commit4f5102276eefe03746db7978ab5d9c52653816f4 (patch)
tree54cc94dc651a282988bdef9d1a1b89ddbea08985 /themes/default/layouts
parent81235874cb868df18e5f55ec6f6619ce8f0ff331 (diff)
downloadcanory-4f5102276eefe03746db7978ab5d9c52653816f4.tar.gz
canory-4f5102276eefe03746db7978ab5d9c52653816f4.tar.bz2
canory-4f5102276eefe03746db7978ab5d9c52653816f4.zip
themes/default/layouts/_default/section.following: Let it go
Remove shuffle and allow toggling
Diffstat (limited to 'themes/default/layouts')
-rw-r--r--themes/default/layouts/_default/section.following.html2
-rw-r--r--themes/default/layouts/partials/following-list.html18
2 files changed, 18 insertions, 2 deletions
diff --git a/themes/default/layouts/_default/section.following.html b/themes/default/layouts/_default/section.following.html
index 7057e97..9a44478 100644
--- a/themes/default/layouts/_default/section.following.html
+++ b/themes/default/layouts/_default/section.following.html
@@ -11,7 +11,7 @@
{{- $sources = $sources | append (string $url) -}}
{{- end -}}
- {{- range $source := (first 3 (shuffle $sources)) -}}
+ {{- range $source := $sources -}}
{{- range $distinct := first 1 (where $feeds "FeedSourceLink" "eq" $source) -}}
{{- $href := or $distinct.FeedHome (print "http://" $distinct.FeedSourceDomain) -}}
diff --git a/themes/default/layouts/partials/following-list.html b/themes/default/layouts/partials/following-list.html
index 9a728d4..6682a72 100644
--- a/themes/default/layouts/partials/following-list.html
+++ b/themes/default/layouts/partials/following-list.html
@@ -1,8 +1,24 @@
{{- $author := partial "function-authors-data.html" . -}}
{{- $following := print "public/" $author.user "/following.html" -}}
+{{- $count := 0 -}}
+
+{{- with $items := $author.feeds.rss -}}
+ {{- $count = len $items -}}
+{{- end -}}
+
+{{- $expand := cond (gt $count 3) "more" "less" -}}
<following-list>
- <h1>Following</h1>
+ <details
+ id="following"
+ data-expand="{{- $expand -}}"
+ >
+ <summary>
+ <h1>
+ Following ({{ $count }})
+ </h1>
+ </summary>
+ </details>
<aside>
{{- if and $author.feeds.rss (fileExists $following) -}}
{{- with $following = resources.Get $following -}}