diff --git a/sleepeesoftware.fr/css/style.css b/sleepeesoftware.fr/css/style.css index 3136ddb..c1ac31a 100644 --- a/sleepeesoftware.fr/css/style.css +++ b/sleepeesoftware.fr/css/style.css @@ -64,12 +64,15 @@ body { display: flex; align-items: center; justify-content: center; + z-index: 9999; + cursor: pointer; +} + +.loading-text { color: #00ffff; font-family: 'Orbitron', sans-serif; font-size: 2rem; text-shadow: 0 0 10px #00ffff; - z-index: 9999; - cursor: pointer; animation: pulse 1.5s infinite; } diff --git a/sleepeesoftware.fr/js/index.js b/sleepeesoftware.fr/js/index.js index 7f157ea..f262ab4 100644 --- a/sleepeesoftware.fr/js/index.js +++ b/sleepeesoftware.fr/js/index.js @@ -47,8 +47,8 @@ const playlist = [ let currentTrack = 0; const audio = new Audio(); -audio.loop = false; -audio.volume = 0.5; +audio.loop = true; +audio.volume = 0.2; const nowPlaying = document.getElementById('now-playing'); const playPauseBtn = document.getElementById('play-pause-btn'); @@ -89,3 +89,15 @@ audio.addEventListener('ended', () => { document.getElementById('loading-screen')?.addEventListener('click', () => { loadTrack(0); }); + +window.addEventListener('DOMContentLoaded', () => { + const loadingScreen = document.getElementById('loading-screen'); + const music = new Audio(); // your audio logic might be handled elsewhere now + + if (loadingScreen) { + loadingScreen.addEventListener('click', () => { + loadingScreen.style.display = 'none'; // hides the full screen + loadTrack(0); // start the music playlist + }); + } +});