home: fix js not being able to load after routing through htmx
This commit is contained in:
parent
ec8a28a230
commit
c8d03cf709
2 changed files with 27 additions and 26 deletions
|
|
@ -216,7 +216,6 @@ table {
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
|
|
||||||
background-image: url(assets/images/tiledbgpink.webp);
|
background-image: url(assets/images/tiledbgpink.webp);
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
|
|
|
||||||
|
|
@ -91,15 +91,15 @@
|
||||||
|
|
||||||
<!-- I know I know but I need it for this pretty rainbow flagish animation -->
|
<!-- I know I know but I need it for this pretty rainbow flagish animation -->
|
||||||
<script>
|
<script>
|
||||||
|
(function() {
|
||||||
<!-- For rainbow text -->
|
<!-- For rainbow text -->
|
||||||
const el = document.querySelector('woopwoop');
|
const el = document.querySelector('woopwoop');
|
||||||
|
if (!el) return;
|
||||||
const text = el.textContent;
|
const text = el.textContent;
|
||||||
el.innerHTML = text.split('').map((ch, i) =>
|
el.innerHTML = text.split('').map((ch, i) =>
|
||||||
`<span style="animation-delay: ${i * 0.08}s">${ch === ' ' ? ' ' : ch}</span>`
|
`<span style="animation-delay: ${i * 0.08}s">${ch === ' ' ? ' ' : ch}</span>`
|
||||||
).join('');
|
).join('');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const BIBOU_QUOTES = {{bibou_quotes| tojson | safe }};
|
const BIBOU_QUOTES = {{bibou_quotes| tojson | safe }};
|
||||||
|
|
||||||
const txtEl = document.querySelector('bibou-text');
|
const txtEl = document.querySelector('bibou-text');
|
||||||
|
|
@ -117,9 +117,11 @@
|
||||||
clearInterval(intervalRef); intervalRef = null;
|
clearInterval(intervalRef); intervalRef = null;
|
||||||
}
|
}
|
||||||
}, 40);
|
}, 40);
|
||||||
}; ctrEl.addEventListener('mouseenter', () => {
|
};
|
||||||
|
|
||||||
|
ctrEl.addEventListener('mouseenter', () => {
|
||||||
const quote = BIBOU_QUOTES[Math.floor(Math.random() * BIBOU_QUOTES.length)];
|
const quote = BIBOU_QUOTES[Math.floor(Math.random() * BIBOU_QUOTES.length)];
|
||||||
ttText(quote);
|
ttText(quote);
|
||||||
});
|
});
|
||||||
|
})();
|
||||||
</script>
|
</script>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue