-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
107 lines (107 loc) · 3.12 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0">
<title>Airframe Electrical Review</title>
<style>
body {
display: flex;
font-family: Arial, sans-serif;
flex-flow: row wrap;
margin: 0;
overflow: hidden;
height: 100vh;
height: calc(var(--vh, 1vh) * 100);
box-sizing: border-box;
}
html {
overflow: hidden;
box-sizing: border-box;
}
img {
width: 33VH;
}
#sidePane {
width: 225px;
background-color: #f4f4f4;
padding-left: 8px;
border-right: 1px solid #ddd;
overflow-y: auto;
height: 100vh;
height: calc(var(--vh, 1vh) * 100);
box-sizing: border-box;
}
#quizContainer {
flex: 1;
padding: 20px;
overflow-y: auto;
height: 100vh;
height: calc(var(--vh, 1vh) * 100);
box-sizing: border-box;
}
.flagged {
color: red;
}
@media (max-width: 600px) {
body {
display: flex;
flex-flow: column;
box-sizing: border-box;
}
#sidePane {
width: 100%; /* Full width when stacked */
order: 2;
padding-left: 15px;
padding-bottom: 30px;
padding-top: 15px;
height: calc(100vh - 45px);
box-sizing: border-box;
}
#quizContainer {
width: auto; /* Full width when stacked */
order: 1;
height: auto;
flex: none/* Position main content above sidebar */
}
#pictureFrame {
width: calc(100vw - 30px);
}
img {
width: calc(100vw - 40px);
}
</style>
</head>
<body>
<div id="sidePane">
<h2>Questions</h2>
<ul id="questionList"></ul>
</div>
<div id="quizContainer">
<h1 id="title">Select a Quiz</h1>
<p id="question"></p>
<form id="optionsForm"></form>
<div id="questionControl">
<button onclick="toggleFlag()">Flag/Unflag</button>
<button onclick="prevQuestion()">Previous</button>
<button onclick="nextQuestion()">Next</button>
</div>
<br>
<button onclick="gradeQuiz()">Grade Quiz</button>
<button onclick="collectAndLoadQuestions()">Restart Quiz</button>
<button onclick="openDialog()">Start a New Quiz</button>
<p id="scoreDisplay"></p>
</div>
<dialog id="dialog">
<select id="quizDropdown" onchange="loadSelectedJsonFile()">
<option value="">Select a Question File</option>
<!-- Options will be populated here dynamically -->
</select>
<form id="list">
</form>
<button id="closeDialog" onclick="closeDialog()">Close</button>
<button onclick="collectAndLoadQuestions()">Submit</button>
</dialog>
<script src="script.js"></script>
</body>
</html>