Creating contact page with captcha

This commit is contained in:
Esther
2020-06-29 10:09:10 +01:00
parent dd37e2e22c
commit f638cf4d8b
13 changed files with 137 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ block nav-links
a.nav-link(href='https://blog.pastel.codes')
span Blog
li.nav-item
a.nav-link(href='#')
a.nav-link(href='/contact')
span Contact
block content
@@ -29,7 +29,6 @@ block content
span Hello.
p Im Esther, a 19 year old student in 2nd year of university, who studies computer science & artificial intelligence.
p In my free time, I create small projects to learn new skills and for them to function well for others to use; additionally, I do some graphic design / art as a hobby but has helped me create catching designs.
p I focus on developing secure, well designed, efficient programs.
.row
.col.start
h1

View File

@@ -0,0 +1,4 @@
extends layout
block content
p fuck

View File

@@ -0,0 +1,4 @@
extends layout
block content
p yay

42
views/contact.pug Normal file
View File

@@ -0,0 +1,42 @@
extends layout
block head
script(src='https://hcaptcha.com/1/api.js' async='' defer='defer')
block nav-links
li.nav-item.active
a.nav-link(href='/')
span Home
li.nav-item
a.nav-link(href='/about')
span About
li.nav-item
a.nav-link(href='#')
span CV
li.nav-item
a.nav-link(href='https://git.pastel.codes/Blankie')
span Projects
li.nav-item
a.nav-link(href='https://blog.pastel.codes')
span Blog
li.nav-item
a.nav-link(href='#')
span Contact
block content
.container
form#contact-form(action='/contact' method='post' role='form')
.form-group
label(for='name') Name
input#name(name='name' class="form-control" type='text' placeholder='Your name' required='')
.form-group
label(for='email') Email
input#email(name='email' class="form-control" type='text' placeholder='Your email' required='')
.form-group
label(for='message') Message
textarea#message(name='message' class="form-control" placeholder='Enter your message here' rows='3' required='')
.h-captcha(data-sitekey='49abba50-1813-4ab3-acbf-2a8bfff1f7c3')
button(type='submit' class="btn btn-primary") Submit
if message
#contact-error
p=message

View File

@@ -17,7 +17,7 @@ block nav-links
a.nav-link(href='https://blog.pastel.codes')
span Blog
li.nav-item
a.nav-link(href='#')
a.nav-link(href='/contact')
span Contact
block content

View File

@@ -17,7 +17,7 @@ block nav-links
a.nav-link(href='https://blog.pastel.codes')
span Blog
li.nav-item
a.nav-link(href='#')
a.nav-link(href='/contact')
span Contact
block content

View File

@@ -13,6 +13,7 @@ html
link(rel='stylesheet', href='/stylesheets/bootstrap.css')
link(rel='stylesheet', href='/stylesheets/style.css')
block head
body
article
header