From 631547a75142326a7c71bdf123e1475217a5ad73 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Wed, 22 Apr 2026 12:42:56 +0200 Subject: chore: replace with extracted danix.xyz-hacker theme (danix2-hugo-theme) --- assets/js/glitch.js | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 assets/js/glitch.js (limited to 'assets/js/glitch.js') diff --git a/assets/js/glitch.js b/assets/js/glitch.js deleted file mode 100644 index 85f8a00..0000000 --- a/assets/js/glitch.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * glitch.js - * Random glitch effect on .hero-name every 4-11 seconds - */ - -export function initGlitch() { - 'use strict'; - - const heroName = document.querySelector('.hero-name'); - if (!heroName) return; - - if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return; - - function triggerGlitch() { - heroName.classList.add('is-glitching'); - setTimeout(() => { - heroName.classList.remove('is-glitching'); - }, 450); - } - - function scheduleNextGlitch() { - const delay = Math.random() * 7000 + 4000; // 4-11 seconds - setTimeout(() => { - triggerGlitch(); - scheduleNextGlitch(); - }, delay); - } - - scheduleNextGlitch(); -} -- cgit v1.2.3