fixing the typeit

This commit is contained in:
Chris Cochrun 2025-05-21 11:41:34 -05:00
parent c11045e50b
commit a6862bec83

View file

@ -1,20 +1,15 @@
{% set id = get_random(start=0, end=100) %}
{% set id = "typeit-" ~ id %}
<script src="https://unpkg.com/typeit@8.7.1/dist/index.umd.js"></script>
<script src="https://unpkg.com/typeit/dist/index.umd.js"></script>
<{% if tag %}{{ tag }}{% else %}div{% endif %} id="{{ id }}">{{ body }}</{% if tag %}{{ tag }}{% else %}div{% endif %}>
<{% if tag %}{{ tag }}{% else %}div{% endif %} id="{{ id }}"></{% if tag %}{{ tag }}{% else %}div{% endif %}>
<script>
console.log("type");
document.addEventListener("DOMContentLoaded", function () {
new TypeIt("#{{ id }}", {
strings: ["", {{ body }}, ""],
new TypeIt('#{{ id }}', {
strings: ['{{ body }}'],
speed: 100,
lifeLike: true,
startDelay: 0,
breakLines: true,
waitUntilVisible: true,
loop: false
}).go();
});
</script>