diff --git a/resources/jade/schedule.jade b/resources/jade/schedule.jade index 47ce2a5..e16ab0b 100644 --- a/resources/jade/schedule.jade +++ b/resources/jade/schedule.jade @@ -20,8 +20,9 @@ if !easter || easter.type != "RIP" .hour.title span= days[match.json.indexOf(day)] each hour in day + - var current = app.locals.time.within_timespan(app.locals.hour_times[day.indexOf(hour)]); if hour.teacher != 'vrij' - .hour(class=(hour.changed == 'true' ? 'changed' : '')) + .hour(class=((hour.changed == 'true' ? 'changed' : '') + (current ? ' current' : ''))) each subhour in hour.teacher span.teacher(class='sub_' + hour.teacher.length) a(href=hour.teacher[hour.teacher.indexOf(subhour)])= hour.teacher[hour.teacher.indexOf(subhour)] @@ -33,8 +34,10 @@ if !easter || easter.type != "RIP" span.time= app.locals.hour_times[match.json[0].indexOf(hour)] else - .hour.changed + .hour.changed(class= current ? ' current' : '') span.free Vrij + if match.json.indexOf(day) == 0 + span.time= app.locals.hour_times[match.json[0].indexOf(hour)] else .schedule.rip h1 R.I.P diff --git a/resources/less/style.less b/resources/less/style.less index 6e22ef8..5d7d30d 100644 --- a/resources/less/style.less +++ b/resources/less/style.less @@ -257,6 +257,7 @@ div.schedule { border-bottom: solid 1px #000; border-left: solid 1px #000; + &:last-child { border-bottom: none; } @@ -296,6 +297,12 @@ div.schedule { color: red !important; } + &.current { + background-color: #0C5489; + color: #FFF; + text-shadow: 0px -1px 0px #020000; + } + &.title { text-align: center; background-color: #000; diff --git a/time.js b/time.js index f4fcc3e..058f464 100644 --- a/time.js +++ b/time.js @@ -38,4 +38,3 @@ module.exports = { 'within_timespan': within_timespan, 'during_school': during_school } -