aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2019-01-06 16:40:11 +0100
committerNoah Loomans <noahloomans@gmail.com>2019-01-06 16:40:11 +0100
commit03c22460461d071944e6cd73c39f204ab5402f0b (patch)
treeba35b98da7f92782493ac0c28771f50f72f58f59
parente74320980a619452f52f0c27c96b7bc873ee02c7 (diff)
Update logo on error page
-rw-r--r--routes/index.js4
-rw-r--r--views/redirect.jade19
2 files changed, 14 insertions, 9 deletions
diff --git a/routes/index.js b/routes/index.js
index 4876d67..e0b4d27 100644
--- a/routes/index.js
+++ b/routes/index.js
@@ -9,6 +9,7 @@ router.get('/', function (req, res, next) {
const baseMeetingpointUrl = process.env.SCHOOL_LEVEL === 'mavo'
? 'http://www.meetingpointmco.nl/Roosters-AL/TOSweb'
: 'http://www.meetingpointmco.nl/Roosters-AL/doc';
+ const school = process.env.SCHOOL === 'kiemm' ? 'kiemm' : 'metis';
getMeetingpointData().then(data => {
let flags = []
@@ -20,7 +21,7 @@ router.get('/', function (req, res, next) {
const usersStr = `var USERS = ${JSON.stringify(data.users)};`
const validWeekNumbersStr = `var VALID_WEEK_NUMBERS = ${JSON.stringify(data.validWeekNumbers)}`
res.render('index', {
- school: process.env.SCHOOL === 'kiemm' ? 'kiemm' : 'metis',
+ school,
schoolLevel: process.env.SCHOOL_LEVEL === 'mavo' ? 'mavo' : 'havo-vwo',
baseMeetingpointUrl,
flagsStr,
@@ -30,6 +31,7 @@ router.get('/', function (req, res, next) {
}).catch(function () {
console.error('Unable to get user info, emergency redirect!')
res.render('redirect', {
+ school,
baseMeetingpointUrl,
})
})
diff --git a/views/redirect.jade b/views/redirect.jade
index 31b2322..1f30451 100644
--- a/views/redirect.jade
+++ b/views/redirect.jade
@@ -7,22 +7,22 @@ block head
text-align: center;
margin: 32px;
}
-
+
.content {
max-width: 600px;
margin: 0 auto;
}
-
+
h1 {
color: #212121;
margin-bottom: 32px;
}
-
+
h2 {
color: #727272;
margin-bottom: 64px;
}
-
+
a, a:visited {
margin: 8px;
padding: 8px 16px;
@@ -32,7 +32,7 @@ block head
font-weight: bold;
border-radius: 3px;
}
-
+
a:hover, a:focus, a:active {
background-color: #e45a3f;
}
@@ -40,8 +40,11 @@ block head
block content
.content
script document.body.style.opacity = 1
- img(src='/icons/mml-logo.png')
+ if school === 'kiemm'
+ img(src='/icons/logo.svg', width="130")
+ else
+ img(src='/icons/logo.png')
h1 Er is iets mis gegaan tijdens het ophalen van de benodigde informatie
h2 Je kunt proberen door te gaan naar het oude rooster of Magister
- a(href=baseMeetingpointUrl) Oud rooster
- a(href='http://msa.magister.net/') Magister
+ a(href=baseMeetingpointUrl) Oud rooster
+ a(href='http://msa.magister.net/') Magister