Repository navigation
Expand file tree
/
Copy pathform.html
More file actions
83 lines (81 loc) · 2.71 KB
/
Copy pathform.html
File metadata and controls
83 lines (81 loc) · 2.71 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
<!DOCTYPE html>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Redirecting…</title>
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/base.css">
<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=Playfair+Display:wght@600&family=DM+Sans:wght@400;500&display=swap" rel="stylesheet">
<style>
body {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
text-align: center;
}
.redirect-box {
max-width: 400px;
padding: var(--sp-8);
}
.redirect-box h2 {
font-size: var(--fs-display-sm);
margin-bottom: var(--sp-3);
}
.redirect-box p {
color: var(--text-secondary);
font-size: var(--fs-body-sm);
margin-bottom: var(--sp-6);
}
.spinner {
width: 24px; height: 24px;
border: 2px solid var(--glass-border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
margin: 0 auto var(--sp-4);
}
@keyframes spin { to { transform: rotate(360deg); } }
.fallback-link {
color: var(--accent);
font-size: var(--fs-body-sm);
}
</style>
</head>
<body>
<div class="redirect-box">
<div class="spinner"></div>
<h2>Taking you there…</h2>
<p>You're being redirected to the membership form.</p>
<a href="#" class="fallback-link" id="fallbackLink">Click here if not redirected</a>
</div>
<script>
(async () => {
const stored = localStorage.getItem('theme');
if (stored) document.documentElement.setAttribute('data-theme', stored);
try {
const res = await fetch('data/club.json');
const data = await res.json();
const url = data.join && data.join.formLink;
if (url) {
document.getElementById('fallbackLink').href = url;
window.location.href = url;
} else {
document.querySelector('.redirect-box p').textContent =
'No form link configured yet. Head back to the main page.';
document.getElementById('fallbackLink').href = './';
document.getElementById('fallbackLink').textContent = 'Back to home';
document.querySelector('.spinner').style.display = 'none';
}
} catch {
document.getElementById('fallbackLink').href = './';
document.getElementById('fallbackLink').textContent = 'Back to home';
document.querySelector('.spinner').style.display = 'none';
}
})();
</script>
</body>
</html>