diff options
author | tdro <tdro@noreply.example.com> | 2022-07-24 18:12:43 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-07-24 18:12:43 -0400 |
commit | 5eb2116060a84c915f9a4dba1d671f96e856f2eb (patch) | |
tree | fc9b8897bb059561483248ca13b627846fff5455 /themes | |
parent | fcf7037224c6cf512630d5dacb1163061e47d4eb (diff) | |
download | canory-5eb2116060a84c915f9a4dba1d671f96e856f2eb.tar.gz canory-5eb2116060a84c915f9a4dba1d671f96e856f2eb.tar.bz2 canory-5eb2116060a84c915f9a4dba1d671f96e856f2eb.zip |
themes/default/layouts/partials: Add following aside
Add basic following aside for now.
Diffstat (limited to 'themes')
-rw-r--r-- | themes/default/layouts/_default/list.html | 3 | ||||
-rw-r--r-- | themes/default/layouts/partials/author-user.html | 2 | ||||
-rw-r--r-- | themes/default/layouts/partials/following-list.html | 53 | ||||
-rw-r--r-- | themes/default/layouts/partials/navigator-right.html | 1 |
4 files changed, 57 insertions, 2 deletions
diff --git a/themes/default/layouts/_default/list.html b/themes/default/layouts/_default/list.html index 5cc563b..8f3c5f5 100644 --- a/themes/default/layouts/_default/list.html +++ b/themes/default/layouts/_default/list.html @@ -30,7 +30,8 @@ {{ end }} {{ range first 1 (where .Site.Pages "Params.Author" .Site.Author.default.webring) }} - {{- partial "web-ring.html" . -}} + {{- partial "following-list.html" . -}} + {{- partial "web-ring.html" . -}} {{ end }} {{ end }} diff --git a/themes/default/layouts/partials/author-user.html b/themes/default/layouts/partials/author-user.html index 797610b..6c6613e 100644 --- a/themes/default/layouts/partials/author-user.html +++ b/themes/default/layouts/partials/author-user.html @@ -5,4 +5,4 @@ {{- $author = index .Site.Data ((or .Params.author .Site.Author.default.user) | default "default") -}} {{- end -}} -{{- $author.user | markdownify -}} +{{- $author.user -}} diff --git a/themes/default/layouts/partials/following-list.html b/themes/default/layouts/partials/following-list.html new file mode 100644 index 0000000..3adb2fd --- /dev/null +++ b/themes/default/layouts/partials/following-list.html @@ -0,0 +1,53 @@ +{{- $following := slice -}} +{{- range (where .Site.Pages "Params.Author" (partial "author-user.html" .)) -}} + {{- if .Params.feed -}} + {{- + $following = $following | append (dict + "Name" .Params.feed.name + "Domain" .Params.feed.domain + "Description" .Params.feed.description + ) + -}} + {{- end -}} +{{- end -}} + +<following-list> + <h1>Following</h1> + <aside> + {{- range $author := first 3 (shuffle (uniq $following)) -}} + <micro-author> + <micro-card> + <micro-summary> + <micro-thumbnail> + <figure> + <a title="{{ .Description }}" href="http://{{ .Domain }}"> + <picture> + <img + alt="{{ .Name }}" + width="64" + height="64" + src="{{ print "/data/media/favicon." .Domain ".png" }}" + /> + </picture> + </a> + </figure> + </micro-thumbnail> + <micro-header> + <h2><b>{{ .Name }}</b></h2> + <h3><a title="{{ .Name }}" href="http://{{ .Domain }}">@{{ .Domain }}</a></h3> + </micro-header> + <a title="Follow" href="http://{{ .Domain }}"> + {{ safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/rss.svg")) }} + <span>Follow</span> + </a> + </micro-summary> + </micro-card> + </micro-author> + {{- end -}} + </aside> + {{- if not $following -}} + <footer> + <code>No feeds found!</code> + </footer> + {{- end -}} +</following-list> diff --git a/themes/default/layouts/partials/navigator-right.html b/themes/default/layouts/partials/navigator-right.html index abe0d28..fc598c2 100644 --- a/themes/default/layouts/partials/navigator-right.html +++ b/themes/default/layouts/partials/navigator-right.html @@ -1,3 +1,4 @@ {{- partial "author-list.html" . -}} {{- partial "gallery-images.html" . -}} +{{- partial "following-list.html" . -}} {{- partial "web-ring.html" . -}} |