diff --git a/resources/jade/schedule.jade b/resources/jade/schedule.jade index f0cc803..c376ec4 100644 --- a/resources/jade/schedule.jade +++ b/resources/jade/schedule.jade @@ -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) diff --git a/time.js b/time.js index afb4d2e..f4fcc3e 100644 --- a/time.js +++ b/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 = [];