diff options
author | tdro <tdro@noreply.example.com> | 2024-03-08 14:01:03 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2024-03-08 14:01:03 -0500 |
commit | 1f7dadf19ecc3f7f8072eb7bb692584b8fbf529c (patch) | |
tree | 3225a1cff6a0e4176055d3477ac2cd0e57af4773 /themes/default/layouts/partials/meta-wordcount.html | |
parent | 2d3101ff48daa18f990e36c63cc8729d2da45aa3 (diff) | |
download | canory-1f7dadf19ecc3f7f8072eb7bb692584b8fbf529c.tar.gz canory-1f7dadf19ecc3f7f8072eb7bb692584b8fbf529c.tar.bz2 canory-1f7dadf19ecc3f7f8072eb7bb692584b8fbf529c.zip |
themes/default/layouts/partials: Merge menu
Diffstat (limited to 'themes/default/layouts/partials/meta-wordcount.html')
-rw-r--r-- | themes/default/layouts/partials/meta-wordcount.html | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/meta-wordcount.html b/themes/default/layouts/partials/meta-wordcount.html new file mode 100644 index 0000000..5fd5451 --- /dev/null +++ b/themes/default/layouts/partials/meta-wordcount.html @@ -0,0 +1,33 @@ +{{- $author := partial "function-authors-data.html" . -}} +{{- $limit := $author.wordlimit -}} +{{- $wordLimit := gt .WordCount $limit -}} +{{- $overLimit := sub .WordCount $limit -}} +{{- $bitCount := lang.FormatNumberCustom 0 (len .Content) -}} + +<micro-metadata-wordcount +title=" +{{- if $wordLimit -}} + {{ $overLimit }} words over the limit + {{- else -}} + {{ .WordCount }} words +{{- end }} +{{ $bitCount }} bits +{{- /* 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 -}} + <em>{{ .WordCount }}</em> + {{- else -}} + <sup>{{ .WordCount }}</sup> + {{- end -}} + /<sub>{{ $limit }}</sub> 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. */ -}} |