Fully intergrated new way of supplying configuration variables.
This commit is contained in:
parent
cc2e7cf806
commit
602251df4c
|
@ -1,6 +1,6 @@
|
||||||
//links.jade
|
//- links.jade
|
||||||
div.links
|
div.links
|
||||||
each properties, name in links
|
each properties, name in app.locals.linkbar
|
||||||
div
|
div
|
||||||
a(href=properties[0], style='background-color:' + properties[1])=name
|
a(href=properties[0], style='background-color:' + properties[1])=name
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ if !easter || easter.type != "RIP"
|
||||||
span.course(class='sub_' + hour.teacher.length)= hour.course[hour.teacher.indexOf(subhour)]
|
span.course(class='sub_' + hour.teacher.length)= hour.course[hour.teacher.indexOf(subhour)]
|
||||||
|
|
||||||
if match.json.indexOf(day) == 0
|
if match.json.indexOf(day) == 0
|
||||||
span.time= times[match.json[0].indexOf(hour)]
|
span.time= app.locals.hour_times[match.json[0].indexOf(hour)]
|
||||||
|
|
||||||
else
|
else
|
||||||
.hour.changed
|
.hour.changed
|
||||||
|
|
4
web.js
4
web.js
|
@ -18,8 +18,8 @@ config().env == 'dev' ? app.disable('view cache') : null; //If the environment i
|
||||||
app.set('views', __dirname + '/resources/jade');
|
app.set('views', __dirname + '/resources/jade');
|
||||||
|
|
||||||
//Give the app some configuration information
|
//Give the app some configuration information
|
||||||
app.local.linkbar = config().linkbar;
|
app.locals.linkbar = config().linkbar;
|
||||||
app.local.hour_times = config().hour_times;
|
app.locals.hour_times = config().hour_times;
|
||||||
|
|
||||||
//Set up all static directories for getting resources.
|
//Set up all static directories for getting resources.
|
||||||
app.use('/css', less(__dirname + '/resources/less'));
|
app.use('/css', less(__dirname + '/resources/less'));
|
||||||
|
|
Loading…
Reference in a new issue