deanpowers commited on
Commit
bb4ef5f
·
1 Parent(s): fc0f297

fix(contact): regenerate template with correct UTF-8 emojis and dashes

Browse files
Files changed (1) hide show
  1. templates/contact.html +167 -0
templates/contact.html ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Contact — Blind Monkeys</title>
7
+ <link rel="icon" type="image/svg+xml" href="/static/favicon.svg">
8
+ <link rel="stylesheet" href="/css/nav.css">
9
+ <style>
10
+ body { background: #0d1117; color: #e6edf3; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; margin: 0; }
11
+ .page-content { max-width: 900px; margin: 0 auto; padding: 32px 20px 60px; }
12
+ .breadcrumbs { margin: 0 0 14px 0; font-size: 13px; color: #8b949e; }
13
+ .breadcrumbs a { color: #8b949e; text-decoration: none; }
14
+ .breadcrumbs a:hover { color: #f0b90b; text-decoration: underline; }
15
+ .breadcrumbs .bc-sep { margin: 0 6px; color: #484f58; }
16
+ .breadcrumbs .bc-current { color: #e6edf3; }
17
+ @media (max-width: 640px) { .breadcrumbs { display: none; } }
18
+ h1 { color: #f0b90b; font-size: 26px; margin: 0 0 8px; }
19
+ .sub { color: #8b949e; font-size: 14px; margin: 0 0 28px; }
20
+ .card { background: #1e2329; border: 2px solid #30363d; border-radius: 12px; padding: 24px; margin-bottom: 20px; }
21
+ .card h2 { color: #f0b90b; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; margin: 0 0 16px; }
22
+ .info-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #21262d; font-size: 14px; }
23
+ .info-row:last-child { border-bottom: none; }
24
+ .info-row .lbl { color: #8b949e; min-width: 100px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
25
+ .info-row a { color: #f0b90b; text-decoration: none; }
26
+ .info-row a:hover { text-decoration: underline; }
27
+ .field { margin-bottom: 16px; }
28
+ .field label { display: block; font-size: 12px; color: #8b949e; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
29
+ .field input, .field select, .field textarea {
30
+ width: 100%; box-sizing: border-box; padding: 12px 14px;
31
+ background: #0d1117; border: 2px solid #30363d; border-radius: 8px;
32
+ color: #e6edf3; font-size: 15px; font-family: inherit;
33
+ }
34
+ .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: #f0b90b; }
35
+ .field textarea { resize: vertical; min-height: 140px; }
36
+ .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
37
+ .btn { width: 100%; padding: 14px; background: #f0b90b; color: #0d1117; border: none; border-radius: 8px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
38
+ .btn:hover:not(:disabled) { opacity: 0.9; }
39
+ .btn:disabled { opacity: 0.5; cursor: not-allowed; }
40
+ .msg { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; display: none; }
41
+ .msg.ok { background: #1a3a1a; border: 1px solid #4ade80; color: #4ade80; }
42
+ .msg.err { background: #3a1a1a; border: 1px solid #f87171; color: #f87171; }
43
+ </style>
44
+ </head>
45
+ <body>
46
+ <nav class="nav-bar">
47
+ <a href="/" class="nav-brand">🙈 Blind Monkeys</a>
48
+ <div class="nav-links">
49
+ <a href="/scan/" class="nav-link">🔍 Scan</a>
50
+ <a href="/settings/" class="nav-link">⚙️ Settings</a>
51
+ </div>
52
+ </nav>
53
+
54
+ <div class="page-content">
55
+ <div class="breadcrumbs">
56
+ <a href="/">Home</a><span class="bc-sep">›</span><span class="bc-current">Contact</span>
57
+ </div>
58
+
59
+ <h1>📬 Contact Us</h1>
60
+ <p class="sub">Questions, bugs, feedback — send us a message. We read everything.</p>
61
+
62
+ <div id="contact-msg" class="msg"></div>
63
+
64
+ <form id="contact-form" class="card" autocomplete="off">
65
+ <h2>Send a message</h2>
66
+
67
+ <div class="field">
68
+ <label for="c-name">Your name</label>
69
+ <input type="text" id="c-name" name="name" required maxlength="120">
70
+ </div>
71
+
72
+ <div class="field">
73
+ <label for="c-email">Email</label>
74
+ <input type="email" id="c-email" name="email" required maxlength="200">
75
+ </div>
76
+
77
+ <div class="field">
78
+ <label for="c-subject">Subject</label>
79
+ <select id="c-subject" name="subject" required>
80
+ <option value="General">General</option>
81
+ <option value="Bug report">Bug report</option>
82
+ <option value="Feature request">Feature request</option>
83
+ <option value="Feedback">Feedback</option>
84
+ <option value="Other">Other</option>
85
+ </select>
86
+ </div>
87
+
88
+ <div class="field">
89
+ <label for="c-message">Message</label>
90
+ <textarea id="c-message" name="message" required maxlength="5000"></textarea>
91
+ <div style="text-align:right;font-size:11px;color:#484f58;margin-top:4px;"><span id="c-count">0</span> / 5000</div>
92
+ </div>
93
+
94
+ <div class="hp" aria-hidden="true">
95
+ <label>Leave this empty</label>
96
+ <input type="text" name="website" tabindex="-1" autocomplete="off">
97
+ </div>
98
+
99
+ <button class="btn" id="c-submit" type="submit">Send message</button>
100
+ </form>
101
+
102
+ <div class="card">
103
+ <h2>Other ways to reach us</h2>
104
+ <div class="info-row"><span class="lbl">Telegram</span><a href="https://t.me/deanpowers" target="_blank" rel="noopener">@deanpowers</a></div>
105
+ <div class="info-row"><span class="lbl">Email</span><a href="mailto:dean.powers@gmail.com">dean.powers@gmail.com</a></div>
106
+ <div class="info-row"><span class="lbl">Source</span><a href="https://sr.ht/~deanpowers" target="_blank" rel="noopener">sr.ht/~deanpowers</a></div>
107
+ <div class="info-row"><span class="lbl">Twitter</span><a href="https://x.com/deanpowers" target="_blank" rel="noopener">@deanpowers</a></div>
108
+ </div>
109
+ </div>
110
+
111
+ <script src="/css/nav.js"></script>
112
+ <script>
113
+ (function(){
114
+ var form = document.getElementById('contact-form');
115
+ var msg = document.getElementById('contact-msg');
116
+ var btn = document.getElementById('c-submit');
117
+ var ta = document.getElementById('c-message');
118
+ var cnt = document.getElementById('c-count');
119
+
120
+ ta.addEventListener('input', function(){ cnt.textContent = ta.value.length; });
121
+
122
+ form.addEventListener('submit', function(e){
123
+ e.preventDefault();
124
+ msg.style.display = 'none';
125
+ var data = {
126
+ name: form.name.value.trim(),
127
+ email: form.email.value.trim(),
128
+ subject: form.subject.value,
129
+ message: form.message.value.trim(),
130
+ website: form.website.value
131
+ };
132
+ if (!data.name || !data.email || !data.message) {
133
+ msg.className = 'msg err'; msg.textContent = 'Please fill in all required fields.'; msg.style.display = 'block';
134
+ return;
135
+ }
136
+ btn.disabled = true; btn.textContent = 'Sending...';
137
+ fetch('/api/contact', {
138
+ method: 'POST',
139
+ headers: {'Content-Type': 'application/json'},
140
+ body: JSON.stringify(data)
141
+ })
142
+ .then(function(r){ return r.json(); })
143
+ .then(function(d){
144
+ if (d.ok) {
145
+ msg.className = 'msg ok';
146
+ msg.textContent = '\u2705 Thanks! Your message was sent. We\u2019ll get back to you soon.';
147
+ msg.style.display = 'block';
148
+ form.reset(); cnt.textContent = '0';
149
+ } else {
150
+ msg.className = 'msg err';
151
+ msg.textContent = d.error || 'Something went wrong. Please try again.';
152
+ msg.style.display = 'block';
153
+ }
154
+ })
155
+ .catch(function(){
156
+ msg.className = 'msg err';
157
+ msg.textContent = 'Network error. Please try again.';
158
+ msg.style.display = 'block';
159
+ })
160
+ .finally(function(){
161
+ btn.disabled = false; btn.textContent = 'Send message';
162
+ });
163
+ });
164
+ })();
165
+ </script>
166
+ </body>
167
+ </html>