89 lines
2.3 KiB
HTML
89 lines
2.3 KiB
HTML
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Slowcord</title>
|
|
|
|
<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=Montserrat&display=swap"
|
|
rel="stylesheet"
|
|
/>
|
|
|
|
<link rel="stylesheet" href="./css/index.css" />
|
|
<script src="js/handler.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<div class="content">
|
|
<div class="login">
|
|
<div class="header">
|
|
<h1>Welcome to Slowcord</h1>
|
|
<div class="header-subtext">
|
|
<p>You're new?</p>
|
|
<a href="/login">Actually, I'm not!</a>
|
|
</div>
|
|
|
|
<p id="failure">Register failed</p>
|
|
</div>
|
|
|
|
<form action="javascript:void(0);">
|
|
<label for="email">Email</label>
|
|
<input type="email" name="email" />
|
|
|
|
<label for="username">Username</label>
|
|
<input type="username" name="username" />
|
|
|
|
<label for="password">Password</label>
|
|
<input type="password" name="password" />
|
|
|
|
<label for="dob">Date of Birth</label>
|
|
<input type="date" name="dob" />
|
|
|
|
<input type="submit" value="Register" />
|
|
|
|
<a
|
|
id="loginDiscord"
|
|
class="oauth"
|
|
href="https://discord.com/api/oauth2/authorize?client_id=991688571415175198&redirect_uri=https%3A%2F%2Fslowcord.maddy.k.vu%2Foauth%2Fdiscord&response_type=code&scope=identify%20email"
|
|
>
|
|
Login with Discord
|
|
</a>
|
|
|
|
<div
|
|
class="h-captcha"
|
|
data-sitekey="fa3163ea-79a7-4b7b-b752-b58c545906c8"
|
|
></div>
|
|
<script
|
|
src="https://js.hcaptcha.com/1/api.js"
|
|
async
|
|
defer
|
|
></script>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
document.forms[0].addEventListener("submit", async (e) => {
|
|
const data = new FormData(e.target);
|
|
const email = data.get("email");
|
|
const username = data.get("username");
|
|
const password = data.get("password");
|
|
const dob = data.get("dob");
|
|
const hcaptcha = data.get("h-captcha-response");
|
|
|
|
await handleSubmit("/api/v9/auth/register", {
|
|
consent: true,
|
|
email: email,
|
|
username: username,
|
|
password: password,
|
|
date_of_birth: dob,
|
|
captcha_key: hcaptcha,
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|