From 72b1364857809120abd75f2841881d6966c91142 Mon Sep 17 00:00:00 2001 From: Arne van Iterson Date: Mon, 4 Nov 2019 23:26:34 +0100 Subject: [PATCH] Added some styles --- server/.gitignore | 1 + server/routes/mail.js | 4 +-- src/app/app.component.html | 7 ++-- src/app/app.component.scss | 15 ++++++--- src/app/components/form/form.component.html | 6 ++-- src/app/components/form/form.component.scss | 33 ++++++++++++++++--- src/app/components/home/home.component.html | 2 +- src/app/components/home/home.component.scss | 6 ++++ src/app/components/login/login.component.html | 7 ++-- src/app/components/login/login.component.scss | 8 +++++ 10 files changed, 68 insertions(+), 21 deletions(-) create mode 100644 server/.gitignore diff --git a/server/.gitignore b/server/.gitignore new file mode 100644 index 0000000..2c1117b --- /dev/null +++ b/server/.gitignore @@ -0,0 +1 @@ +secret.js \ No newline at end of file diff --git a/server/routes/mail.js b/server/routes/mail.js index d3a1d5b..1bd1160 100644 --- a/server/routes/mail.js +++ b/server/routes/mail.js @@ -12,7 +12,7 @@ const transporter = nodemailer.createTransport({ port: 587, secure: false, // upgrade later with STARTTLS auth: { - user: "36995@leerling.heerenlanden.nl", + user: "36899@leerling.heerenlanden.nl", pass: secret } }); @@ -84,7 +84,7 @@ router.post('/', (req, res, _next) => { transporter.sendMail(mailOptions, function(error, info){ if (error) { // Notify the front-end - res.json({result: {success: false, data: err}}); + res.json({result: {success: false, data: error}}); } else { // Add the user's data to the database identified by the id. diff --git a/src/app/app.component.html b/src/app/app.component.html index f455580..d1f3e2c 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,7 +1,10 @@
diff --git a/src/app/app.component.scss b/src/app/app.component.scss index 8271b68..b9aaf78 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -26,7 +26,7 @@ nav { color: white; background-color: rgba(0,0,0,0.25); position: relative; - span { + span > a { font-family: 'Staatliches', cursive; position: absolute; top: 50%; @@ -36,7 +36,7 @@ nav { width: max-content; } a { - text-decoration: none; + // text-decoration: none; color: white; cursor: pointer; position: absolute; @@ -47,10 +47,15 @@ nav { fa-icon { padding: 5px; } + span { + display: none; + } } @media screen and (min-width: 600px) { - a::after { - content: "Login"; + a { + span { + display: inline; + } } } } @@ -58,7 +63,7 @@ nav { main { padding: 16px; margin: 20px; - height: min-content; + min-height: calc(100vh - 64px - 72px); border-radius: 1em; background-color: #ffffff; text-align: center; diff --git a/src/app/components/form/form.component.html b/src/app/components/form/form.component.html index 3193ec4..be22f07 100644 --- a/src/app/components/form/form.component.html +++ b/src/app/components/form/form.component.html @@ -3,9 +3,7 @@
- -

Formulier voor surpise box {{ number }}

- + Formulier voor surpise box {{ number }}
@@ -20,7 +18,7 @@
-

Uw aanvraag is ingediend

+ Uw aanvraag is ingediend

Check uw mailbox om uw aanvrag te valideren. Als u de mail niet kan vinden, check dan ook uw spam.

diff --git a/src/app/components/form/form.component.scss b/src/app/components/form/form.component.scss index 72536e1..fe48505 100644 --- a/src/app/components/form/form.component.scss +++ b/src/app/components/form/form.component.scss @@ -4,13 +4,36 @@ top: 50%; left: 50%; transform: translate(-50%, -50%); - padding-bottom: 20px; + padding: 3em 2em 1em 2em; + border-radius: 0.5em; + + span.header { + position: absolute; + font-weight: bold; + text-decoration: underline; + top: 0.6em; + left: 1em; + width: calc(100% - 50px); + } + + form { + label { + float: left; + margin: 5px; + } + textarea, input { + border: 1px solid grey; + border-radius: 3px; + padding: 0.25em; + margin: 5px; + float: right; + } + } fa-icon { - position: relative; - float: right; - padding-right: 10px; - padding-top: 10px; + position: absolute; cursor: pointer; + top: 0.6em; + right: 1em; } } diff --git a/src/app/components/home/home.component.html b/src/app/components/home/home.component.html index 6cfc113..5828e13 100644 --- a/src/app/components/home/home.component.html +++ b/src/app/components/home/home.component.html @@ -10,7 +10,7 @@ Je kan je box op 28 november ophalen en betalen.

- Log uit + Log uit
diff --git a/src/app/components/home/home.component.scss b/src/app/components/home/home.component.scss index bda9e1f..bcba20c 100644 --- a/src/app/components/home/home.component.scss +++ b/src/app/components/home/home.component.scss @@ -88,4 +88,10 @@ } } + span.logout { + border: 1px solid grey; + border-radius: 3px; + padding: 0.25em; + margin: 5px; + } } diff --git a/src/app/components/login/login.component.html b/src/app/components/login/login.component.html index 3c70198..b2cb2bd 100644 --- a/src/app/components/login/login.component.html +++ b/src/app/components/login/login.component.html @@ -1,9 +1,12 @@ +

Login

De combinatie van de gebruikersnaam en wachtwoord is niet herkend.
- - +
+
+
+
diff --git a/src/app/components/login/login.component.scss b/src/app/components/login/login.component.scss index e69de29..43e3fa8 100644 --- a/src/app/components/login/login.component.scss +++ b/src/app/components/login/login.component.scss @@ -0,0 +1,8 @@ +form { + textarea, input { + border: 1px solid grey; + border-radius: 3px; + padding: 0.25em; + margin: 5px; + } + } \ No newline at end of file