blob: 48afa7d60ba7b0b5f67b6edc6d3ea1988596b5c3 (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
{{- $sources := slice -}}
{{- $author := partial "function-authors-data.html" . -}}
{{- $feeds := partial "function-generate-feeds.html" . -}}
{{- range $author.feeds.rss -}}
{{- $data := split . " " -}}
{{- $url := delimit (first 1 $data) "" -}}
{{- $sources = $sources | append (string $url) -}}
{{- end -}}
{{- range $source := (first 3 (shuffle $sources)) -}}
{{- range $distinct := first 1 (where $feeds "FeedSourceLink" "eq" $source) -}}
{{- $href := or $distinct.FeedHome (print "http://" $distinct.FeedSourceDomain) -}}
{{- $favicon := print "/" (partial "function-paths.html").media "/favicon." (.FeedSourceLink | anchorize) ".png" -}}
<micro-author>
<micro-card>
<micro-summary>
<micro-thumbnail>
<figure>
<a
title="{{ $distinct.FeedName }}"
href="{{ $href }}">
<picture>
<img
width="64"
height="64"
alt="{{ $distinct.FeedName }}"
src="{{ $.Site.BaseURL }}{{ $favicon }}"
/>
</picture>
</a>
</figure>
</micro-thumbnail>
<micro-header>
<h2>
<b>{{ $distinct.FeedName }}</b>
</h2>
<h3>
<a
data-hover
title="{{ $distinct.FeedName }}"
href="{{ $href }}">
@{{ $distinct.FeedSourceDomain }}
</a>
</h3>
<time
title="{{ $distinct.FeedDateTitle }}"
datetime="{{ $distinct.FeedDateTime }}">
{{ $distinct.FeedDateTime | time.Format "15:04 Jan 2 2006" -}}
</time>
</micro-header>
<a
title="Follow {{ $distinct.FeedName }}"
href="{{ $href }}">
{{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/rss.svg")) }}
<span>Follow</span>
</a>
</micro-summary>
</micro-card>
</micro-author>
{{- end -}}
{{- end -}}
|