Made current hours highlighted on schedules.
This commit is contained in:
parent
2bad728b68
commit
684d7c7a52
2 changed files with 3 additions and 3 deletions
|
|
@ -21,8 +21,8 @@ if !easter || easter.type != "RIP"
|
|||
span= days[match.json.indexOf(day)]
|
||||
each hour in day
|
||||
if hour.teacher != 'vrij'
|
||||
.hour(class=hour.changed == 'true' ? 'changed' : '')
|
||||
each subhour in hour.teacher
|
||||
.hour(class=(hour.changed == 'true' ? 'changed' : '') + (app.locals.time.within_timespan(app.locals.hour_times[match.json[0].indexOf(hour)) ? ' current' : ''))
|
||||
each subhour in hour.teachaer
|
||||
span.teacher(class='sub_' + hour.teacher.length)
|
||||
a(href=hour.teacher[hour.teacher.indexOf(subhour)])= hour.teacher[hour.teacher.indexOf(subhour)]
|
||||
span.chamber(class='sub_' + hour.teacher.length)
|
||||
|
|
|
|||
2
time.js
2
time.js
|
|
@ -7,7 +7,7 @@ function get() {
|
|||
return time.getHours() + (time.getMinutes() / 60);
|
||||
}
|
||||
|
||||
//Function for convert hh:mm to fractured time
|
||||
//Function for convert hh:mm to fractured time (hh.hh)
|
||||
function parse(timestr) {
|
||||
var parsed = timestr.match(/\d{1,2}:\d+/g);
|
||||
var array = [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue