-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
77 lines (74 loc) · 4.94 KB
/
script.js
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
document.getElementById("signatureForm").addEventListener("submit", function(event) {
event.preventDefault();
// Get user input
const fullName = document.getElementById("fullName").value;
const phoneNumber = document.getElementById("phoneNumber").value;
const position = document.getElementById("position").value;
const tokenizedFullNameWithDash = fullName.toLowerCase().replace(/\s/g, "-");
const signatureTemplate = `
<div>
<table role="presentation" style="font-family: Helvetica, Arial, sans-serif; color: #0F0033;">
<tbody>
<tr>
<td>
<table role="presentation">
<tbody>
<tr>
<td style="font-size: 14px; color: #0F0033; font-weight: bold;">${fullName}</td>
</tr>
<tr>
<td style="font-size: 12px; color: #6F6685;">${position}</td>
</tr>
<tr>
<td>
<a href="tel:+66 (0)2 258 3649" target="_blank" style="font-size: 12px; color: #0F0033; text-decoration: none !important; display: block; margin-bottom: 4px; margin-top: 12px;">${phoneNumber}</a>
<a href="https://nimblehq.co/?utm_source=email&utm_medium=email-signature&utm_campaign=${tokenizedFullNameWithDash}" target="_blank" style="font-size: 12px; color: #0F0033; text-decoration: none !important; display: block; margin-bottom: 12px;">nimblehq.co</a>
</td>
</tr>
<tr>
<td colspan="2" class="social-icons">
<ul style="list-style: none; padding: 0; margin: 0;">
<li style="float: left; margin-right: 8px; margin-left: 0 !important;">
<a href="https://www.facebook.com/nimblehq" target="_blank" style="font-size: 12px; font-weight: bold; line-height: 24px; color: #0F0033; text-decoration: none !important; display: inline-block; text-align: center; width: 24px; height: 24px; background-color: #EEF2F5;">
Fb
</a>
</li>
<li style="float: left; margin-right: 8px; margin-left: 0 !important;">
<a href="https://www.instagram.com/nimble_hq/" target="_blank" style="font-size: 12px; font-weight: bold; line-height: 24px; color: #0F0033; text-decoration: none !important; display: inline-block; text-align: center; width: 24px; height: 24px; background-color: #EEF2F5;">
Ig
</a>
</li>
<li style="float: left; margin-right: 8px; margin-left: 0 !important;">
<a href="https://www.linkedin.com/company/nimblehq" target="_blank" style="font-size: 12px; font-weight: bold; line-height: 24px; color: #0F0033; text-decoration: none !important; display: inline-block; text-align: center; width: 24px; height: 24px; background-color: #EEF2F5;"">
In
</a>
</li>
<li style="float: left; margin-right: 8px; margin-left: 0 !important;">
<a href="https://dribbble.com/nimblehq" target="_blank" style="font-size: 12px; font-weight: bold; line-height: 24px; color: #0F0033; text-decoration: none; display: inline-block; text-align: center; width: 24px; height: 24px; background-color: #EEF2F5;">
Db
</a>
</li>
<li style="float: left; margin-right: 8px; margin-left: 0 !important;">
<a href="https://www.behance.net/nimblehq" target="_blank" style="font-size: 12px; font-weight: bold; line-height: 24px; color: #0F0033; text-decoration: none !important; display: inline-block; text-align: center; width: 24px; height: 24px; background-color: #EEF2F5;">
Be
</a>
</li>
<li style="float: left; margin-right: 8px; margin-left: 0 !important;" >
<a href="https://medium.com/nimble" target="_blank" style="font-size: 12px; font-weight: bold; line-height: 24px; color: #0F0033; text-decoration: none !important; display: inline-block; text-align: center; width: 24px; height: 24px; background-color: #EEF2F5;">
M
</a>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
`;
// Display the generated signature in the preview area
document.getElementById("signaturePreview").innerHTML = signatureTemplate;
});