diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..ae1bdc0 Binary files /dev/null and b/.DS_Store differ diff --git a/Dark/end.html b/Dark/end.html index 79855dc..6a34995 100644 --- a/Dark/end.html +++ b/Dark/end.html @@ -5,6 +5,7 @@ Congrats! + @@ -33,7 +34,7 @@

Change Theme
- + /> -
+ diff --git a/Dark/game.html b/Dark/game.html index 590c762..5c4f5a8 100644 --- a/Dark/game.html +++ b/Dark/game.html @@ -5,6 +5,7 @@ Game-play + @@ -14,9 +15,7 @@ + diff --git a/Dark/highscore.html b/Dark/highscore.html index c2fd9dc..fd03eba 100644 --- a/Dark/highscore.html +++ b/Dark/highscore.html @@ -5,6 +5,7 @@ High Scores + @@ -18,5 +19,6 @@

High Scores

+ diff --git a/Dark/index.html b/Dark/index.html index b206aa2..a5168ae 100644 --- a/Dark/index.html +++ b/Dark/index.html @@ -5,19 +5,22 @@ Kviz: A quiz app +
-
+ diff --git a/Light/end.html b/Light/end.html index f03f118..a3d180f 100644 --- a/Light/end.html +++ b/Light/end.html @@ -5,6 +5,7 @@ Congrats! + @@ -33,7 +34,7 @@

Change Theme
- + /> -
+ diff --git a/Light/game.html b/Light/game.html index 590c762..09e6629 100644 --- a/Light/game.html +++ b/Light/game.html @@ -5,8 +5,16 @@ Game-play + + + + +
@@ -14,20 +22,89 @@ + + diff --git a/Light/highscore.html b/Light/highscore.html index 2b69d15..cbe0bb1 100644 --- a/Light/highscore.html +++ b/Light/highscore.html @@ -5,6 +5,7 @@ High Scores + @@ -18,5 +19,6 @@

High Scores

+ diff --git a/Light/index.html b/Light/index.html index 8ae9bc0..6e24d71 100644 --- a/Light/index.html +++ b/Light/index.html @@ -5,18 +5,23 @@ Kviz: A quiz app +
+ +
+ diff --git a/app.js b/app.js new file mode 100644 index 0000000..84d10ae --- /dev/null +++ b/app.js @@ -0,0 +1,19 @@ +let index = Math.floor(Math.random() * 5) + 1; +let bgMusic = new Audio(`/assets/music_bg/${index}.mp3`); + +function changeMusic() { + bgMusic.src = `/assets/music_bg${index}.mp3`; + if (index <= music.length) { + index += 1; + } else { + index = 1; + } +} + +window.addEventListener("load", () => { + bgMusic.play(); +}); + +bgMusic.addEventListener("ended", () => { + changeMusic(); +}); diff --git a/assets/.DS_Store b/assets/.DS_Store new file mode 100644 index 0000000..2a59e37 Binary files /dev/null and b/assets/.DS_Store differ diff --git a/assets/music_bg/.DS_Store b/assets/music_bg/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/assets/music_bg/.DS_Store differ diff --git a/assets/music_bg/1.mp3 b/assets/music_bg/1.mp3 new file mode 100644 index 0000000..4c5e63b Binary files /dev/null and b/assets/music_bg/1.mp3 differ diff --git a/assets/music_bg/2.mp3 b/assets/music_bg/2.mp3 new file mode 100644 index 0000000..8288b6b Binary files /dev/null and b/assets/music_bg/2.mp3 differ diff --git a/assets/music_bg/3.mp3 b/assets/music_bg/3.mp3 new file mode 100644 index 0000000..ea76580 Binary files /dev/null and b/assets/music_bg/3.mp3 differ diff --git a/assets/music_bg/4.mp3 b/assets/music_bg/4.mp3 new file mode 100644 index 0000000..f1c0294 Binary files /dev/null and b/assets/music_bg/4.mp3 differ diff --git a/assets/music_bg/5.mp3 b/assets/music_bg/5.mp3 new file mode 100644 index 0000000..6cfb569 Binary files /dev/null and b/assets/music_bg/5.mp3 differ diff --git a/index.html b/index.html index 1d88986..fb400eb 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,6 @@ + @@ -72,4 +73,5 @@

Score History

} +