-
Notifications
You must be signed in to change notification settings - Fork 0
/
dark-horse-form.html
263 lines (237 loc) · 20.7 KB
/
dark-horse-form.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
<html>
<head>
<!-- Google fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inconsolata&family=Roboto+Mono&display=swap" rel="stylesheet">
<!-- Font awesome logos -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm" crossorigin="anonymous">
</head>
<style>
body, html {
background-color: white;
color: #141414;
font-weight: normal;
margin-bottom: 1rem;
font-family: 'Inconsolata', monospace;
}
::-webkit-scrollbar {
display: none;
}
#form {
display: inline-block;
padding: 0.75rem;
font-size: 1.1rem;
}
#form input {
font-size: 1.1rem;
padding: 0.5rem;
margin-bottom: 0.75rem;
margin-left: 0.5rem;
font-family: 'Inconsolata', monospace;
}
.getcode {
border: none;
background-color: grey;
border-radius: 1.5rem 1.5rem 1.5rem 1.5rem;
color: white;
}
.getcode:hover {
cursor: pointer;
background-color: #141414;
color: white;
text-shadow:
-0.3px -0.3px 0 white,
0.3px -0.3px 0 white,
-0.3px 0.3px 0 white,
0.3px 0.3px 0 white;
-webkit-transition: all 0.5s;
-moz-transition: all 0.5s;
-o-transition: all 0.5s;
transition: all 0.5s;
}
.instructions {
color: grey;
}
#output-cont {
margin-top: 2rem;
width: 28rem;
max-height: 68rem;
padding: 1rem;
border-radius: 1rem 1rem 1rem 1rem;
overflow: scroll;
text-align: left;
background-color: #141414;
color: white;
}
#clipboard-message {
text-align: middle;
font-size: 2.5rem;
margin-top: 1rem;
display: none;
}
#output-title {
font-size: 2rem;
display: none;
}
#output {
/*word-wrap: break-word;*/
font-family: 'Inconsolata', monospace;
}
#copy-message {
margin-top: 0.5rem;
font-weight: bold;
color: grey;
display: none;
}
#output-download-cont {
margin-top: 1rem;
font-size: 2rem;
display: none;
font-weight: normal;
}
#output-download {
padding: 1rem;
border-radius: 1.75rem 1.75rem 1.75rem 1.75rem;
vertical-align: middle;
font-size: 1.5rem;
border: none;
background-color: #58bd4f;
color: white;
}
#output-download:hover {
cursor: pointer;
background-color: #14b505;
text-shadow:
-0.3px -0.3px 0 white,
0.3px -0.3px 0 white,
-0.3px 0.3px 0 white,
0.3px 0.3px 0 white;
-webkit-transition: all 0.25s;
-moz-transition: all 0.25s;
-o-transition: all 0.25s;
transition: all 0.25s;
}
</style>
<body>
<center>
<form id="form" onsubmit="darkhorseform(); return false;">
<label for="fname">Full name:</label>
<input type="text" id="fname" class="fname">
<br>
<a class="instructions">e.g. John Doe</a>
<br><br><br>
<label for="ftitle">Title:</label>
<input type="text" id="ftitle" class="ftitle">
<br>
<a class="instructions">e.g. Sales Representative</a>
<br><br><br>
<label for="femail">Email:</label>
<input type="email" id="femail" class="femail">
<br>
<a class="instructions">e.g. [email protected] (this will be linked to send an email to this address)</a>
<br><br><br>
<label for="fphone">Phone Number:</label>
<input type="tel" id="fphone" class="fphone">
<br>
<a class="instructions">e.g. +1(123)-456-7890 (this will be linked to call this number on mobile devices)</a>
<br><br><br>
<label for="fweb1">Website 1:</label>
<input type="url" id="fweb1" class="fweb1">
<br>
<a class="instructions">e.g. https://www.example.com/ (this will be linked to go to this website)</a>
<br><br><br>
<label for="fweb2">Website 2:</label>
<input type="url" id="fweb2" class="fweb2">
<br>
<a class="instructions">e.g. https://www.example.com/ (this will be linked to go to this website)</a>
<br><br><br>
<label for="flinkedin">Linked In:</label>
<input type="url" id="flinkedin" class="flinkedin">
<br>
<a class="instructions">e.g. https://www.linkedin.com/in/username/ (this will be linked to go to this website)</a>
<br><br><br>
<label for="ffacebook">Facebook:</label>
<input type="url" id="ffacebook" class="ffacebook">
<br>
<a class="instructions">e.g. https://www.facebook.com/profile/ (this will be linked to go to this website)</a>
<br><br><br>
<label for="finstagram">Instagram:</label>
<input type="url" id="finstagram" class="finstagram">
<br>
<a class="instructions">e.g. https://www.instagram.com/username/ (this will be linked to go to this website)</a>
<br><br><br>
<label for="ftwitter">Twitter:</label>
<input type="url" id="ftwitter" class="ftwitter">
<br>
<a class="instructions">e.g. https://twitter.com/username/ (this will be linked to go to this website)</a>
<br><br><br>
<label for="fyoutube">YouTube:</label>
<input type="url" id="fyoutube" class="fyoutube">
<br>
<a class="instructions">e.g. https://www.youtube.com/username/ (this will be linked to go to this website)</a>
<br><br><br>
<input style="padding: 1rem; font-size: 1.25rem;" class="getcode" type="submit" value="Get Code!">
</form>
<a id="output-title">Click below to download your custom code!</a>
<div id="output-cont"><a id="output"></a></div>
<div id="copy-message"><a>Or copy your custom code above</a></div>
<div id="output-download-cont">
<a>Download your .html file </a><button id="output-download">here <i class="fas fa-download"></i></button>
</div>
</center>
<script>
var clipboardtitle = document.getElementById("output-title");
var outputdownloadcont = document.getElementById("output-download-cont");
var copymessage = document.getElementById("copy-message");
var outputcont = document.getElementById("output-cont");
outputcont.style.display = "none";
function darkhorseform() {
copymessage.style.display = "block";
clipboardtitle.style.display = "block"
outputdownloadcont.style.display = "block";
var output = document.getElementById("output");
outputcont.style.display = "";
var form = document.getElementById("form");
form.style.display = "none";
//get form inputs
var name = document.getElementById("fname").value;
var title = document.getElementById("ftitle").value;
var email = document.getElementById("femail").value;
var phone = document.getElementById("fphone").value;
var web1 = document.getElementById("fweb1").value;
var web2 = document.getElementById("fweb2").value;
var linkedin = document.getElementById("flinkedin").value;
var facebook = document.getElementById("ffacebook").value;
var instagram = document.getElementById("finstagram").value;
var twitter = document.getElementById("ftwitter").value;
var youtube = document.getElementById("fyoutube").value;
//if form input none define display vars as none
if (linkedin) {var linkedindisplay = ""} else {var linkedindisplay = "none"};
if (facebook) {var facebookdisplay = ""} else {var facebookdisplay = "none"};
if (instagram) {var instagramdisplay = ""} else {var instagramdisplay = "none"};
if (twitter) {var twitterdisplay = ""} else {var twitterdisplay = "none"};
if (youtube) {var youtubedisplay = ""} else {var youtubedisplay = "none"};
submitOK = "true";
output.innerHTML = "<!DOCTYPE html><br/><html lang="en" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml"><br/><head><br/><title></title><br/><meta charset="utf-8"/><br/><meta content="width=device-width, initial-scale=1.0" name="viewport"/><br/><style> <br/>{box-sizing: border-box;}<br/>body {margin: 0; padding: 0;}<br/>a[x-apple-data-detectors] {color: inherit !important; text-decoration: inherit !important;}<br/>#MessageViewBody a {color: inherit; text-decoration: none;}<br/>p {line-height: inherit}<br/>@media (max-width:0px) {<br/>.icons-inner {text-align: center;}<br/>.icons-inner td {margin: 0 auto;}<br/>.row-content {width: 100% !important;}<br/>.stack .column {width: 100%; display: block;}<br/>}<br/></style><br/></head><br/><body style="background-color: #ffffff; margin: 0; padding: 0; -webkit-text-size-adjust: none; text-size-adjust: none;"><br/><table border="0" cellpadding="0" cellspacing="0" class="nl-container" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #ffffff;" width="100%"><br/><tbody><br/><tr><br/><td><br/><table align="center" border="0" cellpadding="0" cellspacing="0" class="row row-1" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"><br/><tbody><br/><tr><br/><td><br/><table align="left" border="0" cellpadding="0" cellspacing="0" class="row-content stack" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #141414; color: #000000; width: 300px;" width="300"><br/><tbody><br/><tr><br/><td class="column" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; font-weight: 400; text-align: left; vertical-align: top; padding-top: 5px; padding-bottom: 5px; border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px;" width="100%"><br/><table border="0" cellpadding="0" cellspacing="0" class="heading_block" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"><br/><tr><br/><td style="width:100%;text-align:center;padding-top:10px;padding-left:20px;"><br/><h1 style="margin: 0; color: #fff; font-size: 30px; font-family: 'Source Sans Pro', Tahoma, Verdana, Segoe, sans-serif; line-height: 120%; text-align: center; direction: ltr; font-weight: normal; letter-spacing: normal; margin-top: 0; margin-bottom: 0;"><strong>"+name+"</strong></h1><br/></td><br/></tr><br/></table><br/><table border="0" cellpadding="0" cellspacing="0" class="text_block" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; word-break: break-word;" width="100%"><br/><tr><br/><td style="padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:20px;"><br/><div style="font-family: sans-serif"><br/><div style="font-size: 14px; mso-line-height-alt: 16.8px; color: #808080; line-height: 1.2; font-family: 'Source Sans Pro', Tahoma, Verdana, Segoe, sans-serif;"><br/><p style="margin: 0; font-size: 14px; text-align: center;"><span style="font-size:20px;">"+title+"</span></p><br/></div><br/></div><br/></td><br/></tr><br/></table><br/><table border="0" cellpadding="0" cellspacing="0" class="divider_block" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"><br/><tr><br/><td style="padding-top:15px;padding-right:15px;padding-bottom:16px;padding-left:20px;"><br/><div align="center"><br/><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="65%"><br/><tr><br/><td class="divider_inner" style=" font-size: 1px; line-height: 1px; border-top: 2px solid #FFF;"><span> </span></td><br/></tr><br/></table><br/></div><br/></td><br/></tr><br/></table><br/><table border="0" cellpadding="0" cellspacing="0" class="text_block" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; word-break: break-word;" width="100%"><br/><tr><br/><td style="padding-top:4px;padding-left:20px;"><br/><div style="font-family: sans-serif"><br/><div style="font-size: 14px; mso-line-height-alt: 28px; color: #555555; line-height: 2; font-family: 'Source Sans Pro', Tahoma, Verdana, Segoe, sans-serif;"><br/><p style="margin: 0; font-size: 14px; text-align: center; mso-line-height-alt: 32px;"><span style="font-size:16px;"><a href="mailto:"+email+"" rel="noopener" style="text-decoration: underline; color: #ffffff;" target="_blank">"+email+"</a></span></p><br/></div><br/></div><br/></td><br/></tr><br/></table><br/><table border="0" cellpadding="0" cellspacing="0" class="text_block" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; word-break: break-word;" width="100%"><br/><tr><br/><td style="padding-top:4px;padding-left:20px;"><br/><div style="font-family: sans-serif"><br/><div style="font-size: 14px; mso-line-height-alt: 28px; color: #555555; line-height: 2; font-family: 'Source Sans Pro', Tahoma, Verdana, Segoe, sans-serif;"><br/><p style="margin: 0; font-size: 14px; text-align: center;"><a href="tel:"+phone+"" rel="noopener" style="text-decoration: underline; color: #ffffff;" target="_blank"><span style="font-size:16px;">"+phone+"</span></a></p><br/></div><br/></div><br/></td><br/></tr><br/></table><br/><table border="0" cellpadding="0" cellspacing="0" class="text_block" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; word-break: break-word;" width="100%"><br/><tr><br/><td style="padding-top:4px;padding-left:20px;"><br/><div style="font-family: sans-serif"><br/><div style="font-size: 14px; mso-line-height-alt: 28px; color: #555555; line-height: 2; font-family: 'Source Sans Pro', Tahoma, Verdana, Segoe, sans-serif;"><br/><p style="margin: 0; font-size: 14px; text-align: center;"><a href=""+web1+"" rel="noopener" style="text-decoration: underline; color: #ffffff;" target="_blank"><span style="font-size:16px;">"+web1+"</span></a></p><br/></div><br/></div><br/></td><br/></tr><br/></table><br/><table border="0" cellpadding="0" cellspacing="0" class="text_block" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt; word-break: break-word;" width="100%"><br/><tr><br/><td style="padding-top:4px;padding-left:20px;"><br/><div style="font-family: sans-serif"><br/><div style="font-size: 14px; mso-line-height-alt: 28px; color: #555555; line-height: 2; font-family: 'Source Sans Pro', Tahoma, Verdana, Segoe, sans-serif;"><br/><p style="margin: 0; font-size: 14px; text-align: center;"><a href=""+web2+"" rel="noopener" style="text-decoration: underline; color: #ffffff;" target="_blank"><span style="font-size:16px;">"+web2+"</span></a></p><br/></div><br/></div><br/></td><br/></tr><br/></table><br/><table border="0" cellpadding="0" cellspacing="0" class="divider_block" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"><br/><tr><br/><td style="padding-top:15px;padding-right:15px;padding-bottom:15px;padding-left:20px;"><br/><div align="center"><br/><table border="0" cellpadding="0" cellspacing="0" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="65%"><br/><tr><br/><td class="divider_inner" style="display: block; font-size: 1px; line-height: 1px; border-top: 1px solid #BBBBBB;"><span> </span></td><br/></tr><br/></table><br/></div><br/></td><br/></tr><br/></table><br/><table border="0" cellpadding="0" cellspacing="0" class="social_block" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="100%"><br/><tr><br/><td style="text-align:center;padding-top:5px;padding-right:5px;padding-bottom:5px;padding-left:20px;"><br/><table align="center" border="0" cellpadding="0" cellspacing="0" class="social-table" role="presentation" style="mso-table-lspace: 0pt; mso-table-rspace: 0pt;" width="230px"><br/><tr><br/><td style=" display: "+linkedindisplay+"; padding:0 7px 0 7px;"><a href=""+linkedin+"" target="_blank"><img alt="LinkedIn" height="32" src="https://firebasestorage.googleapis.com/v0/b/email-signatures-f9d4c.appspot.com/o/Icons%20style%201%2Flinkedin2x.png?alt=media&token=6969d437-e4b8-4b92-bfd7-dfe1298f12da" style="height: auto; border: 0;" title="LinkedIn" width="32"/></a></td><br/><td style="display: "+facebookdisplay+"; padding:0 7px 0 7px;"><a href=""+facebook+"" target="_blank"><img alt="Facebook" height="32" src="https://firebasestorage.googleapis.com/v0/b/email-signatures-f9d4c.appspot.com/o/Icons%20style%201%2Ffacebook2x.png?alt=media&token=42f93d34-8840-4f4a-ab9b-4d484f9c4cf3" style="height: auto; border: 0;" title="Facebook" width="32"/></a></td><br/><td style="display: "+instagramdisplay+";padding:0 7px 0 7px;"><a href=""+instagram+"" target="_blank"><img alt="Instagram" height="32" src="https://firebasestorage.googleapis.com/v0/b/email-signatures-f9d4c.appspot.com/o/Icons%20style%201%2Finstagram2x.png?alt=media&token=fc779715-a1a5-402c-a07d-fc67be44d86c" style="height: auto; border: 0;" title="Instagram" width="32"/></a></td><br/><td style="display: "+twitterdisplay+"; padding:0 7px 0 7px;"><a href=""+twitter+"" target="_blank"><img alt="Twitter" height="32" src="https://firebasestorage.googleapis.com/v0/b/email-signatures-f9d4c.appspot.com/o/Icons%20style%201%2Ftwitter2x.png?alt=media&token=953c10cd-b11b-4b35-9c8f-2f79b8d7ae7c" style="height: auto; border: 0;" title="Twitter" width="32"/></a></td><br/><td style="display: "+youtubedisplay+"; padding:0 7px 0 7px;"><a href=""+youtube+"" target="_blank"><img alt="YouTube" height="32" src="https://firebasestorage.googleapis.com/v0/b/email-signatures-f9d4c.appspot.com/o/Icons%20style%201%2Fyoutube2x.png?alt=media&token=afb428bf-0efe-49a9-9bbb-d6e7da99b02d" style=" height: auto; border: 0;" title="YouTube" width="32"/></a></td><br/></tr><br/></table><br/></td><br/></tr><br/></table><br/></td><br/></tr><br/></tbody><br/></table><br/></td><br/></tr><br/></tbody><br/></table><br/></td><br/></tr><br/></tbody><br/></table><br/></body><br/></html>";
}
function download(filename, outputdownload) {
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(outputdownload));
element.setAttribute('download', filename);
element.style.display = 'none';
document.body.appendChild(element);
element.click();
document.body.removeChild(element);
}
// Start file download.
document.getElementById("output-download").addEventListener("click", function(){
// Generate download of hello.txt file with some content
window.open("https://www.codesignatures.dev/instructions");
var outputdownload = document.getElementById("output").innerText;
var filename = "darkhorsesignature.html";
download(filename, outputdownload);
}, false);
</script>
</body>
</html>