<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viweport" content="width=device-width, initial-scale=1.0">
<title>Ayo QuizTime</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="quest-container">
<div class="quest-header">
</div>
<h2 id="quest">Quest To Complete</h2>
<ul>
<li><input type = "radio" id ="a" name ="Quest Complete">
<label id = "quest_a" for="a"> Quest</label>
</li>
<li><input type = "radio" id ="b" name ="Quest Complete" >
<label id = "quest_b" for="b"> Quest</label>
</li>
<li><input type = "radio" id ="c" name ="Quest Complete">
<label id = "quest_c"for="c"> Quest</label>
</li>
<li><input type = "radio" id ="d" name ="Quest Complete">
<label id = "quest_d" for="d"> Quest</label>
</li>
</ul>
<button> Load It</button>
</div>
</body>
<script src="js/script.js" type="text/javascript"></script>
</html>
@@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300&display=swap');
*{
box-sizing: border-box;
}
body {
background-color: #3d7180;
background-image: linear-gradient(315deg, #b8c6db 0%, #3d7180; 100%);
display: flex;
align-items: center;
justify-content: center;
font-family: 'Poppins, sans-serif';
margin: 0;
min-height: 100vh;
}
.quest-container{
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 10px 2px rgba(100, 100, 100, 0.1);
width: 600px;
max-width: 100%;
overflow: hidden;
}
.quest-header {
padding: 1rem;
}
h2 {
margin: 0;
}
ul {
list-style-type: none;
padding: 0;
}
ul li{
margin: 1rem 0;
font-size: 1.1rem;
}
button {
background-color: skyblue;
border: none;
color: white;
display: block;
font-family: inherit;
width: 100%;
padding: 1rem;
font-size: 1.5rem;
cursor: pointer;
}
button:hover {
background-color: #213252;
}
const questData = [
{
question: 'How To Kill The Boss Monster?',
a: 'Healing Magic',
b: 'Fully Charged Finishing Move',
c: 'Run Away',
d: 'Let Him Kill You',
correct: 'b'
},
{
question:'Who is Kira?',
a: 'He is also know as Light Yagami',
b: 'Dont Know, Dont Care',
c: 'The MC from SAO',
d: 'He is the villain from SAO',
correct: 'c'
},
{
question: 'Who is Luffy?',
a: 'The MC from One Piece',
b: 'He is also know as Ace',
c: 'Dont Know, Dont Care',
d: 'He is the villain from SAO',
correct: 'a'
},
{
question: 'Who is Goku?',
a: 'He is the villain from Yu-Gi-OH!',
b: 'He is also know as Vegita',
c: 'Dont Know, Dont Care',
d: 'The MC from Dragon Ball series',
correct: 'd'
},
{
question: 'What does COD stands for?',
a: 'Call Of Dance',
b: 'Call Out Day',
c: 'Call Of Duty',
d: 'Call Of Death',
correct: 'c'
}
];
const questEl = document.getElementById("quest");
const quest_a = document.getElementById('quest_a');
const quest_b = document.getElementById('quest_b');
const quest_c = document.getElementById('quest_c');
const quest_d = document.getElementById('quest_d');
let currentQuest = 0;
loadQuest();
function loadQuest() {
const currentQuestData = questData [currentQuest];
questEl.innerText = currentQuestData.quest;
quest_a.innerText = currentQuestData.a;
quest_b.innerText = currentQuestData.b;
quest_c.innerText = currentQuestData.c;
quest_d.innerText = currentQuestData.d;
currentQuest++;
}