diff options
| author | tdro <tdro@noreply.example.com> | 2024-10-30 00:00:00 +0000 |
|---|---|---|
| committer | tdro <tdro@noreply.example.com> | 2024-10-30 00:00:00 +0000 |
| commit | fac0f7c9595031a1922abd5ae93166a8c8969c77 (patch) | |
| tree | ecd246d26e0663d21e6b0f1390f868f469c95644 | |
| parent | c3ec8cd2f457cc1b869cb8a9f18da8a8a04c741c (diff) | |
| download | canory-fac0f7c9595031a1922abd5ae93166a8c8969c77.tar.gz canory-fac0f7c9595031a1922abd5ae93166a8c8969c77.tar.bz2 canory-fac0f7c9595031a1922abd5ae93166a8c8969c77.zip | |
themes/default/layouts/partials/meta-wordcount: Fix units
| -rw-r--r-- | themes/default/layouts/partials/meta-wordcount.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/themes/default/layouts/partials/meta-wordcount.html b/themes/default/layouts/partials/meta-wordcount.html index b6ec95e..6448dcd 100644 --- a/themes/default/layouts/partials/meta-wordcount.html +++ b/themes/default/layouts/partials/meta-wordcount.html @@ -1,24 +1,24 @@ {{- $author := partial "function-authors-data.html" . -}} {{- $limit := $author.wordlimit -}} -{{- $wordLimit := gt .WordCount $limit -}} -{{- $overLimit := sub .WordCount $limit -}} -{{- $bitCount := lang.FormatNumberCustom 0 (len .Content) -}} +{{- $exceeded := gt .WordCount $limit -}} +{{- $excess := sub .WordCount $limit -}} +{{- $total := lang.FormatNumberCustom 0 (len .Content) -}} <meta-wordcount title=" -{{- if $wordLimit -}} - {{ $overLimit }} words over the limit +{{- if $exceeded -}} + {{ $excess }} words over the limit {{- else -}} {{ .WordCount }} words {{- end }} -{{ $bitCount }} bits +{{ $total }} bytes {{- /* This comment removes trailing newlines and white spaces. */ -}} "> {{- /* This comment removes trailing newlines and white spaces. */ -}} <word-limit> {{- safeHTML (readFile (print (partial "function-paths.html").static "/icons/tabler/notes.svg")) -}} <word-count> - {{- if $wordLimit -}} + {{- if $exceeded -}} <em>{{ .WordCount }}</em> {{- else -}} <sup>{{ .WordCount }}</sup> |
