diff options
Diffstat (limited to 'themes/default/layouts/_default/section.following.html')
-rw-r--r-- | themes/default/layouts/_default/section.following.html | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/themes/default/layouts/_default/section.following.html b/themes/default/layouts/_default/section.following.html new file mode 100644 index 0000000..2bfcc2e --- /dev/null +++ b/themes/default/layouts/_default/section.following.html @@ -0,0 +1,75 @@ +{{- $parent := eq (len .Page.Ancestors) 1 -}} + +{{- $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 := $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> + <header> + <figure> + <a + title="{{ $distinct.FeedName }}" + href="{{ $href }}"> + <picture> + <img + width="64" + height="64" + alt="{{ $distinct.FeedName }}" + src="{{ $.Site.BaseURL }}{{ $favicon }}" + /> + </picture> + </a> + </figure> + </header> + <article> + <h2> + <b>{{ $distinct.FeedName }}</b> + </h2> + <h3> + <a + data-hover + title="{{ $distinct.FeedName }}" + href="{{ $href }}"> + @{{ $distinct.FeedSourceDomain }} + </a> + </h3> + <time + data-type="default" + title="{{ $distinct.FeedDateTitle }}" + datetime="{{ $distinct.FeedDateTime }}"> + {{ $distinct.FeedDate -}} + </time> + </article> + <a + title="Follow {{ $distinct.FeedName }}" + href="{{ $href }}"> + {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/tabler/rss.svg")) }} + <span>Feed</span> + </a> + </micro-card> + </micro-author> + + {{- end -}} + {{- end -}} +{{- end -}} |