Add contact form
This commit is contained in:
parent
5e847a252b
commit
2650be1075
|
@ -100,6 +100,7 @@ main_menu:
|
||||||
talks: { href: /talks/, title: Talks }
|
talks: { href: /talks/, title: Talks }
|
||||||
experience: { href: /experience/, title: Experience }
|
experience: { href: /experience/, title: Experience }
|
||||||
blog: { href: /blog/, title: Blog }
|
blog: { href: /blog/, title: Blog }
|
||||||
|
contact: { href: /contact/, title: Contact }
|
||||||
|
|
||||||
meetups:
|
meetups:
|
||||||
drupalbristol:
|
drupalbristol:
|
||||||
|
|
12
assets/sass/components/_contact.sass
Normal file
12
assets/sass/components/_contact.sass
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
.page--contact
|
||||||
|
form
|
||||||
|
.form__name,
|
||||||
|
.form__email,
|
||||||
|
.form__subject,
|
||||||
|
.form__message
|
||||||
|
@extend .form-group
|
||||||
|
|
||||||
|
[type="email"],
|
||||||
|
[type="text"],
|
||||||
|
textarea
|
||||||
|
@extend .form-control
|
|
@ -17,9 +17,6 @@
|
||||||
<a href="{{ site.url }}{{ link.href }}">{{ link.title }}</a>
|
<a href="{{ site.url }}{{ link.href }}">{{ link.title }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<li>
|
|
||||||
<a href="mailto:{{ site.email }}?subject=Email%20from%20{{ site.short_url }}">Contact <i class="fa fa-envelope-o"></i></a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>{# .nav-collapse #}
|
</div>{# .nav-collapse #}
|
||||||
</div>
|
</div>
|
||||||
|
|
6
source/contact-thanks.md
Normal file
6
source/contact-thanks.md
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
layout: page
|
||||||
|
nav: contact
|
||||||
|
title: Thanks!
|
||||||
|
---
|
||||||
|
Your email has been sent. You should receive a response within the next working day.
|
39
source/contact.html.twig
Normal file
39
source/contact.html.twig
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
---
|
||||||
|
title: Contact
|
||||||
|
nav: contact
|
||||||
|
layout: page
|
||||||
|
---
|
||||||
|
{% block content %}
|
||||||
|
<p>To send me an email, complete the form below. The form is powered by <a href="https://formspree.io">Formspree</a>.</p>
|
||||||
|
|
||||||
|
<form action="https://formspree.io/{{ site.email }}" method="POST">
|
||||||
|
<div class="form__name">
|
||||||
|
<label for="name">Name</label>
|
||||||
|
<input type="text" name="name">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form__email">
|
||||||
|
<label for="email">Email</label>
|
||||||
|
<input type="email" name="email">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form__subject">
|
||||||
|
<label for="subject">Subject</label>
|
||||||
|
<input type="text" name="subject">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form__message">
|
||||||
|
<label for="message">Message</label>
|
||||||
|
<textarea name="message" rows="5"></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form__actions">
|
||||||
|
<input class="btn btn-primary" type="submit" value="Send email">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="hidden" name="_next" value="{{ site.url }}/contact-thanks/" />
|
||||||
|
<input type="text" name="_gotcha" style="display: none" />
|
||||||
|
</form>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block body_classes 'page--contact' %}
|
Loading…
Reference in a new issue