blob: 15b0fbc3caae3040169990636def39ccbd9089d9 (
plain)
1
2
3
4
5
6
7
8
9
10
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. */ -}}
|