Added support for showing the current hour
This commit is contained in:
parent
d540139194
commit
d7192b8e6d
|
@ -20,8 +20,9 @@ if !easter || easter.type != "RIP"
|
||||||
.hour.title
|
.hour.title
|
||||||
span= days[match.json.indexOf(day)]
|
span= days[match.json.indexOf(day)]
|
||||||
each hour in day
|
each hour in day
|
||||||
|
- var current = app.locals.time.within_timespan(app.locals.hour_times[day.indexOf(hour)]);
|
||||||
if hour.teacher != 'vrij'
|
if hour.teacher != 'vrij'
|
||||||
.hour(class=(hour.changed == 'true' ? 'changed' : ''))
|
.hour(class=((hour.changed == 'true' ? 'changed' : '') + (current ? ' current' : '')))
|
||||||
each subhour in hour.teacher
|
each subhour in hour.teacher
|
||||||
span.teacher(class='sub_' + hour.teacher.length)
|
span.teacher(class='sub_' + hour.teacher.length)
|
||||||
a(href=hour.teacher[hour.teacher.indexOf(subhour)])= hour.teacher[hour.teacher.indexOf(subhour)]
|
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)]
|
span.time= app.locals.hour_times[match.json[0].indexOf(hour)]
|
||||||
|
|
||||||
else
|
else
|
||||||
.hour.changed
|
.hour.changed(class= current ? ' current' : '')
|
||||||
span.free Vrij
|
span.free Vrij
|
||||||
|
if match.json.indexOf(day) == 0
|
||||||
|
span.time= app.locals.hour_times[match.json[0].indexOf(hour)]
|
||||||
else
|
else
|
||||||
.schedule.rip
|
.schedule.rip
|
||||||
h1 R.I.P
|
h1 R.I.P
|
||||||
|
|
|
@ -257,6 +257,7 @@ div.schedule {
|
||||||
border-bottom: solid 1px #000;
|
border-bottom: solid 1px #000;
|
||||||
border-left: solid 1px #000;
|
border-left: solid 1px #000;
|
||||||
|
|
||||||
|
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
@ -296,6 +297,12 @@ div.schedule {
|
||||||
color: red !important;
|
color: red !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.current {
|
||||||
|
background-color: #0C5489;
|
||||||
|
color: #FFF;
|
||||||
|
text-shadow: 0px -1px 0px #020000;
|
||||||
|
}
|
||||||
|
|
||||||
&.title {
|
&.title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
|
|
Loading…
Reference in a new issue