-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Instruments Quiz Section (#75)
Co-authored-by: Kendall <kendalldoescoding@gmail.com>
- Loading branch information
1 parent
f2bcb2c
commit 80d5531
Showing
7 changed files
with
217 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
export default [ | ||
{ | ||
question: "Which instrument is a member of the woodwind family?", | ||
choice1: "Trumpet", | ||
choice2: "Clarinet", | ||
choice3: "Violin", | ||
choice4: "Drums", | ||
answer: 2, | ||
}, | ||
{ | ||
question: "Which of these instruments is a member of the percussion family?", | ||
choice1: "Piano", | ||
choice2: "Saxophone", | ||
choice3: "Flute", | ||
choice4: "Bongo drums", | ||
answer: 4, | ||
}, | ||
{ | ||
question: "Which stringed instrument is played with a bow?", | ||
choice1: "Guitar", | ||
choice2: "Cello", | ||
choice3: "Trumpet", | ||
choice4: " Trombone", | ||
answer: 2, | ||
}, | ||
{ | ||
question: "What is the primary material used to make the body of a classical guitar?", | ||
choice1: "Plastic", | ||
choice2: "Metal", | ||
choice3: "Wood", | ||
choice4: "Carbon fiber", | ||
answer: 3, | ||
}, | ||
{ | ||
question: "Which instrument has keys, pedals, and strings and is often used in classical music?", | ||
choice1: "Harp", | ||
choice2: "Accordion", | ||
choice3: "Bagpipes", | ||
choice4: "Banjo", | ||
answer: 1, | ||
}, | ||
{ | ||
question: "The 'King of Instruments' is a nickname for which musical instrument?", | ||
choice1: "Trumpet", | ||
choice2: "Piano", | ||
choice3: "Organ", | ||
choice4: "Saxophone", | ||
answer: 3, | ||
}, | ||
{ | ||
question: " Which brass instrument has the highest pitch?", | ||
choice1: "Trombone", | ||
choice2: "French horn", | ||
choice3: "Tuba", | ||
choice4: "Trumpet", | ||
answer: 4, | ||
}, | ||
{ | ||
question: " Which instrument is used as the lead melodic instrument in traditional Indian classical music?", | ||
choice1: "Sitar", | ||
choice2: "Tabla", | ||
choice3: "Bansuri (Indian flute)", | ||
choice4: "Sarod", | ||
answer: 1, | ||
}, | ||
{ | ||
question: "Which percussion instrument consists of small metal discs mounted in a circular frame?", | ||
choice1: "Tambourine", | ||
choice2: "Maracas", | ||
choice3: "Djembe", | ||
choice4: "Conga", | ||
answer: 1, | ||
}, | ||
{ | ||
question: "Which instrument is known for its unique sliding sound and is often associated with Hawaiian music?", | ||
choice1: "Ukulele", | ||
choice2: "Didgeridoo", | ||
choice3: "Steel guitar", | ||
choice4: "Bagpipe", | ||
answer: 3, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ | |
} | ||
}); | ||
</script> | ||
|
||
</head> | ||
|
||
<body> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" | ||
integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous" /> | ||
|
||
<title>Quiz Page - instruments</title> | ||
|
||
<link rel="stylesheet" href="../../css/index.css" /> | ||
<link rel="stylesheet" href="../../css/game.css" /> | ||
<script type="module" defer> | ||
import { instrumentsQA } from "../../js/data/index.js"; | ||
import { Quiz } from "../../js/QuizClass.js"; | ||
|
||
const QuizInstance = new Quiz(instrumentsQA); | ||
|
||
document.addEventListener("click", (e) => { | ||
if (e.target.dataset.number) { | ||
QuizInstance.checkAnswer(+e.target.dataset.number, QuizInstance.answer); | ||
} | ||
}); | ||
</script> | ||
|
||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
<div id="game" class="justify-center flex-column"> | ||
<div id="hud"> | ||
<div class="hud-item"> | ||
<p id="progressText" class="hud-prefix">Question</p> | ||
<div id="progressBar"> | ||
<div id="progressBarFull"></div> | ||
</div> | ||
</div> | ||
<div class="hud-item"> | ||
<p class="hud-prefix">Score</p> | ||
<h1 class="hud-main-text" id="score">0</h1> | ||
</div> | ||
</div> | ||
<h1 id="question">What is the answer to this question</h1> | ||
<div class="choice-container"> | ||
<p class="choice-prefix">A</p> | ||
<p class="choice-text" data-number="1">Choice 1</p> | ||
</div> | ||
<div class="choice-container"> | ||
<p class="choice-prefix">B</p> | ||
<p class="choice-text" data-number="2">Choice 2</p> | ||
</div> | ||
<div class="choice-container"> | ||
<p class="choice-prefix">C</p> | ||
<p class="choice-text" data-number="3">Choice 3</p> | ||
</div> | ||
<div class="choice-container"> | ||
<p class="choice-prefix">D</p> | ||
<p class="choice-text" data-number="4">Choice 4</p> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="music"> | ||
<audio loop="loop" id="my_audio" preload="auto" autoplay> | ||
<source id="audio_source" src="" type="audio/mpeg"> | ||
</audio> | ||
|
||
<div class="music-container flex-center flex-row"> | ||
<a onclick="toggleMusic()" class="button1" id="musicOnButton" style="display: none;"> Music On <i class="fas fa-light fa-headphones"></i></a> | ||
<a onclick="pauseMusic()" class="button2"> Music Off <i class="fas fa-light fa-volume-off"></i></a> | ||
</div> | ||
</div> | ||
</body> | ||
<script src="/js/songs.js"></script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
|
||
<title>Instruments Quiz Game - Home Page</title> | ||
|
||
<link rel="stylesheet" href="../../css/index.css" /> | ||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" | ||
integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous" /> | ||
<!-- Google Analytics --> | ||
<!-- Global site tag (gtag.js) - Google Analytics --> | ||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-55DLRTJ04T"></script> | ||
<script> | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag() { | ||
dataLayer.push(arguments); | ||
} | ||
gtag("js", new Date()); | ||
|
||
gtag("config", "G-55DLRTJ04T"); | ||
</script> | ||
|
||
</head> | ||
|
||
<body> | ||
<div class="container"> | ||
<div id="home" class="flex-column flex-center"> | ||
<h1>Are you Ready?</h1> | ||
<h2 class="white-title">Instruments Quiz!</h2> | ||
|
||
<a href="./game.html" class="btn">Play<i class="fas fa-play-circle"></i></a> | ||
|
||
<a href="../topics.html" id="topics-btn" class="btn">Topics</a> | ||
|
||
<a href="../highscores.html" id="highscore-btn" class="btn">High Scores<i class="fas fa-crown"></i></a> | ||
|
||
<a href="../rules.html" id="rules-btn" class="btn">Rules & Info<i class="fas fa-info-circle"></i></a> | ||
|
||
<a href="../suggestion.html" id="suggestion-btn" class="btn">Question Suggestion<i class="fas fa-edit"></i></a> | ||
|
||
</div> | ||
</div> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters