blob: c04d55c0422a4155bd747e4d1f20f49a7689abde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
{{- $count := 0 -}}
{{- $author := partial "function-authors-data.html" . -}}
{{- $feeds := print "public/" $author.user "/following.html" -}}
{{- $hash := print (truncate 4 "" (sha256 .RelPermalink)) (truncate 4 "" (sha256 .Section)) -}}
{{- with $items := $author.feeds.rss -}}
{{- $count = len $items -}}
{{- end -}}
{{- $expand := cond (gt $count 3) "more" "less" -}}
<following-list>
<details
id="web-feeds-{{ $hash }}"
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>
|