Repository navigation
Expand file tree
/
Copy pathtest.html
More file actions
103 lines (97 loc) · 3.94 KB
/
Copy pathtest.html
File metadata and controls
103 lines (97 loc) · 3.94 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MailLayer Embedded Test Page</title>
<style>
body {
font-family: 'Inter', -apple-system, sans-serif;
background: #f8fafc;
color: #1e293b;
padding: 40px;
max-width: 800px;
margin: 0 auto;
line-height: 1.6;
}
h1 { font-size: 2.5rem; color: #0f172a; margin-bottom: 0.5rem; }
p.subtitle { color: #64748b; font-size: 1.1rem; margin-bottom: 2rem; }
.card {
background: white;
padding: 28px;
border-radius: 16px;
box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
margin-bottom: 20px;
}
.btn {
display: inline-block;
background: #e03616;
color: white;
padding: 12px 24px;
border-radius: 8px;
text-decoration: none;
font-weight: 700;
cursor: pointer;
border: none;
transition: all 0.2s;
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(224, 54, 22, 0.4);
}
.btn-secondary {
background: #475569;
}
.btn-secondary:hover {
box-shadow: 0 10px 15px -3px rgba(71, 85, 105, 0.4);
}
code {
background: #f1f5f9;
padding: 2px 6px;
border-radius: 4px;
font-family: monospace;
color: #0f172a;
}
</style>
</head>
<body>
<h1>MailLayer Embedded Demo</h1>
<p class="subtitle">Click any link below to trigger MailLayer. On your first click, you will be prompted to select your preferred email service.</p>
<div class="card">
<h3>Standard Mailto Link</h3>
<p>Intercepts traditional email links on the page.</p>
<a href="mailto:burnsdevfeedback@gmail.com?subject=Help%20Requested&body=Hello%20Team," class="btn">Contact Support</a>
</div>
<div class="card">
<h3>Multiple Recipients (CC & BCC)</h3>
<p>Pre-fills multiple recipients cleanly into your selected email service.</p>
<a href="mailto:dev@example.com?cc=manager@example.com&bcc=archive@example.com&subject=Project%20Update" class="btn" style="background: #2563eb;">Send Update</a>
</div>
<div class="card">
<h3>Button Trigger (.maillayer-trigger)</h3>
<p>Triggers MailLayer from custom dataset attributes without requiring a mailto tag.</p>
<button class="maillayer-trigger btn"
data-maillayer-to="hiring@startup.io"
data-maillayer-subject="Application for Senior Engineer"
data-maillayer-body="Hello, I am interested in the position.">Apply Now</button>
</div>
<div class="card">
<h3>Auto-Detect (Magic UX)</h3>
<p>These plain-text email addresses are automatically transformed into interactive triggers:</p>
<ul>
<li>Primary contact: info@maillayer.wiki</li>
<li>Support: help.desk@maillayer.wiki</li>
<li>Direct: corey@example.com</li>
</ul>
</div>
<div class="card" style="background: #f1f5f9; border: 1px dashed #cbd5e1;">
<h3>Testing Utility: Preference Management</h3>
<p>Reset your stored provider preference to trigger the selection modal prompt on your next click.</p>
<button onclick="localStorage.removeItem('maillayer_provider'); alert('Saved provider preference cleared! Click any link to see the selection prompt.');" class="btn btn-secondary">Reset Provider Choice</button>
</div>
<!-- Include the MailLayer library with Auto-Detect ENABLED -->
<script src="maillayer.js"
data-maillayer-auto-detect="true"
data-maillayer-auto-link-color="#e03616"></script>
</body>
</html>