rework: translate to english, change picture, remove password
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 22 KiB |
BIN
src/public/img/trafficlight-green.png
Normal file
|
After Width: | Height: | Size: 6 KiB |
BIN
src/public/img/trafficlight-orange.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
src/public/img/trafficlight-red.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
src/public/img/trafficlight.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
|
|
@ -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",'');
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -1,13 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<% include ../partials/header.ejs %>
|
||||
<% include ../partials/header.ejs %>
|
||||
</head>
|
||||
<body>
|
||||
<form id="emotionsForm" method="POST" action="/submit-form">
|
||||
<% include ../partials/signin.ejs %>
|
||||
<p id="errorMessage" class="error">Vul je naam/wachtwoord in</p>
|
||||
<% include ../partials/body.ejs %>
|
||||
</form>
|
||||
<div class="main">
|
||||
<h1>Rate your day</h1>
|
||||
<form id="emotionsForm" method="POST" action="/submit-form">
|
||||
<% include ../partials/signin.ejs %>
|
||||
<p id="errorMessage" class="error">Choose a name</p>
|
||||
<% include ../partials/body.ejs %>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<% include ../partials/header.ejs %>
|
||||
<% include ../partials/header.ejs %>
|
||||
</head>
|
||||
<body>
|
||||
<form id="emotionsForm" method="POST" action="/submit-form">
|
||||
<% include ../partials/signin.ejs %>
|
||||
<% include ../partials/body.ejs %>
|
||||
</form>
|
||||
<div class="main">
|
||||
<h1>Rate your day</h1>
|
||||
<form id="emotionsForm" method="POST" action="/submit-form">
|
||||
<% include ../partials/signin.ejs %>
|
||||
<% include ../partials/body.ejs %>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@
|
|||
<% include ../partials/header.ejs %>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Dankje!</h1>
|
||||
<h1>Thanks!</h1>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,11 @@
|
|||
<div class="emotions">
|
||||
<h1>Wat is je gevoel vandaag?</h1>
|
||||
<input type="hidden" id="emotion" name="emotion">
|
||||
<input type="hidden" id="timestamp" name="timestamp">
|
||||
<button id="happy"><img src="img/grinning-face-with-smiling-eyes.png" title="Blij!"></button>
|
||||
<button id="unsure"><img src="img/neutral-face.png" title="Neutraal"></button>
|
||||
<button id="sad"><img src="img/disappointed-face.png" title="Niet blij!"></button>
|
||||
<p>Vul je naam en wachtwoord in en kies een emoji</p>
|
||||
<button id="sad"><img src="img/trafficlight-red.png" width="255px" style="margin-left: 1px" title="Unhappy"></button>
|
||||
<button id="unsure"><img src="img/trafficlight-orange.png" width="256px" title="Neutral"></button>
|
||||
<button id="happy"><img src="img/trafficlight-green.png" width="256px" title="Happy"></button>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript" src="js/stoplicht.js"></script>
|
||||
<script type="text/javascript" src="js/trafficlight.js"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
<link rel="stylesheet" type="text/css" href="/stylesheets/stoplicht.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/stylesheets/trafficlight.css" />
|
||||
<title>Verkeerslicht</title>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,13 @@
|
|||
<div class="signin">
|
||||
<h2>Naam: <input id="username" name="username" type="text" autofocus></h2>
|
||||
<h2>Wachtwoord: <input id="password" name="password" type="password"></h2>
|
||||
<h2>Name:  <input id="username" name="username" list="names" autofocus></h2>
|
||||
<datalist id="names">
|
||||
<option value="Bert"></option>
|
||||
<option value="Salar"></option>
|
||||
<option value="Tessa"></option>
|
||||
<option value="Wouter"></option>
|
||||
<option value="Pim"></option>
|
||||
<option value="Kwan Win"></option>
|
||||
<option value="Erwin"></option>
|
||||
<option value="Sander"></option>
|
||||
</datalist>
|
||||
</div>
|
||||
|
|
|
|||