-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
226 lines (217 loc) · 10.6 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="author" content="Loren Kociko">
<meta name="description" content="CCNA 200-301 Practice Exam">
<meta name="keywords" content="cisco, CCNA, EXAM, MOCK, questions, practice, answers, 200-301">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CCNA: Pactice</title>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./css/index.css">
</head>
<body>
<main>
<div id="title">
<h1>CCNA: Practice</h1>
</div>
<div id="container">
<div id="card-index">
<ul>
<a href="./casual.html">
<li>
Casual Study
</li>
</a>
<a href="#" onclick="changeState('simu')">
<li>
EXAM Simulation
</li>
</a>
<a href="#" onclick="changeState('about')">
<li>
<p>About me</p>
</li>
</a>
</ul>
</div>
<div id="card-simulation">
<div id="card-select">
<div class="titles">Time:</div>
<div id="time-cont" class="btn-cont">
<input type="button" value="30'" class="time-in" id="time-30">
<input type="button" value="60'" class="time-in" id="time-60">
<input type="button" value="90'" class="time-in" id="time-90">
<input type="button" value="150'" class="time-in selected" id="time-150">
<input type="button" value="Unlimited" class="time-in" id="time-unlimited">
</div>
<div class="titles">Questions:</div>
<div id="question-cont" class="btn-cont">
<input type="button" value="30" class="question-in" id="question-30">
<input type="button" value="60" class="question-in" id="question-60">
<input type="button" value="100" class="question-in selected" id="question-100">
<input type="button" value="200" class="question-in" id="question-200">
<input type="button" value="All" class="question-in" id="question-all">
</div>
</div>
<hr>
<div id="checkboxes">
<div>
<h3>Module 1</h3>
</div>
<div>
<h3>Module 2</h3>
</div>
<div>
<h3>Module 3</h3>
</div>
<div class="subbox">
<input type="checkbox" id="m1c1t3" class="checks" checked>
<label>1-3</label>
</div>
<div class="subbox">
<input type="checkbox" id="m2c1t4" class="checks" checked>
<label>1-4</label>
</div>
<div class="subbox">
<input type="checkbox" id="m3c1t2" class="checks" checked>
<label>1-2</label>
</div>
<div class="subbox">
<input type="checkbox" id="m1c4t7" class="checks" checked>
<label>4-7</label>
</div>
<div class="subbox">
<input type="checkbox" id="m2c5t6" class="checks" checked>
<label>5-6</label>
</div>
<div class="subbox">
<input type="checkbox" id="m3c3t5" class="checks" checked>
<label>3-5</label>
</div>
<div class="subbox">
<input type="checkbox" id="m1c8t10" class="checks" checked>
<label>8-10</label>
</div>
<div class="subbox">
<input type="checkbox" id="m2c7t9" class="checks" checked>
<label>7-9</label>
</div>
<div class="subbox">
<input type="checkbox" id="m3c6t8" class="checks" checked>
<label>6-8</label>
</div>
<div class="subbox">
<input type="checkbox" id="m1c11t13" class="checks" checked>
<label>11-13</label>
</div>
<div class="subbox">
<input type="checkbox" id="m2c10t13" class="checks" checked>
<label>10-13</label>
</div>
<div class="subbox">
<input type="checkbox" id="m3c9t12" class="checks" checked>
<label>9-12</label>
</div>
<div class="subbox">
<input type="checkbox" id="m1c14t15" class="checks" checked>
<label>14-15</label>
</div>
<div class="subbox">
<input type="checkbox" id="m2c14t16" class="checks" checked>
<label>14-16</label>
</div>
<div class="subbox">
<input type="checkbox" id="m3c13t14" class="checks" checked>
<label>13-14</label>
</div>
<div class="subbox">
<input type="checkbox" id="m1c16t17" class="checks" checked>
<label>16-17</label>
</div>
</div>
<a id="start-game" href="#" onclick="startExam()">Start Exam</a>
</div>
<div id="card-about">
<h2>CCNA: Practice</h2>
<hr>
<p>To help me with my CCNA 200-301 studies, I created this web-application. It was created with using native HTML/CSS/JS. It includes most of the questions from the CCNA module exams. My goal was to create a clean and fast interface, with
the option to combine different module, randomized questions and instant feedback.</p>
<hr>
<h3>Created by: Loren Kociko</h3>
<div id="socials">
<a href="https://www.linkedin.com/in/loren-kociko/" target="_blank"><img src="./Icons/in.png" class="icons" alt="Linkedin Icon"></a>
<a href="https://github.com/LorenKociko" target="_blank"><img src="./Icons/github.png" class="icons" alt="GitHub Icon"></a>
<a href="https://lorenkociko.com/" target="_blank"><img src="./Icons/web.png" class="icons" alt="Website Icon"></a>
</div>
</div>
</div>
</main>
<a id="back-div" href="#" onclick="changeState('main')"><img id="back-btn" src="./Icons/back.png"></a>
<div id="contacts">
<h4 style="padding-bottom: 10px;">Created by: Loren Kociko </h4>
<div id="icons-social">
<a href="https://www.linkedin.com/in/loren-kociko/" target="_blank" class="icons"><img src="./Icons/in.png" class="icons" alt="Linkedin Icon"></a>
<a href="https://github.com/LorenKociko" target="_blank" class="icons"><img src="./Icons/github.png" class="icons" alt="GitHub Icon"></a>
<a href="https://lorenkociko.com/" target="_blank" class="icons"><img src="./Icons/web.png" class="icons" alt="Website Icon"></a>
</div>
</div>
<script>
changeState('main')
function startExam() {
let timeQuestions = document.querySelectorAll(".selected")
let storedData = {}
storedData.time = timeQuestions[0].value
storedData.questions = timeQuestions[1].value
let checkboxesCollection = document.querySelectorAll(".checks")
let selectedExams = []
for (let i = 0; i < checkboxesCollection.length; i++) {
if (checkboxesCollection[i].checked) {
selectedExams.push(checkboxesCollection[i].id)
}
}
storedData.selectedExams = selectedExams
localStorage.setItem('exam', JSON.stringify(storedData));
window.location.href = "./exam.html";
}
function changeState(state) {
if (state === "main") {
document.getElementById("card-index").style.display = "block"
document.getElementById("card-simulation").style.display = "none"
document.getElementById("card-about").style.display = "none"
document.getElementById("back-btn").style.display = "none"
} else if (state === "simu") {
document.getElementById("card-index").style.display = "none"
document.getElementById("card-simulation").style.display = "grid"
document.getElementById("card-about").style.display = "none"
document.getElementById("back-btn").style.display = "block"
} else if (state === "about") {
document.getElementById("card-index").style.display = "none"
document.getElementById("card-simulation").style.display = "none"
document.getElementById("card-about").style.display = "block"
document.getElementById("back-btn").style.display = "block"
}
}
const allTimeInputs = document.querySelectorAll(".time-in")
const allQuestionInputs = document.querySelectorAll(".question-in")
for (let i = 0; i < allTimeInputs.length; i++) {
allTimeInputs[i].addEventListener("click", () => {
resetSelected(allTimeInputs)
allTimeInputs[i].classList.add("selected")
});
}
for (let i = 0; i < allQuestionInputs.length; i++) {
allQuestionInputs[i].addEventListener("click", () => {
resetSelected(allQuestionInputs)
allQuestionInputs[i].classList.add("selected")
});
}
function resetSelected(list) {
for (let i = 0; i < list.length; i++) {
list[i].classList.remove("selected")
}
}
</script>
</body>
</html>