aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/_default/section.following.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/_default/section.following.html')
-rw-r--r--themes/default/layouts/_default/section.following.html60
1 files changed, 35 insertions, 25 deletions
diff --git a/themes/default/layouts/_default/section.following.html b/themes/default/layouts/_default/section.following.html
index 48afa7d..2bfcc2e 100644
--- a/themes/default/layouts/_default/section.following.html
+++ b/themes/default/layouts/_default/section.following.html
@@ -1,23 +1,32 @@
-{{- $sources := slice -}}
-{{- $author := partial "function-authors-data.html" . -}}
-{{- $feeds := partial "function-generate-feeds.html" . -}}
+{{- $parent := eq (len .Page.Ancestors) 1 -}}
-{{- range $author.feeds.rss -}}
- {{- $data := split . " " -}}
- {{- $url := delimit (first 1 $data) "" -}}
- {{- $sources = $sources | append (string $url) -}}
-{{- end -}}
+{{- $modified := partial "function-page-modified.html"
+ (dict
+ "Context" .
+ "Disable" true
+ )
+-}}
+
+{{- if (and $parent $modified) -}}
+ {{- $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) -}}
+ {{- range $source := $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" -}}
+ {{- $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>
+ <micro-author>
+ <micro-card>
+ <header>
<figure>
<a
title="{{ $distinct.FeedName }}"
@@ -32,8 +41,8 @@
</picture>
</a>
</figure>
- </micro-thumbnail>
- <micro-header>
+ </header>
+ <article>
<h2>
<b>{{ $distinct.FeedName }}</b>
</h2>
@@ -46,20 +55,21 @@
</a>
</h3>
<time
+ data-type="default"
title="{{ $distinct.FeedDateTitle }}"
datetime="{{ $distinct.FeedDateTime }}">
- {{ $distinct.FeedDateTime | time.Format "15:04 Jan 2 2006" -}}
+ {{ $distinct.FeedDate -}}
</time>
- </micro-header>
+ </article>
<a
title="Follow {{ $distinct.FeedName }}"
href="{{ $href }}">
- {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/rss.svg")) }}
- <span>Follow</span>
+ {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/tabler/rss.svg")) }}
+ <span>Feed</span>
</a>
- </micro-summary>
- </micro-card>
- </micro-author>
+ </micro-card>
+ </micro-author>
+ {{- end -}}
{{- end -}}
{{- end -}}