This commit is contained in:
Chris Cochrun 2025-05-21 11:05:44 -05:00
parent bae61d7968
commit c11045e50b

View file

@ -1,13 +1,14 @@
{% set id = "typeit-{% get_random(0, 100) %}" %}
{% 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>
<h2 id="type">{{ body }}</h2>
<{% if tag %}{{ tag }}{% else %}div{% endif %} id="{{ id }}">{{ body }}</{% if tag %}{{ tag }}{% else %}div{% endif %}>
<script>
console.log("type");
document.addEventListener("DOMContentLoaded", function () {
new TypeIt("#type", {
strings: {{ body }},
new TypeIt("#{{ id }}", {
strings: ["", {{ body }}, ""],
speed: 100,
lifeLike: true,
startDelay: 0,