aboutsummaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-12-09 19:23:47 -0500
committertdro <tdro@noreply.example.com>2022-12-09 19:23:47 -0500
commita73e8feed622e912e085a0931b2268c7a51f56b1 (patch)
tree9c6e9ff9cd3e26d115edfbcf740f8f842233b5bb /themes
parentffd19ef330a142f6d2cb85a3bd4a5492013da5cc (diff)
downloadcanory-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.html11
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. */ -}}