-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathforms.html
More file actions
184 lines (167 loc) · 10.1 KB
/
Copy pathforms.html
File metadata and controls
184 lines (167 loc) · 10.1 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nebula - Forms</title>
<link rel="icon" type="image/x-icon" href="/images/favicon.png">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/css/navbar.css">
<link rel="stylesheet" href="/css/desc.css">
</head>
<body>
<div id="navbar-container"></div>
<center>
<br><br>
<br><br>
<div style="display: flex; flex-wrap: wrap; justify-content: center; gap: 32px; padding: 40px 10px;">
<div style="background: rgba(30,0,60,0.5); border-radius: 24px; box-shadow: 0 0 24px 0 #a3f7ff44; padding: 24px; width: 500px; max-width: 100%;">
<h1 style="color:#a3f7ff; font-family:'Bebas Neue',cursive;">Suggest a Game</h1>
<form class="formspree-form" id="formspreeForm1" action="https://formspree.io/f/mjkaazrj" method="POST" style="display:flex; flex-direction:column; gap:16px;">
<label for="name1" style="color:#a3f7ff; font-weight:600;">Name:</label>
<input type="text" id="name1" name="name" required style="background:#23263a; color:#e0e6ff; border:none; border-radius:8px; padding:10px; font-size:1em;">
<label for="email1" style="color:#a3f7ff; font-weight:600;">Your Email:</label>
<input type="email" id="email1" name="email" required style="background:#23263a; color:#e0e6ff; border:none; border-radius:8px; padding:10px; font-size:1em;">
<input type="hidden" name="subject" value="Suggest a Game">
<label for="message1" style="color:#a3f7ff; font-weight:600;">Game and Link:</label>
<textarea id="message1" name="message" rows="5" required style="background:#23263a; color:#e0e6ff; border:none; border-radius:8px; padding:10px; font-size:1em;"></textarea>
<button type="submit" style="background:linear-gradient(90deg,#3f00ff 0%,#a3f7ff 100%); color:#1a0033; padding:12px; border:none; border-radius:8px; font-size:1.1em; font-weight:bold; cursor:pointer; margin-top:8px; box-shadow:0 0 8px #a3f7ff88; transition:background 0.2s;">Send</button>
</form>
<p id="form-status-1" style="color:#a3f7ff; text-align:center; margin-top:10px; font-weight:600;"></p>
</div>
<div style="background: rgba(30,0,60,0.5); border-radius: 24px; box-shadow: 0 0 24px 0 #a3f7ff44; padding: 24px; width: 500px; max-width: 100%;">
<h1 style="color:#a3f7ff; font-family:'Bebas Neue',cursive;">Bug Report</h1>
<form class="formspree-form" id="formspreeForm2" action="https://formspree.io/f/xanppkjk" method="POST" style="display:flex; flex-direction:column; gap:16px;">
<label for="name2" style="color:#a3f7ff; font-weight:600;">Name:</label>
<input type="text" id="name2" name="name" required style="background:#23263a; color:#e0e6ff; border:none; border-radius:8px; padding:10px; font-size:1em;">
<label for="email2" style="color:#a3f7ff; font-weight:600;">Your Email:</label>
<input type="email" id="email2" name="email" required style="background:#23263a; color:#e0e6ff; border:none; border-radius:8px; padding:10px; font-size:1em;">
<input type="hidden" name="subject" value="Bug Report">
<label for="message2" style="color:#a3f7ff; font-weight:600;">Bug:</label>
<textarea id="message2" name="message" rows="5" required style="background:#23263a; color:#e0e6ff; border:none; border-radius:8px; padding:10px; font-size:1em;"></textarea>
<button type="submit" style="background:linear-gradient(90deg,#3f00ff 0%,#a3f7ff 100%); color:#1a0033; padding:12px; border:none; border-radius:8px; font-size:1.1em; font-weight:bold; cursor:pointer; margin-top:8px; box-shadow:0 0 8px #a3f7ff88; transition:background 0.2s;">Send</button>
</form>
<p id="form-status-2" style="color:#a3f7ff; text-align:center; margin-top:10px; font-weight:600;"></p>
</div>
</div>
</center>
<div id="particles-js"></div>
<footer>
<p style="margin: 0;"><i class="fa fa-star"></i> Nebula — gaming meets reality!</p>
<nav style="margin-top: 8px;">
<a href="/privacy.html"><i class="fa fa-shield"></i> Privacy Policy</a>
<a href="/terms.html"><i class="fa fa-file-contract"></i> Terms of Service</a>
<a href="/contact.html"><i class="fa fa-envelope"></i> Contact Us</a>
<a href="/DMCA.html"><i class="fa fa-gavel"></i> DMCA</a>
</nav>
</footer>
<script src="/js/main.js"></script>
<script src="/js/navbar.js"></script>
<script>
function handleFormspreeSubmit(formId, statusId) {
var form = document.getElementById(formId);
var status = document.getElementById(statusId);
form.addEventListener('submit', function(e) {
e.preventDefault();
var data = new FormData(form);
fetch(form.action, {
method: form.method,
body: data,
headers: { 'Accept': 'application/json' }
}).then(function(response) {
if (response.ok) {
status.textContent = 'Thank you for your message!';
form.reset();
} else {
response.json().then(function(data) {
if (Object.hasOwn(data, 'errors')) {
status.textContent = data["errors"].map(function(error) { return error["message"]; }).join(", ");
} else {
status.textContent = 'Oops! There was a problem submitting your form.';
}
}).catch(function() {
status.textContent = 'Oops! There was a problem submitting your form.';
});
}
}).catch(function(error) {
status.textContent = 'Oops! There was a problem submitting your form.';
});
});
}
handleFormspreeSubmit('formspreeForm1', 'form-status-1');
handleFormspreeSubmit('formspreeForm2', 'form-status-2');
</script>
<script>
(function () {
async function tryGetProfileFromLocal() {
try {
const raw = localStorage.getItem('nebula_profile');
if (!raw) return null;
const p = JSON.parse(raw);
if (p && (p.name || p.email)) return p;
} catch (e) {}
return null;
}
async function tryGetProfileFromPuter() {
try {
if (window.puter && puter.auth && typeof puter.auth.getUser === 'function') {
const res = await puter.auth.getUser();
if (res && res.user) {
const u = res.user;
const meta = u.user_metadata || {};
return {
name: u.name || meta.full_name || meta.name || '',
email: u.email || ''
};
}
}
} catch (e) {}
return null;
}
async function tryGetProfileFromSupabase() {
try {
const url = window.SUPABASE_URL;
const anon = window.SUPABASE_ANON_KEY;
if (!url || !anon) return null;
const mod = await import('https://cdn.jsdelivr.net/npm/@supabase/supabase-js/+esm');
const supabase = mod.createClient(url, anon);
const { data } = await supabase.auth.getSession();
const user = data?.session?.user || null;
if (user) {
const meta = user.user_metadata || {};
return {
name: meta.full_name || meta.name || user.email || '',
email: user.email || ''
};
}
} catch (e) {}
return null;
}
async function fillOrRedirect() {
const name1 = document.getElementById('name1');
const email1 = document.getElementById('email1');
const name2 = document.getElementById('name2');
const email2 = document.getElementById('email2');
// Try localStorage first
let profile = await tryGetProfileFromLocal();
if (!profile) profile = await tryGetProfileFromPuter();
if (!profile) profile = await tryGetProfileFromSupabase();
if (profile) {
if (profile.name) {
if (name1) name1.value = profile.name;
if (name2) name2.value = profile.name;
}
if (profile.email) {
if (email1) email1.value = profile.email;
if (email2) email2.value = profile.email;
}
return; // user is signed in or profile available
}
// No profile detected — do not redirect. Allow user to continue as guest.
// window.location.replace('/profile.html');
}
document.addEventListener('DOMContentLoaded', fillOrRedirect);
})();
</script>
</body>
</html>