aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/meta-word-count.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-07-09 10:13:53 -0400
committertdro <tdro@noreply.example.com>2022-07-09 10:13:53 -0400
commit8e1256308c9c24fa45783a7c0be7ff74a33906ee (patch)
treeb3c62a2f4eb6bfb0a0ac0c8e7563507a2677df6d /themes/default/layouts/partials/meta-word-count.html
parent2b0c90bcf35d2a68a4ac4aabec6e9c04fd6e234f (diff)
downloadcanory-8e1256308c9c24fa45783a7c0be7ff74a33906ee.tar.gz
canory-8e1256308c9c24fa45783a7c0be7ff74a33906ee.tar.bz2
canory-8e1256308c9c24fa45783a7c0be7ff74a33906ee.zip
themes/default/layouts/partials/card-meta: Add icons
Dry up and normalize white spaces.
Diffstat (limited to 'themes/default/layouts/partials/meta-word-count.html')
-rw-r--r--themes/default/layouts/partials/meta-word-count.html34
1 files changed, 21 insertions, 13 deletions
diff --git a/themes/default/layouts/partials/meta-word-count.html b/themes/default/layouts/partials/meta-word-count.html
index d4a4065..1c44c78 100644
--- a/themes/default/layouts/partials/meta-word-count.html
+++ b/themes/default/layouts/partials/meta-word-count.html
@@ -1,14 +1,22 @@
-{{ $author := index .Site.Data ((or .Params.author .Site.Author.default.user) | default "default") }}
-{{ $limit := $author.wordlimit }}
-{{ $wordLimit := gt .WordCount $limit }}
-{{ $overLimit := sub .WordCount $limit }}
+<micro-metadata-wordcount>
+ {{- $author := index .Site.Data ((or .Params.author .Site.Author.default.user) | default "default") -}}
+ {{- $limit := $author.wordlimit -}}
+ {{- $wordLimit := gt .WordCount $limit -}}
+ {{- $overLimit := sub .WordCount $limit -}}
+ {{- safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/file-text.svg")) -}}
-<word-limit title="{{- if $wordLimit -}}{{ $overLimit }} words over the limit{{ else }} {{ .WordCount }} words {{ end }}">
- <word-count>
- {{- if $wordLimit -}}
- <em>{{ .WordCount }}</em>
- {{- else -}}
- {{ .WordCount }}
- {{- end -}}
- </word-count>/{{ $limit }} words
-</word-limit>
+ <word-limit title="{{- if $wordLimit -}} {{ $overLimit }} words over the limit {{- else -}} {{ .WordCount }} words {{- end -}}">
+ <word-count>
+ {{- if $wordLimit -}}
+ <em>{{ .WordCount }}</em>
+ {{- else -}}
+ {{ .WordCount }}
+ {{- end -}}
+ /{{ $limit }} words
+{{- /* This comment removes trailing newlines and white spaces. */ -}}
+ </word-count>
+{{- /* This comment removes trailing newlines and white spaces. */ -}}
+ </word-limit>
+{{- /* This comment removes trailing newlines and white spaces. */ -}}
+</micro-metadata-wordcount>
+{{- /* This comment removes trailing newlines and white spaces. */ -}}