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
|
||||
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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue