diff options
author | tdro <tdro@noreply.example.com> | 2022-12-09 19:23:47 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-12-09 19:23:47 -0500 |
commit | a73e8feed622e912e085a0931b2268c7a51f56b1 (patch) | |
tree | 9c6e9ff9cd3e26d115edfbcf740f8f842233b5bb /themes | |
parent | ffd19ef330a142f6d2cb85a3bd4a5492013da5cc (diff) | |
download | canory-a73e8feed622e912e085a0931b2268c7a51f56b1.tar.gz canory-a73e8feed622e912e085a0931b2268c7a51f56b1.tar.bz2 canory-a73e8feed622e912e085a0931b2268c7a51f56b1.zip |
themes/default/layouts/shortcodes/animate: Add animate
Diffstat (limited to 'themes')
-rw-r--r-- | themes/default/layouts/shortcodes/animate.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/themes/default/layouts/shortcodes/animate.html b/themes/default/layouts/shortcodes/animate.html new file mode 100644 index 0000000..15b0fbc --- /dev/null +++ b/themes/default/layouts/shortcodes/animate.html @@ -0,0 +1,11 @@ +{{- $type := default "default" (.Get "type" | default (.Get 0)) -}} +{{- $text := default "animate" (.Get "text" | default (.Get 1)) -}} + +{{- $letters := split ($text | markdownify) "" -}} + +<text-animation {{ $type }}> +{{- range $value, $letter := $letters -}} + <span style="--frame:{{ $value }}">{{ $letter }}</span> +{{- end -}} +</text-animation> +{{- /* This comment removes trailing newlines and white spaces. */ -}} |