diff options
Diffstat (limited to 'themes/default/layouts/partials/following-list.html')
-rw-r--r-- | themes/default/layouts/partials/following-list.html | 53 |
1 files changed, 53 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..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-list> + <h1>Following</h1> + <aside> + {{- range $author := first 3 (shuffle (uniq $following)) -}} + <micro-author> + <micro-card> + <micro-summary> + <micro-thumbnail> + <figure> + <a title="{{ .Description }}" href="http://{{ .Domain }}"> + <picture> + <img + alt="{{ .Name }}" + width="64" + height="64" + src="{{ print "/data/media/favicon." .Domain ".png" }}" + /> + </picture> + </a> + </figure> + </micro-thumbnail> + <micro-header> + <h2><b>{{ .Name }}</b></h2> + <h3><a title="{{ .Name }}" href="http://{{ .Domain }}">@{{ .Domain }}</a></h3> + </micro-header> + <a title="Follow" href="http://{{ .Domain }}"> + {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/rss.svg")) }} + <span>Follow</span> + </a> + </micro-summary> + </micro-card> + </micro-author> + {{- end -}} + </aside> + {{- if not $following -}} + <footer> + <code>No feeds found!</code> + </footer> + {{- end -}} +</following-list> |