Release 2025-05-19

This commit is contained in:
pluja
2025-05-19 10:19:49 +00:00
parent 046c4559e5
commit 2657f936bc
267 changed files with 0 additions and 49432 deletions

View File

@@ -1,41 +0,0 @@
---
---
<script>
////////////////////////////////////////////////////////
// Optional script to change the splash text on click //
////////////////////////////////////////////////////////
import { splashTexts } from '../constants/splashTexts'
document.addEventListener('astro:page-load', () => {
document.querySelectorAll<HTMLDivElement>('[data-splash-text-container]').forEach((container) => {
const updateSplashText = () => {
const splashTextElem = container.querySelector<HTMLSpanElement>('[data-splash-text]')
if (!splashTextElem) return
const splashTextsFiltered = splashTexts.filter((text) => text !== splashTextElem.textContent)
const newSplashText = splashTextsFiltered[Math.floor(Math.random() * splashTextsFiltered.length)]
if (!newSplashText) return
splashTextElem.textContent = newSplashText
}
container.addEventListener('click', updateSplashText)
const autoUpdateInterval = setInterval(updateSplashText, 60_000)
document.addEventListener('astro:before-swap', () => {
clearInterval(autoUpdateInterval)
})
container.addEventListener(
'mousedown',
(event) => {
if (event.detail > 1) event.preventDefault()
},
false
)
})
})
</script>