forked from johno/pixyll
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontact.html
59 lines (50 loc) · 2.28 KB
/
contact.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
layout: page
title: Say Hello
permalink: /contact/
tags: contact
---
<div class="py2">
{% if site.ajaxify_contact_form %}
<form class="form-stacked">
<label>
Email
<input type="text" name="email" class="field-light" placeholder="{{ site.text.contact.email | default: "Email Address" }}">
</label>
<label>
Content
<textarea type="text" name="content" class="field-light" rows="5" placeholder="{{ site.text.contact.content | default: "What would you like to say?" }}" style="resize: vertical"></textarea>
</label>
<input type="text" name="_gotcha" style="display:none" />
<button type='submit' class="button button-blue button-big mobile-block">{{ site.text.contact.submit | default: "Say Hello" }}</button>
</form>
{% else %}
<script src="https://www.google.com/recaptcha/api.js?render=6Le9GucjAAAAAASAqI0LC4kMPRVQ6RIw5JMZS6fG"></script>
<script>
grecaptcha.ready(function () {
grecaptcha.execute('6Le9GucjAAAAAASAqI0LC4kMPRVQ6RIw5JMZS6fG', {action: 'submit'}).then(function (token) {
console.info("got token: " + token);
document.getElementById('g-recaptcha-response').value = token;
});
});
</script>
<form action="https://formspree.io/f/xbjwgljv" method="POST" class="form-stacked">
<label>
Email
<input type="email" name="_replyto" class="field-light" placeholder="{{ site.text.contact.email }}">
</label>
<label>
Content
<textarea type="text" name="message" class="field-light" rows="5" placeholder="{{ site.text.contact.content }}" style="resize: vertical"></textarea>
</label>
<input type="hidden" id="g-recaptcha-response" name="g-recaptcha-response">
<input type="hidden" name="_next" value="{{ site.baseurl }}/thanks/" />
<input type="hidden" name="_subject" value="{{ site.text.contact.subject | default: "New submission!" }}" />
<input type="text" name="_gotcha" style="display:none" />
<input type="submit" class="button button-blue button-big mobile-block" value="{{ site.text.contact.submit | default: "Say Hello" }}">
</form>
{% endif %}
</div>
{% if site.ajaxify_contact_form %}
{% include ajaxify_content_form.html %}
{% endif %}