-
Notifications
You must be signed in to change notification settings - Fork 33
/
index.html
218 lines (206 loc) · 8.24 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
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
<!DOCTYPE html>
<html lang="en" manifest="manifest.appcache">
<head>
<title>Unofficial ANU timetable planner</title>
<meta charset="utf-8">
<meta name="description" content="Intuitive timetable builder for the Australian National University.">
<script src="js/underscore.js"></script>
<script src="js/jquery.js"></script>
<script src="js/typeahead.bundle.min.js"></script>
<script src="js/download.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/timetable.js" defer></script>
<script src="js/timetable_analyser.js"></script>
<script src="js/html2canvas.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12">
<div>
<h1 class="title">(Unofficial) ANU Timetable Planner</h1>
<h2 class="title">2021S2 (offline compatible)</h2>
</div>
<p class="course-list-date">Course list updated on <span id="jsonUpdatedTime"></span><br />
<span class="special-note">Not seeing tutorials? Try changing weeks</span></p>
<p><i>Courses chosen: <span id="chosenCourses">Loading data from data/timetable.json...</span> <span id="courses" style="display: inline;"></span></i></p>
</div>
<div class="col-xs-12">
<div class="well form-inline">
<input type="text" id="course-name" class="form-control" style="width:325px" placeholder="Enter a course code here (for example LAWS1201)" autofocus>
<div class="btn-group">
<button id="add-course" class="btn btn-default">Add</button>
<button id="clear-courses" class="btn btn-default">Clear</button>
</div>
<button id="load" class="btn btn-primary hide">Load data from .json</button>
<input type="file" id="file" class="hide">
<div class="btn-group pull-right">
<button id="screenshot" class="btn btn-info">Export .png</button>
<button id="download" class="btn btn-info pull-right">Export .ics</button>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div id="cal-container"></div>
<p> <b> Disclaimer:</b> The website is not updated in real time and information may not be accurate. Please consult with the<a href="http://timetabling.anu.edu.au" target="_blank"> official ANU timetable</a> first and use this website as a planner only. We are not affiliated with the ANU,
so any enquiries should be sent to the <a href="http://issues.anutimetable.com/" target="_blank">ANU timetable builder GitHub project </a>. This includes bugs, inconsistencies, requests for features and so on.</p>
<p> Find previous semesters here: <a href="archive">Archive</a> </p>
</div>
</div>
</div>
<script type="text/template" id="cal-header">BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:ANU Semester 2
X-WR-TIMEZONE:/Australia/Sydney
X-WR-CALDESC:ANU Semester 2.
</script>
<script type="text/template" id="event-template">
BEGIN:VEVENT
DTSTART;TZID=/Australia/Sydney:202107<%= first_day %>T<%= padded_hour %>00
DTEND;TZID=/Australia/Sydney:202107<%= first_day %>T<%= padded_end_hour %>00
RRULE:FREQ=WEEKLY;BYDAY=<%= day.slice(0,2).toUpperCase() %>;UNTIL:20211029T125959Z
EXDATE;TZID=/Australia/Sydney:202107<%= holiday2 %>T<%= padded_hour %>00
EXDATE;TZID=/Australia/Sydney:202107<%= holiday1 %>T<%= padded_hour %>00
DTSTAMP:<%= timestamp%>
CREATED:<%= timestamp%>
DESCRIPTION:<%= description %>
LAST-MODIFIED:<%= timestamp%>
LOCATION:<%= location %>
SEQUENCE:1
UID:anu2021s2_<%= course %>
STATUS:CONFIRMED
SUMMARY:<%= course %>
TRANSP:OPAQUE
END:VEVENT
</script>
<script type="text/template" id="compulsory-event-template">
<div class='lesson' data-eventtype='compulsory'
data-name='<%= item.name %>'>
<span class="glyphicon glyphicon-pushpin"></span>
<strong><%= item.name %></strong>.
<em><%= item.location %></em>.
<%= item.info %>.
<% if (item.note) { %>
<span class="glyphicon glyphicon-info-sign" title="<%= item.note %>"></span>
<% } %>
<i><%= Tools.pad(Math.floor(item.start), 2) + ':' + (item.start == Math.floor(item.start) ? '0' : '3') + '0-' +
Math.floor(item.start + item.dur) + ':' + (item.start + item.dur == Math.floor(item.start + item.dur) ? '0' : '3') + '0' %></i>
</div>
</script>
<script type="text/template" id="group-event-template">
<div class='lesson' data-eventtype='group'
data-group='<%= item.name + filterNumbers(item.info) %>'
data-name='<%= item.name %>'
data-id='<%= item.id %>'>
<strong><%= item.name %></strong>.
<%= item.info %>. <br> <br>
<em><%= item.location %></em>.
<% if (item.note) { %>
<span class="glyphicon glyphicon-info-sign" title="<%= item.note %>"></span>
<% } %>
<i><%= Tools.pad(Math.floor(item.start), 2) + ':' + (item.start == Math.floor(item.start) ? '0' : '3') + '0-' +
Math.floor(item.start + item.dur) + ':' + (item.start + item.dur == Math.floor(item.start + item.dur) ? '0' : '3') + '0' %></i><br>
<a class="choose" data-html2canvas-ignore="true" href>(choose) </a> <a class="hide_temp" data-html2canvas-ignore="true" href>(hide)</a>
</div>
</script>
<script type="text/template" id="calendar-template">
<table class="table table-striped table-condensed" >
<tbody>
<tr>
<th class="col-sm-1">
<span class="glyphicon glyphicon-chevron-left cursor" onclick="Calendar.shiftWeek(-1)"></span>
<span id="week-num"></span>
<span class="glyphicon glyphicon-chevron-right cursor" onclick="Calendar.shiftWeek(1)"></span>
</th>
<% for (var i = 0; i < 5; i++) { %>
<th class="col-sm-2"><%= Calendar.weekdaysFull[i] %></th>
<% } %>
</tr>
<% for (var hour = start_hour; hour < end_hour; hour += 0.5) { %>
<tr class="timetable-row" data-hour="<%= hour %>"
<% if (hour < normal_start_hour || hour >= normal_end_hour) { %>
style='display:none'
<% } %>
>
<th>
<%= Tools.pad(Math.floor(hour), 2) %>:<%= hour == Math.floor(hour) ? '0' : '3' %>0
</th>
<% for (var i = 0; i < 5; i++) { %>
<td class="timeslot" data-hour="<%= hour %>" data-day="<%= Calendar.weekdays[i] %>" data-index="-1">
</td>
<% } %>
</tr>
<% } %>
</tbody>
</table>
</script>
<script>
if(window.location.protocol !== 'file:') {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-64755004-1', 'auto');
ga('send', 'pageview');
}
</script>
<style>
#deprecation-dialog-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.4);
z-index: 100000;
}
#deprecation-dialog {
background: white;
padding: 26px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
max-width: 600px;
width: 80%;
}
#deprecation-dialog h1 {
margin-top: 0;
}
#deprecation-dialog p {
font-size: 16px;
color: black;
margin: 10px 0 0 0;
}
#deprecation-dialog a {
margin: 10px 0 0 0;
display: block;
width: 100%;
text-align: center;
font-size: 18px;
}
#deprecation-dialog button {
color: black;
margin: 10px 0 0 0;
}
</style>
<div id="deprecation-dialog-container">
<div id="deprecation-dialog">
<h1>New unofficial timetable available!</h1>
<p>
The ANU Computer Science Students' Association is pleased to announce a new unofficial timetable planner. It is available here:
</p>
<a href="https://timetable.cssa.club/">https://timetable.cssa.club/</a>
<p>It's updated for 2022 semester 1 and has lots of new features including a timezone dropdown and the ability to link to external calendars.</p>
<button onclick="document.getElementById('deprecation-dialog-container').style.display='none'">Close</button>
</div>
</div>
</body>
</html>