diff --git a/.lighthouserc.json b/.lighthouserc.json index c5a15c1a..c604ff3d 100644 --- a/.lighthouserc.json +++ b/.lighthouserc.json @@ -3,7 +3,7 @@ "assert": { "preset": "lighthouse:no-pwa", "assertions": { - "categories:performance": ["error", { "minScore": 0.5 }], + "categories:performance": ["error", { "minScore": 0.6 }], "categories:seo": ["error", { "minScore": 0.85 }], "categories:accessibility": ["warn", { "minScore": 0.85 }], "categories:best-practices": ["warn", { "minScore": 0.85 }], diff --git a/assets/js/bio.js b/assets/js/bio.js index 1b442eda..ae8d9353 100644 --- a/assets/js/bio.js +++ b/assets/js/bio.js @@ -35,5 +35,5 @@ document.addEventListener('DOMContentLoaded', () => { }); }); - switchLanguage('fr'); -}); \ No newline at end of file + // Default language is set in the HTML to avoid layout shifts on load. +}); diff --git a/assets/js/main.js b/assets/js/main.js index 9f4a5d56..fb290109 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -2,114 +2,13 @@ const hero = document.getElementById('hero'); if (hero) { window.addEventListener('scroll', () => { - if (window.innerWidth < 768) { - return; - } + if (window.innerWidth < 768) return; const scrollTop = window.scrollY; const heroHeight = hero.offsetHeight; if (scrollTop < heroHeight) { - // const img = document.getElementById('hero-img'); - // if (img) { - // const scrollRatio = scrollTop / heroHeight; - // let scale = 1 + scrollRatio * 0.15; - // scale = Math.min(scale, 1.5); - // const translateY = scrollRatio * 30; - // img.style.transform = `translate(-50%, calc(-50% + ${translateY}px)) scale(${scale})`; - // } + // Reserved for optional hero parallax effects. } - }); + }, { passive: true }); } - -/* ============================= - * Howler.js – Audio controls - * ============================== */ - -/* ----------------------------- - 1️⃣ Paths – relative à la racine - ----------------------------- */ -const getAsset = p => `assets/music/${p}`; - -/* ----------------------------- - 2️⃣ Player objects - ----------------------------- */ -const patriceSound = new Howl({ - src: [ getAsset('Patrice Bäumel–Glutes (Original Mix).mp3') ], - html5: true, // streamable on all devices (large files) - preload: false -}); - -const newOrderSound = new Howl({ - src: [ getAsset('New Order Blue Monday.ogg') ], - html5: true, - preload: false -}); - -const winxSound = new Howl({ - src: [ getAsset("Winx - Don't Laugh - Original Live Raw Mix.ogg") ], - html5: true, - preload: false -}); - -/* ----------------------------- - 3️⃣ Event listeners (buttons) - ----------------------------- */ -document.querySelector('#play-btn-patrice')?.addEventListener('click', () => patriceSound.play()); -document.querySelector('#pause-btn-patrice')?.addEventListener('click', () => patriceSound.pause()); - -document.querySelector('#play-btn-blue-monday')?.addEventListener('click', () => newOrderSound.play()); -document.querySelector('#pause-btn-blue-monday')?.addEventListener('click', () => newOrderSound.pause()); - -document.querySelector('#play-btn-winx')?.addEventListener('click', () => winxSound.play()); -document.querySelector('#pause-btn-winx')?.addEventListener('click', () => winxSound.pause()); - -/* ----------------------------- - 4️⃣ Helpers UI (facultatif) - ----------------------------- */ -function setStatus(id, playing) { - const el = document.getElementById(id); - if (!el) return; - if (playing) { - el.style.display = 'none'; - } else { - el.style.display = 'block'; - } -} - -/* E.g. if you want a visual indicator that a track is playing: */ -patriceSound.on('play', () => setStatus('play-btn-patrice', true)); -patriceSound.on('pause', () => setStatus('play-btn-patrice', false)); -patriceSound.on('stop', () => setStatus('play-btn-patrice', false)); - -newOrderSound.on('play', () => setStatus('play-btn-blue-monday', true)); -newOrderSound.on('pause', () => setStatus('play-btn-blue-monday', false)); -newOrderSound.on('stop', () => setStatus('play-btn-blue-monday', false)); - -winxSound.on('play', () => setStatus('play-btn-winx', true)); -winxSound.on('pause', () => setStatus('play-btn-winx', false)); -winxSound.on('stop', () => setStatus('play-btn-winx', false)); - -document.addEventListener('DOMContentLoaded', () => { - const btns = document.querySelectorAll('.language-btn'); - const contents = document.querySelectorAll('.lang-content'); - - btns.forEach(btn => { - btn.addEventListener('click', () => { - const lang = btn.dataset.lang; - - // Set active button - btns.forEach(b => b.classList.remove('active')); - btn.classList.add('active'); - - // Show/hide content via CSS classes (no inline styles) - contents.forEach(c => { - if (c.dataset.lang === lang) { - c.classList.add('active'); - } else { - c.classList.remove('active'); - } - }); - }); - }); -}); diff --git a/bio.html b/bio.html index 3ec5370e..a941355e 100644 --- a/bio.html +++ b/bio.html @@ -57,14 +57,14 @@
David KRK, né en août 1982, est un DJ qui se produit en Espagne, en France et sur la Côte Basque depuis 2000.
Son style de base, Trance / Tech Trance, se diversifie aujourd'hui avec des sonorités plus Techno.
@@ -194,16 +194,6 @@