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.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/following-list.html b/themes/default/layouts/partials/following-list.html
new file mode 100644
index 0000000..510d3d2
--- /dev/null
+++ b/themes/default/layouts/partials/following-list.html
@@ -0,0 +1,31 @@
+{{- $count := 0 -}}
+{{- $author := partial "function-authors-data.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>
+ <details
+ id="web-feeds"
+ data-expand="{{- $expand -}}"
+ >
+ <summary>
+ <h1>Web Feeds ({{ $count }})</h1>
+ </summary>
+ </details>
+ <aside>
+ {{- if and $author.feeds.rss (fileExists $feeds) -}}
+ {{- with $feeds = resources.Get $feeds -}}
+ {{- $feeds.Content | safeHTML -}}
+ {{- end -}}
+ {{- else -}}
+ <footer>
+ <code>No items found!</code>
+ </footer>
+ {{- end -}}
+ </aside>
+</following-list>