aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/web-ring.html
blob: 1d163afaf939b58ab7716a4736de0555bca9c127 (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
34
35
36
37
38
39
40
41
42
43
{{- $feeds := partial "function-generate-feeds.html" . -}}

<web-ring>
  <h1>Web Ring</h1>
    {{ if $feeds }}
    <aside>
      {{ range first 3 (uniq (sort $feeds "FeedDateTime" "desc")) }}
        <web-ring-item>
          <header>
            <a
              title="{{ .FeedLink }}"
              href="{{ .FeedLink }}">
              {{ .FeedTitle }}
            </a>
          </header>
          <time
            title="{{ .FeedDateTitle }}"
            datetime="{{ .FeedDateTime }}">
            {{ .FeedDate }}
          </time>
          <p>
            {{ "--" | markdownify }}
            {{ if gt (len .FeedDescriptionShort) (len .FeedContentShort) -}}
              {{ or .FeedDescriptionShort .FeedTitle }}
            {{- else -}}
              {{ or .FeedContentShort .FeedTitle }}
            {{- end }}
            &mdash;
          </p>
          <a
            title="{{ .FeedSourceDescription }}"
            href="{{ or .FeedSourceHome .FeedSourceLink }}">
            {{ .FeedSourceTitle }}
          </a>
        </web-ring-item>
      {{ end }}
    </aside>
  {{ else }}
    <footer>
      <code>No content found!</code>
    </footer>
  {{ end }}
</web-ring>