diff options
| author | tdro <tdro@noreply.example.com> | 2024-06-13 00:00:00 +0000 |
|---|---|---|
| committer | tdro <tdro@noreply.example.com> | 2024-06-13 00:00:00 +0000 |
| commit | 50a9bb8db165018b093a05c4040149d6a8c8a31e (patch) | |
| tree | de867ce53a48831f945cc1e611aa8d6066d4b98b | |
| parent | d289dc4c2e10b0d4debcff3780c6e893dc236e5f (diff) | |
| download | canory-50a9bb8db165018b093a05c4040149d6a8c8a31e.tar.gz canory-50a9bb8db165018b093a05c4040149d6a8c8a31e.tar.bz2 canory-50a9bb8db165018b093a05c4040149d6a8c8a31e.zip | |
themes/default/layouts/partials/profile: Add feed title
| -rw-r--r-- | themes/default/layouts/partials/profile.html | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/themes/default/layouts/partials/profile.html b/themes/default/layouts/partials/profile.html index e0c339b..ad874bc 100644 --- a/themes/default/layouts/partials/profile.html +++ b/themes/default/layouts/partials/profile.html @@ -1,5 +1,15 @@ +{{- $feed := 0 -}} +{{- $feeds := "Feeds" -}} {{- $author := partial "function-authors-data.html" . -}} +{{- with $author.feeds.rss -}} + {{- $feed = len . -}} +{{- end -}} + +{{- if eq $feed 1 -}} + {{- $feeds = $feeds | singularize -}} +{{- end -}} + <profile-box> <picture data-type="banner"> {{ partial "author-header.html" . }} @@ -32,9 +42,11 @@ {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/feather/clock.svg")) }} <span>{{- $author.epoch | markdownify -}}</span> </p> - <p> + <p title="Watching {{ $feed }} {{ $feeds }}"> {{ safeHTML (readFile (print (partial "function-paths.html").static "/icons/tabler/rss.svg")) }} - <span><b>{{ with $author.feeds.rss }}{{ len . }}{{ else }} 0 {{ end }}</b> Feeds</span> + <span> + <b>{{ $feed }}</b> {{ $feeds }} + </span> </p> </footer> </profile-box> |
