-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
297 lines (281 loc) · 11.6 KB
/
main.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
297
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0" /> -->
<title>Fractable</title>
<link rel="stylesheet" href="./styles.css" type="text/css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
</style>
<!-- Favicon -->
<link rel="icon" href="./assets/favicon/fractable-icon.svg">
<link rel="icon" href="./assets/favicon/fractable-icon.png">
<link rel="apple-touch-icon" href="./assets/favicon/fractable-icon.png">
<link rel="icon" href="/assets/favicon/fractable-icon.ico" />
<!-- iPhone -->
<meta content="width=device-width, initial-scale=1" name="viewport" />
</head>
<body>
<nav>
<span class="tx-normal"><a href="https://www.anupchavan.com">Anup Chavan</a></span>
<span class="separator">/</span>
<span>Projects</span>
</nav>
<content>
<button title="Switch to Dark Mode" id="theme-toggler" aria-label="Switch to Dark Mode" onclick="toggleTheme()">
<toggle></toggle>
</button>
<h1>Fractable</h1>
<p>Fractable is a quick timetable generator made for the fractal academic system followed at IIT Hyderabad. </p>
<p>Simply add your courses and their details to generate a timetable.</p>
<!-- add a caution that the web page is in development -->
<!-- <p class="center caution">This webpage is not completed. Please report any bugs or issues to the developer.</p> -->
<div id="add-entry" class="center">
<span class="eyebrow">
<input type="text" placeholder="ID1063" id="course-code" class="inputs course-code">
<input type="text" placeholder="Intro to Programming" id="course-name" class="inputs course-name">
<input type="text" placeholder="LH 5 (Optional)" id="course-location" class="inputs location">
<select id="slot-selector" class="inputs">
<option id="slot_a">Slot A</option>
<option id="slot_b">Slot B</option>
<option id="slot_c">Slot C</option>
<option id="slot_d">Slot D</option>
<option id="slot_e">Slot E</option>
<option id="slot_f">Slot F</option>
<option id="slot_g">Slot G</option>
<option id="slot_p">Slot P</option>
<option id="slot_q">Slot Q</option>
<option id="slot_r">Slot R</option>
<option id="slot_s">Slot S</option>
<option id="slot_fn1">Slot FN1</option>
<option id="slot_an1">Slot AN1</option>
<option id="slot_fn2">Slot FN2</option>
<option id="slot_an2">Slot AN2</option>
<option id="slot_fn3">Slot FN3</option>
<option id="slot_fn4">Slot FN4</option>
<option id="slot_an4">Slot AN4</option>
<option id="slot_fn5">Slot FN5</option>
<option id="slot_an5">Slot AN5</option>
</select>
<!-- <span>•</span> -->
<input type="text" placeholder="1-6" id="segment" class="inputs segment" aria-label="Segment"
title="Segment">
<input type="text" placeholder="Instructors" id="instructors" class="inputs instructors">
</span>
<button type="button" id="add-course" class="submit-button">Add Course</button>
</div>
<section>
<table id="output-table" class="center wide">
<thead>
<th id="clear-data"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-eraser">
<path
d="m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21" />
<path d="M22 21H7" />
<path d="m5 11 9 9" />
</svg></th>
<th>9.00<br>9.55</th>
<th>10:00<br>10.55</th>
<th>11.00<br>11.55</th>
<th>12.00<br>12.55</th>
<th>12.55<br>14.30</th>
<th>14.30<br>15.55</th>
<th>16.00<br>17.25</th>
<!-- <td></td>
<td>18.00<br>19.25</td>
<td>19.30<br>21.00</td> -->
</thead>
<tbody>
<tr>
<td class="day">MON</td>
<td id="fn1" class="hidden" colspan="3">FN1</td>
<td id="a">A</td>
<td id="b">B</td>
<td id="c">C</td>
<td id="d" class="force">D</td>
<td rowspan="10" class="vertical-text"><svg xmlns="http://www.w3.org/2000/svg" width="24"
height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-utensils">
<path d="M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2" />
<path d="M7 2v20" />
<path d="M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7" />
</svg></td>
<td id="an1" class="hidden" colspan="2">AN1</td>
<td id="p">P</td>
<td id="q">Q</td>
</tr>
<tr>
<td class="day">TUE</td>
<td id="fn2" class="hidden" colspan="3">FN2</td>
<td id="d">D</td>
<td id="e">E</td>
<td id="f">F</td>
<td id="g">G</td>
<td id="an2" class="hidden" colspan="2">AN2</td>
<td id="r">R</td>
<td id="s">S</td>
</tr>
<tr>
<td class="day">WED</td>
<td id="fn3" class="hidden" colspan="3">FN3</td>
<td id="b">B</td>
<td id="c">C</td>
<td id="a">A</td>
<td id="g">G</td>
<td id="f" colspan="2" class="force">Lab (F)</td>
</tr>
<tr>
<td class="day">THU</td>
<td id="fn4" class="hidden" colspan="3">FN4</td>
<td id="c">C</td>
<td id="a">A</td>
<td id="b">B</td>
<td id="e" class="force">E</td>
<td id="an4" class="hidden" colspan="2">AN4</td>
<td id="q">Q</td>
<td id="p">P</td>
</tr>
<tr>
<td class="day">FRI</td>
<td id="fn5" class="hidden" colspan="3">FN5</td>
<td id="e">E</td>
<td id="f">F</td>
<td id="d">D</td>
<td id="g">G</td>
<td id="an5" class="hidden" colspan="2">AN5</td>
<td id="s">S</td>
<td id="r">R</td>
</tr>
</tbody>
</table>
</section>
<div class="actions">
<div class="center" style="margin-top: 2em"><button id="print-table" class="output-options"><svg
xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="lucide lucide-printer">
<path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2" />
<path d="M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6" />
<rect x="6" y="14" width="12" height="8" rx="1" />
</svg><span>Print</span></button></div>
<div class="center" style="margin-top: 2em"><button id="export-ics" class="output-options">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="lucide lucide-calendar-arrow-down">
<path d="m14 18 4 4 4-4" />
<path d="M16 2v4" />
<path d="M18 14v8" />
<path d="M21 11.354V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.343" />
<path d="M3 10h18" />
<path d="M8 2v4" />
</svg><span>Add to Calendar</span></button></div>
<div class="center" style="margin-top: 2em"><button id="export-google-calendar" class="output-options">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
class="lucide lucide-calendar-arrow-down">
<path d="m14 18 4 4 4-4" />
<path d="M16 2v4" />
<path d="M18 14v8" />
<path d="M21 11.354V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7.343" />
<path d="M3 10h18" />
<path d="M8 2v4" />
</svg><span>Google Calendar</span></button></div>
</div>
<!-- <section>
<h2>Create table in a few clicks: Bookmarklet</h2>
You can create a bookmarklet to create the timetable in a few clicks <br>
To create the bookmarklet, simply drag the "Fractabler" link below into your bookmarks.
<br>
<a id="bookmarklet" href="">Fractabler</a>
<br>
Then click the bookmark when you are on the course registration form page in ERP.
<br>
</section> -->
<!-- <section class="todo-section">
<h2>Changelog</h2>
<table class="changelog">
<tr>
<td>18 January 2025</td>
<td>The webpage now loads with its theme set to the system theme 😊</td>
</tr>
<tr>
<td>18 January 2025</td>
<td>Added new shortcut: press <code>d</code> to toggle theme.</td>
</tr>
<tr>
<td>27 July 2024</td>
<td>Added forenoon and afternoon slots ⚒️</td>
</tr>
<tr>
<td>27 July 2024</td>
<td>Added changelog 🙄</td>
</tr>
</table>
<!-- <details>
<summary>To-do</summary>
You can contribute to the code through Pull Requests and Bug Reports on the <a
href="https://github.com/PurposeRefined1179/fractable" target="_blank">GitHub repository</a>.
<ul class="todo-list">
<li><b>Core Functionalities</b>
<ul class="todo-list">
<li><input type="checkbox" checked><span class="completed">Colors for remaining slots (P,
Q, R and
S)</span>
</li>
<li><input type="checkbox"><span class="completed">Accessibility for screen readers</span>
</li>
</li>
<li><input type="checkbox">Mobile: remove table and add a schedule (sorted by day)
</li>
<li><input type="checkbox">Schedule: sort by subject</li>
</li>
</ul>
<li>
<li><b>Styling</b>
<ul class="todo-list">
<li><input type="checkbox">Responsive Design</li>
<li><input type="checkbox">User-defined colors</li>
<li><input type="checkbox">Monochrome colors</li>
<li><input type="checkbox" checked>Inputs</li>
<li><input type="checkbox" checked>Dark mode toggle</li>
<li><input type="checkbox" checked>Favicon</li>
<li><input type="checkbox" checked>Add AN and FN slots</li>
</ul>
</li>
<li><b>Other</b>
<ul class="todo-list">
<li><input type="checkbox">Display error message when two or more courses added conflict in slots (e.g.
FN1 and A)</li>
<li><input type="checkbox">"Download as PDF" button</li>
<li><input type="checkbox">Reminder Shortcut (iOS + iPadOS + macOS)</li>
<li><input type="checkbox">(Speculative) Google Calendar Integration</li>
<li><input type="checkbox" checked>js Bookmarklet (will make this app work without having to
enter any input -
extracts html from <a href="https://erp.iith.ac.in">IITH ERP website</a>)</li>
<li><input type="checkbox" checked>"Print" button</li>
</ul>
<li><input type="checkbox">(speculative++) Clean js and css code</li>
</ul>
</li>
</details> -->
</section>
<dialog id="confirm-close-dialog">
<p class="discard-message-text">Discard changes?</p>
<form method="dialog">
<div class="confirm-close-dialog-btn-container">
<button id="cancel-btn" class="button">
Cancel
</button>
<button id="discard-btn" class="cancel-button">
Discard
</button>
</div>
</dialog>
</content>
</body>
<script src="./scripts/main.js"></script>
<script src="./scripts/bookmarklet.js"></script>
<script src="./scripts/print_and_save.js"></script>
</html>