diff --git a/assets/css/style.css b/assets/css/style.css index 44a9465..ce8b338 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -188,4 +188,17 @@ body { color: var(--background-color); text-align: center; padding: 2rem 0; +} + +#music-toggle { + position: fixed; + bottom: 20px; + right: 20px; + padding: 10px 15px; + background-color: #333; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + z-index: 1000; } \ No newline at end of file diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..3a46b3d --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1,17 @@ + +document.addEventListener('DOMContentLoaded', function() { + const music = document.getElementById('background-music'); + const musicToggle = document.getElementById('music-toggle'); + + if (music && musicToggle) { + musicToggle.addEventListener('click', function() { + if (music.paused) { + music.play(); + musicToggle.textContent = 'Pause Music'; + } else { + music.pause(); + musicToggle.textContent = 'Play Music'; + } + }); + } +}); diff --git a/index.php b/index.php index 499efeb..ae66dea 100644 --- a/index.php +++ b/index.php @@ -32,6 +32,8 @@ + +
@@ -138,5 +140,6 @@
+