-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubject-searcher.html
More file actions
172 lines (160 loc) · 6.52 KB
/
subject-searcher.html
File metadata and controls
172 lines (160 loc) · 6.52 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Subject Searcher</title>
<link rel="stylesheet" href="styles.css">
<script src="subject-searcher.js" defer></script>
<style>
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-start;
height: 100vh;
overflow: auto;
margin: 0;
background-color: #1a1a1a;
color: #f0f0f0;
}
main {
width: 80%;
margin: 20px 0;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
th {
background-color: #1a1a1a;
color: #f0f0f0;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f0f0f0;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
color: #000;
}
.dropdown-content input {
margin: 5px;
}
.dropdown-content label {
display: block;
padding: 5px;
cursor: pointer;
}
.dropdown-content label:hover {
background-color: #ddd;
}
.dropdown:hover .dropdown-content {
display: block;
}
.search-box {
margin-bottom: 20px;
}
.credit {
font-size: 5px;
color: #383838;
margin-top: 20px;
}
</style>
</head>
<body>
<main>
<h1>Subject List</h1>
<div class="search-box">
<input type="text" id="keywordInput" placeholder="Type a keyword to search..." oninput="filterSubjects()">
</div>
<div class="search-box">
<input type="text" id="excludeKeywordInput" placeholder="Type a keyword to exclude..." oninput="filterSubjects()">
</div>
<div class="dropdown">
<button>Filter by Exam</button>
<div class="dropdown-content">
<label><input type="checkbox" id="filterExamAll" value="all" onchange="toggleAll('filterExam')" checked> All</label>
<label><input type="checkbox" class="filterExam" value="hasExam" onchange="filterSubjects()"> Has Exam</label>
<label><input type="checkbox" class="filterExam" value="noExam" onchange="filterSubjects()"> No Exam</label>
</div>
</div>
<div class="dropdown">
<button>Filter by Essay</button>
<div class="dropdown-content">
<label><input type="checkbox" id="filterEssayAll" value="all" onchange="toggleAll('filterEssay')" checked> All</label>
<label><input type="checkbox" class="filterEssay" value="hasEssay" onchange="filterSubjects()"> Has Essay</label>
<label><input type="checkbox" class="filterEssay" value="noEssay" onchange="filterSubjects()"> No Essay</label>
</div>
</div>
<div class="dropdown">
<button>Filter by Prefix</button>
<div class="dropdown-content">
<label><input type="checkbox" id="filterPrefixAll" value="all" onchange="toggleAll('filterPrefix')" checked> All</label>
<label><input type="checkbox" class="filterPrefix" value="MA" onchange="filterSubjects()"> MA</label>
<label><input type="checkbox" class="filterPrefix" value="SC" onchange="filterSubjects()"> SC</label>
<label><input type="checkbox" class="filterPrefix" value="CP" onchange="filterSubjects()"> CP</label>
<label><input type="checkbox" class="filterPrefix" value="CC" onchange="filterSubjects()"> CC</label>
<label><input type="checkbox" class="filterPrefix" value="EE" onchange="filterSubjects()"> EE</label>
<label><input type="checkbox" class="filterPrefix" value="EG" onchange="filterSubjects()"> EG</label>
<label><input type="checkbox" class="filterPrefix" value="PH" onchange="filterSubjects()"> PH</label>
</div>
</div>
<div class="availability">
<h2>Availability</h2>
<div class="dropdown">
<button>Filter by Campus</button>
<div class="dropdown-content">
<label><input type="radio" name="campus" id="filterCampusAll" value="all" onchange="filterSubjects()" checked> All</label>
<label><input type="radio" name="campus" class="filterCampus" value="Cairns Nguma-bada" onchange="filterSubjects()"> Cairns</label>
<label><input type="radio" name="campus" class="filterCampus" value="Townsville Bebegu Yumba" onchange="filterSubjects()"> Townsville</label>
<label><input type="radio" name="campus" class="filterCampus" value="JCU Singapore" onchange="filterSubjects()"> Singapore</label>
<label><input type="radio" name="campus" class="filterCampus" value="Brisbane" onchange="filterSubjects()"> Brisbane</label>
<!-- Add other campuses if needed -->
</div>
</div>
<div class="dropdown">
<button>Filter by Period</button>
<div class="dropdown-content">
<label><input type="radio" name="period" id="filterPeriodAll" value="all" onchange="filterSubjects()" checked> All</label>
<label><input type="radio" name="period" class="filterPeriod" value="Study Period 1" onchange="filterSubjects()"> Study Period 1</label>
<label><input type="radio" name="period" class="filterPeriod" value="Study Period 2" onchange="filterSubjects()"> Study Period 2</label>
<label><input type="radio" name="period" class="filterPeriod" value="Trimester 1" onchange="filterSubjects()"> Trimester 1</label>
<label><input type="radio" name="period" class="filterPeriod" value="Trimester 2" onchange="filterSubjects()"> Trimester 2</label>
<label><input type="radio" name="period" class="filterPeriod" value="Trimester 3" onchange="filterSubjects()"> Trimester 3</label>
</div>
</div>
<div class="search-box">
<input type="text" id="lecturerWantInput" placeholder="Lecturer Want..." oninput="filterSubjects()">
</div>
<div class="search-box">
<input type="text" id="lecturerNotWantInput" placeholder="Lecturer Not Want..." oninput="filterSubjects()">
</div>
</div>
<table id="subjectsTable">
<thead>
<tr>
<th>Subject Code</th>
<th>Name</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="credit">
Data sourced from <a href="https://github.com/H-unter/Subject-Web-Scraper/tree/main" target="_blank" style="color: #383838;">H-unter/Subject-Web-Scraper</a>
</div>
</main>
</body>
</html>