diff options
author | tdro <tdro@noreply.example.com> | 2022-10-20 22:05:41 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-10-20 22:05:41 -0400 |
commit | f804191de73059f7112764af0b8c625d06fec61a (patch) | |
tree | 79e96feac4c3db35b22ae6451a2e4eb0f6f00d54 /themes/default/layouts/partials/web-ring.html | |
parent | 5537b61e597dba47b5cd69c28268612e7eb6deb5 (diff) | |
download | canory-f804191de73059f7112764af0b8c625d06fec61a.tar.gz canory-f804191de73059f7112764af0b8c625d06fec61a.tar.bz2 canory-f804191de73059f7112764af0b8c625d06fec61a.zip |
themes/default/layouts/partials/web-ring: Avoid extra markup with feed function return
Diffstat (limited to 'themes/default/layouts/partials/web-ring.html')
-rw-r--r-- | themes/default/layouts/partials/web-ring.html | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/themes/default/layouts/partials/web-ring.html b/themes/default/layouts/partials/web-ring.html index c3d73b4..8228fbd 100644 --- a/themes/default/layouts/partials/web-ring.html +++ b/themes/default/layouts/partials/web-ring.html @@ -1 +1,37 @@ -{{ partial "generate-feeds" . }} +{{- $feeds := partial "function-generate-feeds.html" . -}} + +<web-ring> + <h1>Web Ring</h1> + <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 }} + — + </p> + <a + title="{{ .FeedSourceDescription }}" + href="{{ or .FeedSourceHome .FeedSourceLink }}"> + {{ .FeedSourceTitle }} + </a> + </web-ring-item> + {{ end }} + </aside> +</web-ring> |