diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 3882368..d20f308 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -160,13 +160,26 @@ footer { .h-captcha { margin-bottom: 0.5vh; } -.btn-primary { - font-family: "Apercu Mono"; - background-color: #CC7A98; - color: #002234; - border-color: #002234; } +.button-c { + display: inline-block; + font-weight: 400; + color: #212529; + text-align: center; + vertical-align: middle; + cursor: pointer; + user-select: none; + border: 1px solid #002234; + padding: 0.375rem 0.75rem; + font-size: 1rem; + line-height: 1.5; + border-radius: 0.25rem; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + font-family: "Apercu Mono"; } -.btn-primary:hover { +.button-c { + background-color: #CC7A98; } + +.button-c:hover { background-color: #002234; color: #CC7A98; border-color: #CC7A98; } diff --git a/public/stylesheets/style.sass b/public/stylesheets/style.sass index c455f8e..fed903f 100644 --- a/public/stylesheets/style.sass +++ b/public/stylesheets/style.sass @@ -178,13 +178,26 @@ footer .h-captcha margin-bottom: 0.5vh -.btn-primary +.button-c + display: inline-block + font-weight: 400 + color: #212529 + text-align: center + vertical-align: middle + cursor: pointer + user-select: none + border: 1px solid $black + padding: 0.375rem 0.75rem + font-size: 1rem + line-height: 1.5 + border-radius: 0.25rem + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out font-family: "Apercu Mono" - background-color: $pink - color: $black - border-color: $black -.btn-primary:hover +.button-c + background-color: $pink + +.button-c:hover background-color: $black color: $pink border-color: $pink diff --git a/routes/contact.js b/routes/contact.js index 4d22a33..d8531cc 100644 --- a/routes/contact.js +++ b/routes/contact.js @@ -22,10 +22,8 @@ const contact_rate_limit = rate_limit({ // POST route from contact form router.post('/', contact_rate_limit, (req, res) => { - const TO_GMAIL_USER = process.env.TO_GMAIL_USER - const FROM_GMAIL_USER = process.env.FROM_GMAIL_USER - const GMAIL_PASS = process.env.GMAIL_PASS - console.log(GMAIL_PASS) + const TO_MAIL_USER = process.env.TO_MAIL_USER + const FROM_MAIL_USER = process.env.FROM_MAIL_USER const HCAPTCHA_KEY = process.env.HCAPTCHA_KEY const token = req.body["g-recaptcha-response"]; const ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress; @@ -34,8 +32,8 @@ router.post('/', contact_rate_limit, (req, res) => { .then((data) => { if (data.success === true) { const msg = { - to: TO_GMAIL_USER, - from: FROM_GMAIL_USER, + to: TO_MAIL_USER, + from: FROM_MAIL_USER, subject: 'New message from contact form at pastel.codes', text: `${req.body.firstname} ${req.body.lastname} (${req.body.email})\nsays: ${req.body.message}\n\nip: ${ip}` }; @@ -46,7 +44,7 @@ router.post('/', contact_rate_limit, (req, res) => { res.render('contact', { message: "I will get back to you soon!", success: "Make sure the email is from ", - email: TO_GMAIL_USER + email: TO_MAIL_USER }) }) .catch(error => { diff --git a/views/contact.pug b/views/contact.pug index c187c15..9fc34d0 100644 --- a/views/contact.pug +++ b/views/contact.pug @@ -48,7 +48,7 @@ block content textarea#message(name='message' class="form-control" placeholder='Enter your message here' rows='3' required='true') .form-group(style="margin-bottom: 0.5rem") .h-captcha(data-sitekey='49abba50-1813-4ab3-acbf-2a8bfff1f7c3') - button(type='submit' class="btn btn-primary") Submit + button(type='submit' class="button-c") Submit .row .col