Repository navigation
Expand file tree
/
Copy pathfeatures.html
More file actions
507 lines (466 loc) · 24.8 KB
/
Copy pathfeatures.html
File metadata and controls
507 lines (466 loc) · 24.8 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
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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
<!DOCTYPE html>
<html lang="en" class="h-full">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Features - Synth Patch</title>
<meta name="description" content="Explore Synth Patch features in detail. Interactive synthesizer interfaces, patch management, sharing, and more.">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<link rel="canonical" href="https://synthpatch.io/features">
<meta property="og:url" content="https://synthpatch.io/features">
<meta property="og:title" content="Features - Synth Patch">
<meta property="og:description" content="Explore Synth Patch features in detail. Interactive synthesizer interfaces, patch management, sharing, and more.">
<meta property="og:image" content="https://synthpatch.io/brand-assets/og-default.png">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://synthpatch.io/features">
<meta property="twitter:title" content="Features - Synth Patch">
<meta property="twitter:description" content="Explore Synth Patch features in detail. Interactive synthesizer interfaces, patch management, sharing, and more.">
<meta property="twitter:image" content="https://synthpatch.io/brand-assets/og-default.png">
<!-- Favicon -->
<link rel="icon" type="image/png" sizes="16x16" href="brand-assets/Favicon/SynthPatch-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="brand-assets/Favicon/SynthPatch-32x32.png">
<link rel="apple-touch-icon" sizes="180x180" href="brand-assets/Favicon/SynthPatch-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="brand-assets/Favicon/SynthPatch-192x192.png">
<!-- PARTIAL:head -->
<!-- Before first paint: apply the saved theme so dark mode doesn't flash, and
honor a cookie-banner answer given on the app (shared through a cookie)
before Umami loads. assets/site.js does the rest. -->
<script>
(function () {
try {
var read = function (name) {
var match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
return match ? decodeURIComponent(match[1]) : null;
};
var theme = localStorage.getItem('synth-patch-theme') || 'system';
var dark = theme === 'dark' || (theme !== 'light' && window.matchMedia('(prefers-color-scheme: dark)').matches);
document.documentElement.classList.add(dark ? 'dark' : 'light');
var consent = read('synthpatch-consent') || localStorage.getItem('synthpatch-cookie-consent');
if (consent === 'declined') localStorage.setItem('umami.disabled', '1');
else if (consent === 'accepted') localStorage.removeItem('umami.disabled');
} catch (e) {}
})();
</script>
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
<!-- Tailwind CSS, configured like the app -->
<script src="https://cdn.tailwindcss.com"></script>
<script src="/assets/tailwind-config.js"></script>
<link rel="stylesheet" href="/assets/site.css">
<script defer src="/assets/site.js"></script>
<!-- Umami Analytics -->
<script defer src="https://cloud.umami.is/script.js" data-website-id="80ade1d2-80ab-4ebb-8190-2ae0fdfe8b54"></script>
<!-- /PARTIAL:head -->
<!-- JSON-LD Structured Data -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"name": "Features - Synth Patch",
"description": "Explore Synth Patch features in detail. Interactive synthesizer interfaces, patch management, sharing, and more.",
"url": "https://synthpatch.io/features",
"mainEntity": {
"@type": "SoftwareApplication",
"name": "Synth Patch",
"applicationCategory": "MusicApplication",
"operatingSystem": "Web",
"url": "https://synthpatch.io"
}
}
</script>
</head>
<body class="font-sans min-h-full">
<!-- PARTIAL:cookie-banner -->
<!-- Cookie Consent Banner: same as the app's. The answer is shared with the app,
so a visitor only sees it once across both sites (assets/site.js). -->
<div id="cookie-banner" class="hidden fixed bottom-0 left-0 right-0 bg-black text-white py-4 md:py-6 z-50 border-t-2 border-gray-700">
<div class="max-w-7xl mx-auto px-4 md:px-6">
<div class="flex flex-col md:flex-row items-center justify-between gap-4">
<div class="text-center md:text-left">
<p class="text-sm md:text-base text-gray-300">
We use privacy-focused analytics to understand how people use Synth Patch. No personal data is collected by our analytics tool.
<a href="/privacy-policy" class="text-white underline hover:text-gray-300 transition-colors" data-umami-event="cookie-banner-privacy-link">Learn more</a>
</p>
</div>
<div class="flex gap-3 flex-shrink-0">
<button
id="cookie-accept"
class="bg-white text-black hover:bg-gray-100 px-6 py-2 rounded-lg font-semibold text-sm transition-colors whitespace-nowrap"
data-umami-event="cookie-banner-accept"
>
Accept
</button>
<button
id="cookie-decline"
class="bg-transparent text-white hover:text-gray-300 border-2 border-white hover:border-gray-300 px-6 py-2 rounded-lg font-semibold text-sm transition-colors whitespace-nowrap"
data-umami-event="cookie-banner-decline"
>
Decline
</button>
</div>
</div>
</div>
</div>
<!-- /PARTIAL:cookie-banner -->
<!-- PARTIAL:header -->
<!-- Header: same markup and classes as the app's header (synth-patch-ui
src/components/layout/SimpleLayout.tsx) as an anonymous visitor sees it -->
<header class="border-b-2 border-border bg-background">
<div class="relative flex h-16 items-center px-6">
<!-- Logo -->
<a href="/" class="flex items-center hover:opacity-80 transition-opacity" aria-label="Synth Patch home">
<svg
width="32"
height="44"
viewBox="0 0 102 142"
fill="none"
xmlns="http://www.w3.org/2000/svg"
class="h-8 w-auto"
>
<path
d="M9.7251 132.074C22.5037 128.436 38.8648 123.22 38.8648 111.485C38.8648 93.7523 9.72552 99.8561 9.72534 80.4442C9.7251 54.2307 91.8187 54.9047 91.8187 27.2561C91.8187 4.06187 58.9147 3.34823 58.9147 27.2561C58.9147 46.3824 58.9147 72.4749 58.9147 80.4442"
stroke="currentColor"
stroke-width="16"
stroke-linecap="round"
class="text-foreground"
/>
</svg>
</a>
<!-- Center Navigation - absolutely centered on the page -->
<nav class="absolute left-1/2 transform -translate-x-1/2 hidden md:flex items-center gap-6">
<a href="/pricing" class="text-sm font-medium transition-colors hover:text-foreground text-muted-foreground" data-umami-event="header-pricing">Pricing</a>
<a href="/contact" class="text-sm font-medium transition-colors hover:text-foreground text-muted-foreground" data-umami-event="header-contact">Contact</a>
</nav>
<!-- Right Side -->
<div class="ml-auto flex items-center gap-3">
<!-- Mobile menu (the center links don't fit next to the account buttons) -->
<button
id="mobile-nav-button"
type="button"
class="md:hidden inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-none font-mono transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring bg-transparent text-foreground hover:bg-muted hover:text-foreground text-xs font-medium h-8 w-8 p-0"
aria-label="Menu"
aria-controls="mobile-nav"
aria-expanded="false"
>
<svg data-icon="menu" class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 12h16"/><path d="M4 18h16"/><path d="M4 6h16"/></svg>
<svg data-icon="close" class="hidden h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
</button>
<!-- Theme Toggle -->
<button
type="button"
data-theme-toggle
class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-none font-mono transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring bg-transparent text-foreground hover:bg-muted hover:text-foreground text-xs font-medium h-8 w-8 p-0"
title="Switch to light mode"
aria-label="Toggle theme"
data-umami-event="header-theme-toggle"
>
<svg data-theme-icon="light" class="hidden h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="4"/><path d="M12 2v2"/><path d="M12 20v2"/><path d="m4.93 4.93 1.41 1.41"/><path d="m17.66 17.66 1.41 1.41"/><path d="M2 12h2"/><path d="M20 12h2"/><path d="m6.34 17.66-1.41 1.41"/><path d="m19.07 4.93-1.41 1.41"/></svg>
<svg data-theme-icon="dark" class="hidden h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"/></svg>
<svg data-theme-icon="system" class="h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 2v2"/><path d="M13 8.129A4 4 0 0 1 15.873 11"/><path d="m19 5-1.256 1.256"/><path d="M20 12h2"/><path d="M9 8a5 5 0 1 0 7 7 7 7 0 1 1-7-7"/></svg>
</button>
<a
href="https://app.synthpatch.io/sign-in"
class="text-sm font-medium text-foreground hover:text-foreground/80 transition-colors"
data-umami-event="header-login"
>Log in</a>
<a
href="https://app.synthpatch.io/sign-up"
class="inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-none font-mono transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring hover:text-foreground h-10 px-6 text-sm font-medium bg-foreground text-background hover:bg-foreground/90"
data-umami-event="header-sign-up"
>Sign Up</a>
</div>
</div>
<!-- Mobile Navigation -->
<nav id="mobile-nav" class="hidden md:hidden border-t border-border bg-background">
<div class="flex flex-col px-6 py-2">
<a href="/pricing" class="py-3 text-sm font-medium transition-colors hover:text-foreground text-muted-foreground" data-umami-event="mobile-header-pricing">Pricing</a>
<a href="/contact" class="py-3 text-sm font-medium transition-colors hover:text-foreground text-muted-foreground" data-umami-event="mobile-header-contact">Contact</a>
</div>
</nav>
</header>
<!-- /PARTIAL:header -->
<!-- Hero Section -->
<section class="py-12 md:py-20">
<div class="max-w-7xl mx-auto px-4 md:px-6 text-center">
<h1 class="text-3xl md:text-5xl font-bold font-sans mb-4 md:mb-6">Features</h1>
<p class="text-base md:text-xl text-muted-foreground max-w-2xl mx-auto">
Everything you need to capture, organize, and share your synthesizer patches.
</p>
</div>
</section>
<!-- Feature: Embedded Sharing -->
<section id="embedded-sharing" class="pb-16 md:pb-24">
<div class="max-w-5xl mx-auto px-4 md:px-6">
<!-- Feature Header -->
<div class="border-b-2 border-border pb-4 mb-8">
<div class="flex items-center gap-3">
<h2 class="text-2xl md:text-3xl font-bold">Embedded Sharing</h2>
<span class="bg-foreground text-background text-xs font-semibold px-2 py-0.5 rounded">PRO</span>
</div>
<p class="text-muted-foreground mt-2">
Embed interactive patches directly on your website, blog, or course materials.
</p>
</div>
<!-- Static Embed Demo -->
<div class="mb-10">
<h3 class="text-sm font-semibold text-muted-foreground uppercase tracking-wide mb-4">Static Embed</h3>
<p class="text-muted-foreground text-sm mb-4">Display a patch as a non-interactive reference image.</p>
<div>
<iframe
src="https://app.synthpatch.io/embed/efed9a7e-50b0-4932-b030-547496d40f0f?mode=static"
style="width: 100%; max-width: 100%; aspect-ratio: 2592/1690; border: none;"
allowfullscreen
></iframe>
</div>
</div>
<!-- Interactive Embed Demo -->
<div class="mb-10">
<h3 class="text-sm font-semibold text-muted-foreground uppercase tracking-wide mb-4">Interactive Embed</h3>
<p class="text-muted-foreground text-sm mb-4">Let visitors explore the synth by turning knobs and connecting cables.</p>
<div>
<iframe
src="https://app.synthpatch.io/embed/e01fd47f-15b0-4734-8920-a69d3aa7319f"
style="width: 100%; max-width: 100%; aspect-ratio: 3620/1640; border: none;"
allowfullscreen
></iframe>
</div>
</div>
<!-- Use Cases -->
<div>
<h3 class="text-sm font-semibold text-muted-foreground uppercase tracking-wide mb-4">Perfect For</h3>
<div class="grid sm:grid-cols-2 gap-4">
<div class="flex items-start gap-3">
<svg class="w-5 h-5 text-patch-green mt-0.5 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"></path>
</svg>
<span>Synth reviews and tutorials on blogs</span>
</div>
<div class="flex items-start gap-3">
<svg class="w-5 h-5 text-patch-green mt-0.5 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"></path>
</svg>
<span>Product documentation for synth makers</span>
</div>
<div class="flex items-start gap-3">
<svg class="w-5 h-5 text-patch-green mt-0.5 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"></path>
</svg>
<span>Online courses and educational materials</span>
</div>
<div class="flex items-start gap-3">
<svg class="w-5 h-5 text-patch-green mt-0.5 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"></path>
</svg>
<span>Digital patch books to share or sell</span>
</div>
</div>
</div>
</div>
</section>
<!-- More Features Coming Soon -->
<section class="py-12 md:py-16 bg-muted">
<div class="max-w-5xl mx-auto px-4 md:px-6 text-center">
<p class="text-muted-foreground">
More feature details coming soon.
</p>
</div>
</section>
<!-- Footer with CTA -->
<footer class="bg-black text-white py-12 md:py-20 dark:bg-background dark:border-t-2 dark:border-border">
<div class="max-w-4xl mx-auto px-4 md:px-6 text-center">
<h2 class="text-2xl md:text-4xl font-bold font-sans mb-4 md:mb-6">Ready to Get Started?</h2>
<p class="text-base md:text-xl text-gray-300 mb-6 md:mb-8">
Start using Synth Patch today. New synths are being added regularly.
</p>
<a
href="https://app.synthpatch.io"
class="inline-block bg-white text-black hover:bg-gray-100 px-8 py-3 md:py-4 rounded-lg font-semibold text-base md:text-lg transition-colors"
data-umami-event="footer-get-started"
>
Try It Out
</a>
<!-- Newsletter Signup -->
<div class="mt-12 md:mt-16">
<p class="text-base md:text-xl text-gray-300 mb-6 md:mb-8">
Prefer to just stay in the loop?
</p>
<div class="newsletter-form-container max-w-md mx-auto">
<form
class="newsletter-form"
action="https://app.loops.so/api/newsletter-form/cmfh3sbz81y8d1d0iykyege24"
method="POST"
data-umami-event="newsletter-signup-submit"
>
<div class="flex flex-col sm:flex-row gap-3 justify-center items-center w-full">
<input
class="newsletter-form-input w-full sm:w-auto flex-1 max-w-xs px-4 py-3 rounded-lg bg-white text-black border-2 border-gray-300 focus:outline-none focus:border-white transition-colors font-sans text-sm md:text-base"
placeholder="you@example.com"
required
type="email"
name="newsletter-form-input"
>
<button
type="submit"
class="newsletter-form-button w-full sm:w-auto bg-white text-black hover:bg-gray-100 px-6 py-3 rounded-lg font-semibold text-sm md:text-base transition-colors font-sans whitespace-nowrap"
>
Join Mailing List
</button>
<button
type="button"
class="newsletter-loading-button hidden w-full sm:w-auto bg-gray-400 text-black px-6 py-3 rounded-lg font-semibold text-sm md:text-base font-sans whitespace-nowrap cursor-not-allowed"
disabled
>
Please wait...
</button>
</div>
</form>
<div class="newsletter-success hidden mt-4">
<p class="newsletter-success-message text-green-400 font-sans text-sm md:text-base">
Thanks! We'll be in touch!
</p>
</div>
<div class="newsletter-error hidden mt-4">
<p class="newsletter-error-message text-red-400 font-sans text-sm md:text-base">
Oops! Something went wrong, please try again
</p>
</div>
<button
class="newsletter-back-button hidden mt-4 text-gray-400 hover:text-white font-sans text-sm transition-colors bg-transparent border-none cursor-pointer"
type="button"
>
← Back
</button>
</div>
</div>
<div class="pt-12 md:pt-16 text-center text-xs md:text-sm text-gray-400 border-t border-gray-700 dark:border-border mt-12 md:mt-16">
<div class="mb-4">
<a href="/terms-of-service" class="hover:text-white transition-colors" data-umami-event="footer-terms-of-service">Terms of Service</a>
<span class="mx-2">|</span>
<a href="/privacy-policy" class="hover:text-white transition-colors" data-umami-event="footer-privacy-policy">Privacy Policy</a>
</div>
<p>© 2026 Synth Patch. Made with ❤️ by <a href="https://www.humancrafted.co?utm_source=synthpatch" class="hover:text-white transition-colors" data-umami-event="footer-human-crafted">human / crafted</a>.</p>
</div>
</div>
</footer>
<!-- Newsletter Form Script -->
<script>
function submitHandler(event) {
event.preventDefault();
var container = event.target.parentNode;
var form = container.querySelector(".newsletter-form");
var formInput = container.querySelector(".newsletter-form-input");
var success = container.querySelector(".newsletter-success");
var errorContainer = container.querySelector(".newsletter-error");
var errorMessage = container.querySelector(".newsletter-error-message");
var backButton = container.querySelector(".newsletter-back-button");
var submitButton = container.querySelector(".newsletter-form-button");
var loadingButton = container.querySelector(".newsletter-loading-button");
const rateLimit = () => {
errorContainer.style.display = "flex";
errorContainer.classList.remove("hidden");
errorMessage.innerText = "Too many signups, please try again in a little while";
submitButton.style.display = "none";
submitButton.classList.add("hidden");
formInput.style.display = "none";
formInput.classList.add("hidden");
backButton.style.display = "block";
backButton.classList.remove("hidden");
}
// Compare current time with time of previous sign up
var time = new Date();
var timestamp = time.valueOf();
var previousTimestamp = localStorage.getItem("loops-form-timestamp");
// If last sign up was less than a minute ago, display error
if (previousTimestamp && Number(previousTimestamp) + 60000 > timestamp) {
rateLimit();
return;
}
localStorage.setItem("loops-form-timestamp", timestamp);
submitButton.style.display = "none";
submitButton.classList.add("hidden");
loadingButton.style.display = "flex";
loadingButton.classList.remove("hidden");
var formBody = "userGroup=Mailing%20List&mailingLists=&email="
+ encodeURIComponent(formInput.value);
fetch(event.target.action, {
method: "POST",
body: formBody,
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
})
.then((res) => [res.ok, res.json(), res])
.then(([ok, dataPromise, res]) => {
if (ok) {
// If response successful, display success
success.style.display = "flex";
success.classList.remove("hidden");
form.reset();
} else {
// If response unsuccessful, display error message or response status
dataPromise.then(data => {
errorContainer.style.display = "flex";
errorContainer.classList.remove("hidden");
errorMessage.innerText = data.message ? data.message : res.statusText;
});
}
})
.catch(error => {
// Check for cloudflare error
if (error.message === "Failed to fetch") {
rateLimit();
return;
}
// If error caught, display error message if available
errorContainer.style.display = "flex";
errorContainer.classList.remove("hidden");
if (error.message) errorMessage.innerText = error.message;
localStorage.setItem("loops-form-timestamp", '');
})
.finally(() => {
formInput.style.display = "none";
formInput.classList.add("hidden");
loadingButton.style.display = "none";
loadingButton.classList.add("hidden");
backButton.style.display = "block";
backButton.classList.remove("hidden");
});
}
function resetFormHandler(event) {
var container = event.target.parentNode;
var formInput = container.querySelector(".newsletter-form-input");
var success = container.querySelector(".newsletter-success");
var errorContainer = container.querySelector(".newsletter-error");
var errorMessage = container.querySelector(".newsletter-error-message");
var backButton = container.querySelector(".newsletter-back-button");
var submitButton = container.querySelector(".newsletter-form-button");
success.style.display = "none";
success.classList.add("hidden");
errorContainer.style.display = "none";
errorContainer.classList.add("hidden");
errorMessage.innerText = "Oops! Something went wrong, please try again";
backButton.style.display = "none";
backButton.classList.add("hidden");
formInput.style.display = "flex";
formInput.classList.remove("hidden");
submitButton.style.display = "flex";
submitButton.classList.remove("hidden");
}
var formContainers = document.getElementsByClassName("newsletter-form-container");
for (var i = 0; i < formContainers.length; i++) {
var formContainer = formContainers[i]
var handlersAdded = formContainer.classList.contains('newsletter-handlers-added')
if (handlersAdded) continue;
formContainer
.querySelector(".newsletter-form")
.addEventListener("submit", submitHandler);
formContainer
.querySelector(".newsletter-back-button")
.addEventListener("click", resetFormHandler);
formContainer.classList.add("newsletter-handlers-added");
}
</script>
</body>
</html>