aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/following-list.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/partials/following-list.html')
-rw-r--r--themes/default/layouts/partials/following-list.html26
1 files changed, 21 insertions, 5 deletions
diff --git a/themes/default/layouts/partials/following-list.html b/themes/default/layouts/partials/following-list.html
index 165d699..510d3d2 100644
--- a/themes/default/layouts/partials/following-list.html
+++ b/themes/default/layouts/partials/following-list.html
@@ -1,14 +1,30 @@
+{{- $count := 0 -}}
{{- $author := partial "function-authors-data.html" . -}}
-{{- $following := print "public/" $author.user "/following.html" -}}
+{{- $feeds := print "public/" .Section "/following.html" -}}
+
+{{- with $items := $author.feeds.rss -}}
+ {{- $count = len $items -}}
+{{- end -}}
+
+{{- $expand := cond (gt $count 3) "more" "less" -}}
<following-list>
- <h1>Following</h1>
+ <details
+ id="web-feeds"
+ data-expand="{{- $expand -}}"
+ >
+ <summary>
+ <h1>Web Feeds ({{ $count }})</h1>
+ </summary>
+ </details>
<aside>
- {{- if and $author.feeds.rss (fileExists $following) -}}
- {{- (resources.Get $following).Content | safeHTML -}}
+ {{- if and $author.feeds.rss (fileExists $feeds) -}}
+ {{- with $feeds = resources.Get $feeds -}}
+ {{- $feeds.Content | safeHTML -}}
+ {{- end -}}
{{- else -}}
<footer>
- <code>No feeds found!</code>
+ <code>No items found!</code>
</footer>
{{- end -}}
</aside>