Added a link menu for quickly navigating school related websites
This commit is contained in:
parent
64857e8d48
commit
2bb72b97a1
|
@ -18,7 +18,12 @@ module.exports = function () {
|
|||
'14:40 - 15:40',
|
||||
'15:40 - 16:40'
|
||||
],
|
||||
'school_id' : 934
|
||||
'school_id' : 934,
|
||||
'links' : {
|
||||
'Login': ['#', '#96AA48'],
|
||||
'Magister': ['http://werkman.magister.net', '#0C5489'],
|
||||
'Mail': ['https://login.microsoftonline.com/', '#C41824']
|
||||
}
|
||||
}
|
||||
fs.writeFileSync(__dirname + '/settings.json', JSON.stringify(settings, null, 2));
|
||||
|
||||
|
|
|
@ -3,3 +3,5 @@ include header
|
|||
div.homepage
|
||||
input.search(type="text", name="searchterm", placeholder="Je naam, id, klassennaam, docentencode, lokaalcode")
|
||||
button.search Zoeken
|
||||
|
||||
include links
|
||||
|
|
6
resources/jade/links.jade
Normal file
6
resources/jade/links.jade
Normal file
|
@ -0,0 +1,6 @@
|
|||
//links.jade
|
||||
div.links
|
||||
each properties, name in links
|
||||
div
|
||||
a(href=properties[0], target='_blank' style='background-color:' + properties[1])=name
|
||||
|
|
@ -18,8 +18,10 @@ div.schedule
|
|||
span.course= hour.course
|
||||
|
||||
if match.json.indexOf(day) == 0
|
||||
span.time= match.times[match.json[0].indexOf(hour)]
|
||||
span.time= times[match.json[0].indexOf(hour)]
|
||||
|
||||
else
|
||||
div.hour.changed
|
||||
span.free Vrij
|
||||
|
||||
include links
|
||||
|
|
|
@ -118,5 +118,33 @@ div.schedule {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.links {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: -90px;
|
||||
transition: ease .5s;
|
||||
|
||||
&:hover {
|
||||
bottom: 0px;
|
||||
transition: ease .5s;
|
||||
}
|
||||
|
||||
div {
|
||||
height: 100px;
|
||||
width: calc(100% / 3);
|
||||
float: left;
|
||||
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
font-size: 60px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@ var config = require('./configuration');
|
|||
function schedule(req, res, next) {
|
||||
get(req.match.url, function (json) {
|
||||
req.match.json = json;
|
||||
req.match.times = config().hour_times;
|
||||
next();
|
||||
});
|
||||
}
|
||||
|
|
8
web.js
8
web.js
|
@ -14,11 +14,9 @@ app.use('/css', less(__dirname + '/resources/less'));
|
|||
app.use('/js', express.static(__dirname + '/resources/js'));
|
||||
|
||||
app.get('/', function (req, res) {
|
||||
res.render('homepage');
|
||||
});
|
||||
|
||||
app.post('/', function (req, res) {
|
||||
console.log(req);
|
||||
req.links = config().links;
|
||||
console.log(req.links);
|
||||
res.render('homepage', req);
|
||||
});
|
||||
|
||||
app.get('/rooster/:search', function (req, res) {
|
||||
|
|
Loading…
Reference in a new issue