-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
106 lines (106 loc) · 7.13 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>TriviaQuiz</title>
<link rel = 'stylesheet' type= 'text/css' href='styles.css'/>
</head>
<body>
<div class="container">
<div class="introScreen">
<div class="navbar">
<ul>
<li>TriviaQuiz</li>
<li class='right'><span><a href='https://anishchand.com'>By Anish Chand</a></span></li>
</ul>
</div>
<div class="filters">
<div><label for="category">Category Type: </label>
<select id = 'category-type'>
<option value=''>Random</option>
<option value='General Knowledge'>General Knowledge</option>
<option value='Film'>Film</option>
<option value='Music'>Music</option>
<option value='Science & Nature'>Science & Nature</option>
<option value='Sports'>Sports</option>
<option value='Geography'>Geography</option>
<option value='History'>History</option>
<option value='Celebrities'>Celebrities</option>
<option value='Animals'>Animals</option>
</select>
</div>
<div>
<label for="difficulty">Difficulty: </label>
<select id = 'difficulty-type'>
<option value=''>Random</option>
<option value='easy'>Easy</option>
<option value='medium'>Medium</option>
<option value='hard'>Hard</option>
</select>
</div>
<div>
<label for="question-count">Question Count: </label>
<input type="number" min='1' max= '15' value='1' id = 'question-count' placeholder=" number of question">
</div>
<div><button class = 'start' onclick="startQuiz()">Begin</button></div>
</div>
<div class="description">
<p>
This is a triva application. This application makes use of the opensource trivia api called 'OpenTrivia'. For more details, check
out <a href ='https://opentdb.com/'>OpenTrivia</a>.
</p>
<br>
<p>
You can select different categories from the above dropdown menu. There are three levels of difficulty: easy, medium and hard.
The easy questions are scored 5 points, the medium are 10 points and the hard questions are worth 15 points.
</p>
<br>
<p>
There may be some problems in finding all unique questions to a very specific criteria and may cause repitions due to low
volume of questions. For example: 50 questions of Celebrities in easy setting may return duplicate questions.
</p>
</div>
</div>
<div class = 'mainScreen'>
<div class="navbar">
<ul>
<li>TriviaQuiz</li>
<li class='right'>Current Score: <span id = 'currentScore'> 0</span></li>
</ul>
</div>
<div class="question">
<div class="points">Point: <span id = 'pointValue'> 0</span></div>
<div class="questionText"></div>
<div class="options">
<button class="optionA" id ='opt' onclick="checkAnswer(this)"> Option A</button>
<button class="optionB" id ='opt' onclick="checkAnswer(this)">Option B</button>
<button class="optionC" id ='opt' onclick="checkAnswer(this)">Option C</button>
<button class="optionD" id ='opt' onclick="checkAnswer(this)">Option D</button>
</div>
<div class="result"></div>
<button class = 'next' onclick="nextQuestion()"> Next Question </button>
</div>
</div>
<div class="endScreen">
<div class="navbar">
<ul>
<li>TriviaQuiz</li>
<li class='right'>© Anish Chand</span></li>
</ul>
</div>
<div class="end">
<div class="totalQuestionsAsked"></div>
<div class="totalPointsReceived"></div>
<div class="totalCorrectAnswers"></div>
<div class="highScore"></div>
</div>
</div>
</div>
<script src= './scripts/script.js'></script>
</body>
</html>