diff --git a/src/public/img/disappointed-face.png b/src/public/img/disappointed-face.png deleted file mode 100644 index 11fb5ef..0000000 Binary files a/src/public/img/disappointed-face.png and /dev/null differ diff --git a/src/public/img/grinning-face-with-smiling-eyes.png b/src/public/img/grinning-face-with-smiling-eyes.png deleted file mode 100644 index cd905fb..0000000 Binary files a/src/public/img/grinning-face-with-smiling-eyes.png and /dev/null differ diff --git a/src/public/img/neutral-face.png b/src/public/img/neutral-face.png deleted file mode 100644 index dc4e398..0000000 Binary files a/src/public/img/neutral-face.png and /dev/null differ diff --git a/src/public/img/trafficlight-green.png b/src/public/img/trafficlight-green.png new file mode 100644 index 0000000..6ee168d Binary files /dev/null and b/src/public/img/trafficlight-green.png differ diff --git a/src/public/img/trafficlight-orange.png b/src/public/img/trafficlight-orange.png new file mode 100644 index 0000000..0a95af8 Binary files /dev/null and b/src/public/img/trafficlight-orange.png differ diff --git a/src/public/img/trafficlight-red.png b/src/public/img/trafficlight-red.png new file mode 100644 index 0000000..cd2d54f Binary files /dev/null and b/src/public/img/trafficlight-red.png differ diff --git a/src/public/img/trafficlight.png b/src/public/img/trafficlight.png new file mode 100644 index 0000000..03be74a Binary files /dev/null and b/src/public/img/trafficlight.png differ diff --git a/src/public/js/stoplicht.js b/src/public/js/trafficlight.js similarity index 77% rename from src/public/js/stoplicht.js rename to src/public/js/trafficlight.js index a3653ef..00c5c1d 100644 --- a/src/public/js/stoplicht.js +++ b/src/public/js/trafficlight.js @@ -2,22 +2,16 @@ get("#happy").addEventListener('click', happy); get('#unsure').addEventListener('click', unsure); get('#sad').addEventListener('click', sad); get('#username').addEventListener("keydown", event => { + console.log(event); checkError(); - if (event.which == 13) { - get('#password').focus(); - event.preventDefault(); - } -}); -get('#password').addEventListener("keydown", event => { - checkError(); - if (event.which == 13) { + if (event.which === 13) { get('#username').focus(); event.preventDefault(); } }); function handle(event, next) { - if (event.which == 13) { + if (event.which === 13) { get(next).focus; event.preventDefault(); } @@ -29,7 +23,7 @@ function happy() { } function unsure() { - emotion().value = "2" + emotion().value = "2"; submit(); } @@ -48,7 +42,7 @@ function submit() { } function checkError(){ - if (getValue("#username") != '' && getValue("#password") !=''){ + if (getValue("#username") !== ''){ setHtml("#errorMessage",''); } } diff --git a/src/public/stylesheets/stoplicht.css b/src/public/stylesheets/trafficlight.css similarity index 68% rename from src/public/stylesheets/stoplicht.css rename to src/public/stylesheets/trafficlight.css index 3ff2c39..1248c79 100644 --- a/src/public/stylesheets/stoplicht.css +++ b/src/public/stylesheets/trafficlight.css @@ -2,12 +2,27 @@ body{ font-family: Arial; } +.emotions{ + margin: 0; + padding: 0; + border: 0; +} + h1{ font-size: 80px; + text-align: center; } .signin{ - text-align: left; + text-align: center; } + +button, img{ + padding: 0; + margin-top: -2px; + margin-bottom: -2px; + border: 0; +} + button{ margin: auto; } diff --git a/src/views/pages/error.ejs b/src/views/pages/error.ejs index 0966764..c7cd3f4 100644 --- a/src/views/pages/error.ejs +++ b/src/views/pages/error.ejs @@ -1,13 +1,16 @@
- <% include ../partials/header.ejs %> + <% include ../partials/header.ejs %> - +