diff options
author | tdro <tdro@noreply.example.com> | 2022-07-10 04:10:02 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-07-10 04:10:02 -0400 |
commit | 28f63d959f5c0c6ff5282a4c25e5da6f11435c8a (patch) | |
tree | 148fe0db0f58e09bfebacda6fdfd414e0f52656f /themes/default/layouts/partials/meta-word-count.html | |
parent | 8214bbce48e2079b9a2101ae5f2acc8429cbda80 (diff) | |
download | canory-28f63d959f5c0c6ff5282a4c25e5da6f11435c8a.tar.gz canory-28f63d959f5c0c6ff5282a4c25e5da6f11435c8a.tar.bz2 canory-28f63d959f5c0c6ff5282a4c25e5da6f11435c8a.zip |
themes/default/layouts/partials/meta-word-count: Add bit count
Diffstat (limited to 'themes/default/layouts/partials/meta-word-count.html')
-rw-r--r-- | themes/default/layouts/partials/meta-word-count.html | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/themes/default/layouts/partials/meta-word-count.html b/themes/default/layouts/partials/meta-word-count.html index 6805563..e88fec6 100644 --- a/themes/default/layouts/partials/meta-word-count.html +++ b/themes/default/layouts/partials/meta-word-count.html @@ -3,9 +3,18 @@ {{- $limit := $author.wordlimit -}} {{- $wordLimit := gt .WordCount $limit -}} {{- $overLimit := sub .WordCount $limit -}} + {{- $bitCount := lang.FormatNumberCustom 0 (len .Content) -}} {{- safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/file-text.svg")) -}} - <word-limit title="{{- if $wordLimit -}} {{ $overLimit }} words over the limit {{- else -}} {{ .WordCount }} words {{- end -}}"> + <word-limit +title=" +{{- if $wordLimit -}} + {{ $overLimit }} words over the limit + {{- else -}} + {{ .WordCount }} words +{{- end }} +{{ $bitCount }} bits +"> <word-count> {{- if $wordLimit -}} <em>{{ .WordCount }}</em> |