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

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

High Scores

+ diff --git a/Dark/index.html b/Dark/index.html index 239f345..a6db0d8 100644 --- a/Dark/index.html +++ b/Dark/index.html @@ -6,20 +6,21 @@ Kviz: A quiz app - - + +
- + diff --git a/Dark/rules.html b/Dark/rules.html index 2e5582b..03a8e5e 100644 --- a/Dark/rules.html +++ b/Dark/rules.html @@ -1,28 +1,42 @@ - - + + Quiz Rules - - + + +

Quiz Rules

-
    -
  1. The game consists of 10 questions!
  2. -
  3. You get 15 seconds to answer each question; a timer is displayed to show the time left for each question.
  4. -
  5. Speed Bonus If You Answer Quickly
  6. - - -
  7. There is no negative marking for a wrong answer.
  8. +
      +
    1. The game consists of 10 questions!
    2. +
    3. + You get 15 seconds to answer each question; a timer is displayed to show + the time left for each question. +
    4. +
    5. Speed Bonus If You Answer Quickly
    6. + + +
    7. There is no negative marking for a wrong answer.

    ALL THE BEST!

    Go Home - + + diff --git a/Light/end.html b/Light/end.html index f03f118..f60659a 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..fcf48f9 100644 --- a/Light/game.html +++ b/Light/game.html @@ -7,6 +7,7 @@ Game-play +
    @@ -14,9 +15,7 @@ - - + +
    -
    +
    + diff --git a/Light/highscore.html b/Light/highscore.html index 2b69d15..48c2ecd 100644 --- a/Light/highscore.html +++ b/Light/highscore.html @@ -7,6 +7,7 @@ High Scores +
    @@ -18,5 +19,6 @@

    High Scores

    + diff --git a/Light/index.html b/Light/index.html index 2ed6dff..f5afe08 100644 --- a/Light/index.html +++ b/Light/index.html @@ -6,19 +6,21 @@ Kviz: A quiz app - - + +
    + diff --git a/Light/rules.html b/Light/rules.html index 2e5582b..03a8e5e 100644 --- a/Light/rules.html +++ b/Light/rules.html @@ -1,28 +1,42 @@ - - + + Quiz Rules - - + + +

    Quiz Rules

    -
      -
    1. The game consists of 10 questions!
    2. -
    3. You get 15 seconds to answer each question; a timer is displayed to show the time left for each question.
    4. -
    5. Speed Bonus If You Answer Quickly
    6. -
        -
      • You will earn +10 points for providing a correct answer within the first 5 seconds.
      • -
      • If you give a correct answer after the initial 5 seconds but within 10 seconds, you get +5 points.
      • -
      • Answers given correctly after 10 seconds will still be rewarded with +2 points.
      • -
      - -
    7. There is no negative marking for a wrong answer.
    8. +
        +
      1. The game consists of 10 questions!
      2. +
      3. + You get 15 seconds to answer each question; a timer is displayed to show + the time left for each question. +
      4. +
      5. Speed Bonus If You Answer Quickly
      6. +
          +
        • + You will earn +10 points for providing a correct answer within the + first 5 seconds. +
        • +
        • + If you give a correct answer after the initial 5 seconds but within 10 + seconds, you get +5 points. +
        • +
        • + Answers given correctly after 10 seconds will still be rewarded with + +2 points. +
        • +
        + +
      7. There is no negative marking for a wrong answer.

      ALL THE BEST!

      Go Home - + + diff --git a/assets/.DS_Store b/assets/.DS_Store new file mode 100644 index 0000000..d8421c7 Binary files /dev/null and b/assets/.DS_Store differ diff --git a/assets/bg_music/1.mp3 b/assets/bg_music/1.mp3 new file mode 100644 index 0000000..8288b6b Binary files /dev/null and b/assets/bg_music/1.mp3 differ diff --git a/assets/bg_music/2.mp3 b/assets/bg_music/2.mp3 new file mode 100644 index 0000000..8db2d80 Binary files /dev/null and b/assets/bg_music/2.mp3 differ diff --git a/assets/bg_music/3.mp3 b/assets/bg_music/3.mp3 new file mode 100644 index 0000000..6cfb569 Binary files /dev/null and b/assets/bg_music/3.mp3 differ diff --git a/assets/bg_music/4.mp3 b/assets/bg_music/4.mp3 new file mode 100644 index 0000000..ea76580 Binary files /dev/null and b/assets/bg_music/4.mp3 differ diff --git a/assets/bg_music/5.mp3 b/assets/bg_music/5.mp3 new file mode 100644 index 0000000..f1c0294 Binary files /dev/null and b/assets/bg_music/5.mp3 differ diff --git a/assets/bg_music/6.mp3 b/assets/bg_music/6.mp3 new file mode 100644 index 0000000..4c5e63b Binary files /dev/null and b/assets/bg_music/6.mp3 differ diff --git a/index.html b/index.html index 8a1c123..7a5b0fd 100644 --- a/index.html +++ b/index.html @@ -1,75 +1,67 @@ - + - - - - - Kviz: A quiz app - - + + + + + Kviz: A quiz app + + + - - - -
      -
      -

      Kviz

      -
      - Dark Theme - Light Theme - Score History + + + +
      +
      - - - - - - - - + +
      - -
      - -
      - - - - - + + + - - - + + + - - + + diff --git a/index,js b/index.js similarity index 89% rename from index,js rename to index.js index 8525852..7607a19 100644 --- a/index,js +++ b/index.js @@ -1,4 +1,3 @@ - const scores = [ { date: "2024-01-06", score: 80 }, { date: "2024-01-05", score: 75 }, @@ -8,11 +7,11 @@ const scores = [ // Function to display score history function displayScoreHistory() { const scoreList = document.getElementById("score-list"); - scoreList.innerHTML = ''; // Clear existing list + scoreList.innerHTML = ""; // Clear existing list scores.forEach((entry) => { const listItem = document.createElement("li"); listItem.textContent = `Date: ${entry.date}, Score: ${entry.score}%`; scoreList.appendChild(listItem); }); -} \ No newline at end of file +} diff --git a/music.js b/music.js new file mode 100644 index 0000000..a0d8443 --- /dev/null +++ b/music.js @@ -0,0 +1,19 @@ +let index = Math.floor(Math.random() * 5) + 1; +let bgMusic = new Audio(`/assets/bg_music/${index}.mp3`); + +function changeMusic() { + bgMusic.src = `/assets/bg_music${index}.mp3`; + if (index <= 5) { + index += 1; + } else { + index = 1; + } +} + +window.addEventListener("load", () => { + bgMusic.play(); +}); + +bgMusic.addEventListener("ended", () => { + changeMusic(); +}); diff --git a/score.html b/score.html index d8f0316..88d5300 100644 --- a/score.html +++ b/score.html @@ -1,84 +1,86 @@ - - - + + + Score History + + - - - + +

      Score History

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      DatePlayerScore
      2024-01-25Player 11500
      2024-01-24Player 21200
      2024-01-23Player 31800
      2024-01-22Player 41350
      DatePlayerScore
      2024-01-25Player 11500
      2024-01-24Player 21200
      2024-01-23Player 31800
      2024-01-22Player 41350
      - - + +