Archived
1
0
Fork 0

First graphics tests

This commit is contained in:
Ethanell 2020-08-14 20:08:00 +02:00
parent 3c81d64221
commit ea3bc60ac3
3 changed files with 120 additions and 3 deletions

2
app.js
View file

@ -4,6 +4,7 @@ let cookieParser = require("cookie-parser");
let logger = require("morgan");
let indexRouter = require("./routes/index");
let commandRouter = require("./routes/command")
let app = express();
@ -18,6 +19,7 @@ app.use(cookieParser());
app.use(express.static(path.join(__dirname, "public")));
app.use("/", indexRouter);
app.use("/command", commandRouter);
// catch 404 and forward to error handler
app.use((req, res) => {

View file

@ -1,8 +1,81 @@
html, body {
margin: 0;
height: 100%;
}
body {
padding: 50px;
display: flex;
align-items: center;
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
background-color: #db970a;
background-image: linear-gradient(white 2px, transparent 2px),
linear-gradient(90deg, white 2px, transparent 2px),
linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px);
background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
background-position:-2px -2px, -2px -2px, -1px -1px, -1px -1px;
}
.card {
display: flex;
flex-direction: column;
width: max-content;
min-height: 80%;
height: auto;
padding: 1em;
margin: auto;
background-color: white;
box-shadow: 0.5em 0.5em 0.5em rgba(0, 0, 255, .2);
/* overflow-y: scroll; */
}
h1, h2, p{
text-align: center;
}
a {
color: #00B7FF;
}
#command {
margin: auto;
display: flex;
flex-direction: column;
}
.field {
margin: auto auto 1em auto;
}
.field input {
box-shadow: 0.5em 0.5em 0.5em rgba(0, 0, 255, .2);
}
.field input[type="text"], .field input[type="list"] {
margin: auto;
width: 10vw;
border-top: none;
border-left: none;
border-right: none;
border-bottom: 1px gray solid;
}
.field label {
display: block;
text-align: center;
}
#command-action {
display: flex;
justify-content: space-around;
}
#add-command p, #remove-command p {
font-weight: bold;
font-size: 2em;
margin: auto auto 1em auto;
}
.hide {
display: none;
}

View file

@ -1,5 +1,47 @@
extends layout
block content
h1= title
p Welcome to #{title}
div.card
h1= title
p Welcome to Sandwiches Order Doua
form#command(action="/command" method="POST")
div.field
label(for="department") Department:
input#department(type="list" list="department-list" name="department" required)
datalist#department-list
option(value="Info")
option(value="Bio")
option(value="Chimi")
option(value="GC")
option(value="GEA")
div.field
label(for="firstname") First name:
input#firstname(type="text" name="firstname" required)
div.field
label(for="lastname") Last name:
input#lastname(type="text" name="lastname" required)
div#command1.command
h2 Command 1
div.field
label(for="sandwich") Sandwich:
input#sandwich(type="list" list="sandwich-list" name="sandwich1" required)
div.field
label(for="day") Day:
input#day(type="list" list="date-list" name="date1" required)
div#command-action
a#add-command
p +
a#remove-command.hide
p -
div.field
input#send(type="submit" value="Pay")
datalist#sandwich-list
option(value="Jambon beurre")
datalist#date-list
option(value="14/08/2020")
script(src="javascripts/index.js")