forked from mdchia/anutimetable
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
154 lines (145 loc) · 6.27 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
<!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="shortcut icon" href="favicon.ico" />
<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">2018S2 (offline compatible)</h2>
</div>
<p class="course-list-date">Course list updated on <span id="jsonUpdatedTime"></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/sws2018/"> 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="https://github.com/mdchia/anutimetable" target="_blank">ANU timetable builder GitHub project </a>. This includes bugs, inconsistencies, requests for features and so on.</p>
<a href='https://ko-fi.com/mdchia'>Support development on Ko-fi</a>
</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:201807<%= first_day %>T<%= padded_hour %>00
DTEND;TZID=/Australia/Sydney:201807<%= first_day %>T<%= padded_end_hour %>00
RRULE:FREQ=WEEKLY;COUNT=15;BYDAY=<%= day.slice(0,2).toUpperCase() %>
EXDATE;TZID=/Australia/Sydney:201807<%= holiday2 %>T<%= padded_hour %>00
EXDATE;TZID=/Australia/Sydney:201807<%= holiday1 %>T<%= padded_hour %>00
DTSTAMP:20180718T000000Z
CREATED:20180718T000000Z
DESCRIPTION:<%= description %>
LAST-MODIFIED:20180718T000000Z
LOCATION:<%= location %>
SEQUENCE:1
UID:anu2018s2_<%= 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>
</body>
</html>