aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/following-list.html
blob: 4cdb69c091b6aca626bf0b40fa188676e61863c4 (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
33
{{- $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>
  <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 -}}
    {{- $following.Content | safeHTML -}}
   {{- end -}}
  {{- else -}}
    <footer>
      <code>No items found!</code>
    </footer>
  {{- end -}}
  </aside>
</following-list>