-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
180 lines (166 loc) · 6.96 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
<!doctype html>
<!-- theme toggling -->
<html
x-data="{ theme: (localStorage.getItem('darkMode') === 'true') ? 'dark' : 'light' }"
x-init="$watch('theme', val => localStorage.setItem('darkMode', val === 'dark'))"
x-bind:data-theme="theme"
>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Princeton Available Rooms</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body class="flex flex-col min-h-screen">
<dialog open>
<p class="font-mono">
Upload the latest Available Room List pdf.
<br />
Then click on the left table column titles to sort.
<br />
Search on the right to filter.
</p>
<br />
<form class="text-center" method="dialog">
<button class="font-mono">Ok</button>
</form>
</dialog>
<header>
<div class="navbar bg-base-100">
<div class="navbar-start"></div>
<div class="navbar-center">
<a class="btn btn-ghost text-xl font-mono">
Princeton Available Rooms
</a>
</div>
<!-- theme toggle -->
<div class="navbar-end">
<label class="swap swap-rotate">
<!-- this hidden checkbox controls the state -->
<input
id="theme-toggle"
@click="theme = (theme === 'dark') ? 'light' : 'dark'"
x-init="document.getElementById('theme-toggle').checked = (theme !== 'dark')"
type="checkbox"
/>
<!-- sun icon -->
<svg
class="swap-on fill-current w-10 h-10"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
>
<path
d="M5.64,17l-.71.71a1,1,0,0,0,0,1.41,1,1,0,0,0,1.41,0l.71-.71A1,1,0,0,0,5.64,17ZM5,12a1,1,0,0,0-1-1H3a1,1,0,0,0,0,2H4A1,1,0,0,0,5,12Zm7-7a1,1,0,0,0,1-1V3a1,1,0,0,0-2,0V4A1,1,0,0,0,12,5ZM5.64,7.05a1,1,0,0,0,.7.29,1,1,0,0,0,.71-.29,1,1,0,0,0,0-1.41l-.71-.71A1,1,0,0,0,4.93,6.34Zm12,.29a1,1,0,0,0,.7-.29l.71-.71a1,1,0,1,0-1.41-1.41L17,5.64a1,1,0,0,0,0,1.41A1,1,0,0,0,17.66,7.34ZM21,11H20a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Zm-9,8a1,1,0,0,0-1,1v1a1,1,0,0,0,2,0V20A1,1,0,0,0,12,19ZM18.36,17A1,1,0,0,0,17,18.36l.71.71a1,1,0,0,0,1.41,0,1,1,0,0,0,0-1.41ZM12,6.5A5.5,5.5,0,1,0,17.5,12,5.51,5.51,0,0,0,12,6.5Zm0,9A3.5,3.5,0,1,1,15.5,12,3.5,3.5,0,0,1,12,15.5Z"
/>
</svg>
<!-- moon icon -->
<svg
class="swap-off fill-current w-10 h-10"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
>
<path
d="M21.64,13a1,1,0,0,0-1.05-.14,8.05,8.05,0,0,1-3.37.73A8.15,8.15,0,0,1,9.08,5.49a8.59,8.59,0,0,1,.25-2A1,1,0,0,0,8,2.36,10.14,10.14,0,1,0,22,14.05,1,1,0,0,0,21.64,13Zm-9.5,6.69A8.14,8.14,0,0,1,7.08,5.22v.27A10.15,10.15,0,0,0,17.22,15.63a9.79,9.79,0,0,0,2.1-.22A8.11,8.11,0,0,1,12.14,19.73Z"
/>
</svg>
</label>
<!-- github -->
<a
aria-label="Github"
target="_blank"
href="https://github.com/BlazerYoo/"
rel="noopener, noreferrer"
class="btn btn-ghost drawer-button btn-square normal-case"
>
<svg
width="20"
height="20"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
class="inline-block h-5 w-5 fill-current md:h-6 md:w-6"
>
<path
d="M256,32C132.3,32,32,134.9,32,261.7c0,101.5,64.2,187.5,153.2,217.9a17.56,17.56,0,0,0,3.8.4c8.3,0,11.5-6.1,11.5-11.4,0-5.5-.2-19.9-.3-39.1a102.4,102.4,0,0,1-22.6,2.7c-43.1,0-52.9-33.5-52.9-33.5-10.2-26.5-24.9-33.6-24.9-33.6-19.5-13.7-.1-14.1,1.4-14.1h.1c22.5,2,34.3,23.8,34.3,23.8,11.2,19.6,26.2,25.1,39.6,25.1a63,63,0,0,0,25.6-6c2-14.8,7.8-24.9,14.2-30.7-49.7-5.8-102-25.5-102-113.5,0-25.1,8.7-45.6,23-61.6-2.3-5.8-10-29.2,2.2-60.8a18.64,18.64,0,0,1,5-.5c8.1,0,26.4,3.1,56.6,24.1a208.21,208.21,0,0,1,112.2,0c30.2-21,48.5-24.1,56.6-24.1a18.64,18.64,0,0,1,5,.5c12.2,31.6,4.5,55,2.2,60.8,14.3,16.1,23,36.6,23,61.6,0,88.2-52.4,107.6-102.3,113.3,8,7.1,15.2,21.1,15.2,42.5,0,30.7-.3,55.5-.3,63,0,5.4,3.1,11.5,11.4,11.5a19.35,19.35,0,0,0,4-.4C415.9,449.2,480,363.1,480,261.7,480,134.9,379.7,32,256,32Z"
></path>
</svg>
</a>
</div>
</div>
</header>
<!-- file upload + results view -->
<main class="flex-grow flex-col flex items-center justify-evenly">
<p
id="banner"
class="font-mono text-3xl md:text-5xl text-center will-fade"
>
Upload the latest
<br />
Available Room List pdf
</p>
<input
type="file"
class="file-input file-input-bordered file-input-warning w-9/12"
accept="application/pdf"
id="file-input"
/>
<br />
<div id="output" class="flex w-full">
<div
id="table-div"
class="card rounded-box grid h-20 flex-grow place-items-center w-2/5 overflow-y-auto outer-card"
></div>
<div class="divider divider-horizontal"></div>
<div
id="outer-search-stats-div"
class="card rounded-box grid h-20 flex-grow place-items-center w-3/5 outer-card"
>
<div
id="search-stats-div"
class="flex w-full flex-col border-opacity-50"
>
<div class="card rounded-box grid h-20 place-items-center">
<div class="label">
<span class="label-text">Search to filter</span>
</div>
<label class="input input-bordered flex items-center gap-2">
<input
id="search-query"
type="text"
class="grow"
placeholder="Search"
/>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
fill="currentColor"
class="h-4 w-4 opacity-70"
>
<path
fill-rule="evenodd"
d="M9.965 11.026a5 5 0 1 1 1.06-1.06l2.755 2.754a.75.75 0 1 1-1.06 1.06l-2.755-2.754ZM10.5 7a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z"
clip-rule="evenodd"
/>
</svg>
</label>
</div>
<div class="divider"></div>
<div
id="stats-div"
class="card rounded-box grid h-20 place-items-center overflow-y-auto"
></div>
</div>
</div>
</div>
</main>
<!-- footer -->
<footer class="footer footer-center p-4 bg-base-100 text-base-content">
<aside>
<p class="font-mono">
<a target="_blank" href="https://github.com/BlazerYoo">BYOO</a>
</p>
</aside>
</footer>
<!-- load libraries + main script -->
<script src="dist/bundle.js"></script>
</body>
</html>