-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrecords.html
296 lines (256 loc) · 12.7 KB
/
records.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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<html>
<head>
<meta charset="utf-8">
<title>NTHU 個人修課紀錄</title>
<link rel="stylesheet" href="library/bootstrap.min.css"">
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.3/css/all.css">
<script src="library/d3.v4.min.js"></script>
<script src="library/bootstrap.bundle.min.js"></script>
<style>
@import url('https://fonts.googleapis.com/css?family=Noto+Sans+TC:light');
body {
font-family: 'Noto Sans TC', sans-serif;
background-color: rgb(248, 248, 248);
}
#top-bar {
background-color: white;
border-radius: 0px 0px 20px 20px;
box-shadow: 0 1px 2px 0 rgb(60 64 67 / 20%), 0 2px 6px 2px rgb(60 64 67 / 5%);
}
#data-card {
margin-top: 20px;
padding: 15px;
background-color: white;
border-radius: 20px;
box-shadow: 0 1px 2px 0 rgb(60 64 67 / 20%), 0 2px 6px 2px rgb(60 64 67 / 5%);
}
.btn-wrap {
font-size: .875em;
/* white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; */
}
.btn-grade {
color: black;
border-width: 1px;
border-color: #ced4da;
border-radius: 10px;
font-size: .875em;
transition: background-color 300ms ease;
}
.btn-grade:hover {
background-color: rgb(248, 248, 248);
}
.btn-grade.checked {
background-color: #ced4da;
}
.dropdown-menu {
border-radius: 10px;
box-shadow: 0 1px 2px 0 rgb(60 64 67 / 20%), 0 2px 6px 2px rgb(60 64 67 / 5%);
}
svg foreignObject {
pointer-events: none;
}
.course-text-container {
transition: all 800ms ease;
display: table-cell;
align-items: center;
}
.course-text {
transition: color 300ms ease;
font-size: 14px;
color: aliceblue;
display: table-cell;
text-align: center;
vertical-align: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.course-text.lowlight {
color: grey !important;
}
.lowlight {
pointer-events: none !important;
}
rect {
transition: fill 300ms ease;
}
rect.lowlight {
fill: rgb(248, 248, 248) !important;
opacity: 1 !important;
stroke: #6c757d !important;
}
#card-bar {
display: -webkit-inline-box;
width: 100%;
user-select: none;
cursor: pointer;
transition: all 0.2s;
transform: scale(0.98);
}
#card-bar.drag {
cursor: grabbing;
cursor: -webkit-grabbing;
transform: scale(1);
}
.depart-card {
width: 135px;
border-radius: 10px;
box-shadow: 0 1px 2px 0 rgb(60 64 67 / 20%), 0 2px 6px 2px rgb(60 64 67 / 5%);
}
.depart-card-header {
border-radius: 10px 10px 0px 0px !important;
color: aliceblue;
}
.fas {
line-height: 1.5;
}
</style>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-sm-10 offset-sm-1">
<div class="row" id="topbar" style="margin-left: 15px; margin-top: 10px;">
<div class="col-sm-2">
<h4>
<b>NTHU 個人修課紀錄</b>
</h4>
<small style="color: #6c757d">@snowmeow<sup>2</sup> <a target="_blank"
href=" https://github.com/snowmeow2/NTHU-Course-Visualization">GitHub</a></small>
</div>
<div class="col-sm-8 py-3" style="text-align: center;">
<h6>
<span id="student-id"></span> | <span id="student-name"></span> | <span
id="student-department"></span>
</h6>
</div>
</div>
<div class="row">
<div id="tree-container" class="col-md-10 offset-md-1">
<div id="course_map" style="text-align: center"></div>
</div>
</div>
<div class="row align-items-center justify-content-between" id="data-card">
<div class="col-md-4 controller">
<div class="row">
<div class="col">
<div class="btn-group mb-3">
<button type="button" id="btn-year" class="btn btn-grade"><span></span> 學年</button>
<button type="button" class="btn btn-grade dropdown-toggle dropdown-toggle-split"
data-bs-toggle="dropdown" aria-expanded="false">
<span class="visually-hidden">Toggle Dropdown</span>
</button>
<ul id="dropdown-year-menu" class="dropdown-menu">
</ul>
</div>
<div class="btn-group mb-3">
<button type="button" id="btn-semester" class="btn btn-grade">學期</button>
<button type="button" class="btn btn-grade dropdown-toggle dropdown-toggle-split"
data-bs-toggle="dropdown" aria-expanded="false">
<span class="visually-hidden">Toggle Dropdown</span>
</button>
<ul class="dropdown-menu">
<li><span class="dropdown-item dropdown-semester" data="10">上學期</span></li>
<li><span class="dropdown-item dropdown-semester" data="20">下學期</span></li>
<li><span class="dropdown-item dropdown-semester" data="30">暑期</span></li>
</ul>
</div>
<span></span>
<button type="button" id="reset" class="btn btn-grade mb-3"
style="border-width: 0px; background-color: rgb(248, 248, 248);"><i
class="fas fa-redo"></i>
</button>
</div>
</div>
<div class="row justify-content-between py-1">
<div class="col-md-7 px-4">
<h6 id="course-id">科號</h6>
<h4 id="course-name">科目名稱</h4>
<h3 style="text-align: center;"><b id="score">-</b></h3>
</div>
<div class="col-md-5">
<div class="row justify-content-between">
<div class="col-auto">
<p style="color: #6c757d">學分數</p>
</div>
<div class="col-auto">
<h5><b id="credits">-</b></h5>
</div>
</div>
<div class="row justify-content-between align-items-center mb-1 mt-1">
<div class="col-auto">
<p class="form-control-plaintext" style="color: #6c757d">相對成績</p>
</div>
<div class="col-auto">
<button id="rel-score" type="button" class="btn btn-grade" data="-"
data2="-">-</button>
</div>
</div>
<div class="row justify-content-between">
<div class="col-auto">
<p class="form-control-plaintext" style="color: #6c757d">T分數</p>
</div>
<div class="col-auto">
<button id="t-score" type="button" class="btn btn-grade" data="-"
data2="-">-</button>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-2 border-start border-end px-4 controller">
<h6>切換成績顯示</h6>
<div class="btn-group mb-3" role="group" id="score-radio"
aria-label="Basic radio toggle button group">
<input type="radio" class="btn-check" name="btnradio" id="btn-score-abc" autocomplete="off"
checked>
<label class="btn btn-outline-primary btn-wrap" for="btn-score-abc"
style="border-radius: 10px 0 0 10px;">等級制</label>
<input type="radio" class="btn-check" name="btnradio" id="btn-score-per" autocomplete="off">
<label class="btn btn-outline-primary btn-wrap" for="btn-score-per">百分制</label>
<input type="radio" class="btn-check" name="btnradio" id="btn-score-gpa" autocomplete="off">
<label class="btn btn-outline-primary btn-wrap" for="btn-score-gpa"
style="border-radius: 0 10px 10px 0;">GPA</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="card_lock">
<label class="form-check-label" for="flexSwitchCheckChecked">鎖定左側科目資訊</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="show_fail" checked>
<label class="form-check-label" for="flexSwitchCheckChecked">顯示未通過科目</label>
</div>
</div>
<div class="col-md-6" id="bar-card">
<div class="row mx-1 mt-2 justify-content-evenly">
<div class="col-auto py-1">
<button class="btn btn-grade" id="hide-control-btn"><i
class="fas fa-expand"></i></button>
<!-- <h6 style="display: inline;">
<b>-</b>
</h6>
<span> </span> -->
<button class="btn btn-grade" id="total-classes">- 門課</button>
<button class="btn btn-grade" id="total-credits">- 學分</button>
</div>
<div class="col-sm-8 py-1">
<div id="bar-plot" style="text-align: center;"></div>
</div>
</div>
<div class="row justify-content-evenly">
<div class="col-auto" id="card-container">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript" charset="UTF-8" src="static/data.js"></script>
<script type="text/javascript" charset="UTF-8" src="records.js"></script>
</html>