aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/meta-word-count.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-07-10 04:10:02 -0400
committertdro <tdro@noreply.example.com>2022-07-10 04:10:02 -0400
commit28f63d959f5c0c6ff5282a4c25e5da6f11435c8a (patch)
tree148fe0db0f58e09bfebacda6fdfd414e0f52656f /themes/default/layouts/partials/meta-word-count.html
parent8214bbce48e2079b9a2101ae5f2acc8429cbda80 (diff)
downloadcanory-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.html11
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>