diff options
Diffstat (limited to 'layouts/shortcodes/typewriter.html')
| -rw-r--r-- | layouts/shortcodes/typewriter.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/layouts/shortcodes/typewriter.html b/layouts/shortcodes/typewriter.html new file mode 100644 index 0000000..a16cfbb --- /dev/null +++ b/layouts/shortcodes/typewriter.html @@ -0,0 +1,14 @@ +{{ $random := delimit (seq 9 | shuffle) "" }} +{{ $tpid := md5 $random }} + +<div id = a{{ $tpid }}></div> + +<script src="https://unpkg.com/typewriter-effect@latest/dist/core.js"></script> + +<script type="text/javascript"> + const instance = new Typewriter('#a{{ $tpid }}', { + strings: '{{ .Inner | replaceRE "\n" "<br>" | safeHTML }}', + delay: 20, + autoStart: true, + }); +</script>
\ No newline at end of file |
