This repository has been archived by the owner on Jan 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
contact.html
80 lines (71 loc) · 2.9 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
layout: page
title: Contact
permalink: /contact
tags: contact
---
<style>
.tooltiptext {
visibility: hidden;
padding: 7px;
width: 160px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background-color: #000;
background-color: hsla(0, 0%, 20%, 0.9);
color: #fff;
text-align: center;
font-size: 14px;
line-height: 1.2;
}
.tooltiptext:after{
visibility: hidden;
-webkit-transition: visibility 0.2s ease-in-out;
transition: visibility 0.2s ease-in-out;
}
</style>
<script src="/js/clipboard.min.js"></script>
<script>
let key = fetch('/brianwilliamspgp.txt').then(res => res.text());
key.then(text => {
var clipboard = new Clipboard('#copy', {
text: trigger => {
return text;
}
});
clipboard.on('success', e => {
$('.tooltiptext').css('visibility', 'visible');
$('#copy').one('mouseout', () => {
$('.tooltiptext').fadeOut(500, () => {
$('.tooltiptext').css({"display": "inline","visibility": "hidden"});
});
});
e.clearSelection();
});
});
</script>
<div class="py2">
{% if site.ajaxify_contact_form %}
<form class="form-stacked">
<input type="text" name="email" class="field-light" placeholder="{{ site.text.contact.email }}">
<textarea type="text" name="content" class="field-light" rows="5" placeholder="{{ site.text.contact.content }}" style="resize: vertical"></textarea>
<input type="text" name="_gotcha" style="display:none" />
<button type='submit' class="button button-blue button-big mobile-block">{{ site.text.contact.submit }}</button>
</form>
{% else %}
<form action="https://formspree.io/{{ site.email }}" method="POST" class="form-stacked">
<input type="text" name="email" class="field-light" placeholder="{{ site.text.contact.email }}">
<textarea type="text" name="content" class="field-light" rows="5" placeholder="{{ site.text.contact.content }}" style="resize: vertical"></textarea>
<input type="hidden" name="_next" value="{{ site.baseurl }}/thanks/" />
<input type="hidden" name="_subject" value="{{ site.text.contact.subject }}" />
<input type="text" name="_gotcha" style="display:none" />
<input type="submit" class="button button-blue button-big mobile-block" value="{{ site.text.contact.submit }}">
</form>
{% endif %}
</div>
<p>Or email me directly at <a href="mailto:{{ site.email }}">{{ site.email }}</a></p>
<p>PGP Key: <a href="/brianwilliamspgp.txt" target="_blank">View</a> | <a href="/brianwilliamspgp.txt" download>Download</a> | <a id="copy" data-clipboard-action="copy">Copy</a> <span class="tooltiptext">Copied</span></p>
{% if site.ajaxify_contact_form %}
{% include ajaxify_content_form.html %}
{% endif %}