diff options
author | tdro <tdro@noreply.example.com> | 2022-07-09 10:13:53 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-07-09 10:13:53 -0400 |
commit | 8e1256308c9c24fa45783a7c0be7ff74a33906ee (patch) | |
tree | b3c62a2f4eb6bfb0a0ac0c8e7563507a2677df6d /themes/default/layouts/partials/meta-read-time.html | |
parent | 2b0c90bcf35d2a68a4ac4aabec6e9c04fd6e234f (diff) | |
download | canory-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-read-time.html')
-rw-r--r-- | themes/default/layouts/partials/meta-read-time.html | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/themes/default/layouts/partials/meta-read-time.html b/themes/default/layouts/partials/meta-read-time.html index b3b1839..53e541f 100644 --- a/themes/default/layouts/partials/meta-read-time.html +++ b/themes/default/layouts/partials/meta-read-time.html @@ -1,10 +1,17 @@ -{{- $seconds := mul (div .WordCount 180.0) 60.0 -}} -{{- $seconds = printf "%.0f" $seconds -}} +<micro-metadata-readtime> + {{- $seconds := mul (div .WordCount 180.0) 60.0 -}} + {{- $seconds = printf "%.0f" $seconds -}} -{{- if eq $seconds "0" -}} - {{- $seconds = "1" -}} -{{- end -}} + {{- if eq $seconds "0" -}} + {{- $seconds = "1" -}} + {{- end -}} -<read-time title="Takes {{ $seconds }} second{{- if not (eq $seconds "1") -}}s{{- end }} to read"> - {{ $seconds }} sec -</read-time> + {{- safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/clock.svg")) -}} + + <read-time title="Takes {{ $seconds }} second{{- if not (eq $seconds "1") -}}s{{- end }} to read"> + {{ $seconds }} sec +{{- /* This comment removes trailing newlines and white spaces. */ -}} + </read-time> +{{- /* This comment removes trailing newlines and white spaces. */ -}} +</micro-metadata-readtime> +{{- /* This comment removes trailing newlines and white spaces. */ -}} |