Spaces:
Sleeping
Sleeping
<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, shrink-to-fit=no"/> | |
<meta name="description" content=""/> | |
<meta name="author" content=""/> | |
<title>Sign Up</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:wght@300;400;500&display=swap" rel="stylesheet"> | |
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" | |
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> | |
<link rel="stylesheet" href="../../../static/css/auth.css"> | |
{# <link rel="stylesheet" href="{{ url_for('static', path='/css/auth.css') }}">#} | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/js/all.min.js" crossorigin="anonymous"></script> | |
</head> | |
<body class="bg-auth"> | |
<div id="layoutAuthentication"> | |
<div id="layoutAuthentication_content"> | |
<header style="background-color: #fff;" class="header"> | |
<div class="py-4 d-flex align-items-center"> | |
<div class="py-2 ms-5"> | |
<div class="mb-0 fs-1" style="font-weight: 500; line-height: 0.6;"> | |
hector<span style="font-size: 18px; color: #9343fb">✦</span> | |
</div> | |
<span style="color: #9343fb; font-size: 19px; font-weight: 300;">Beta</span> | |
</div> | |
</div> | |
</header> | |
<main class="mt-5 pt-5"> | |
<div class="container"> | |
<div class="row justify-content-center align-items-center" id="signin-display"> | |
<div class="col-lg-5"> | |
<div class="card border-0 rounded-lg mb-5"> | |
<div class=""><h3 | |
class="text-center my-4 fs-1 mt-5" style="font-weight: 300;">Sign Up</h3> | |
</div> | |
<div class="card-body"> | |
<form id="signup-form" class="mx-4"> | |
<div class="form-floating mb-4"> | |
<input autoComplete={'email'} type="email" class="form-control" | |
id="floatingEmail" | |
placeholder="[email protected]" | |
style="background-color: #292323; color: white; border-radius: 10px" | |
required/> | |
<label for="floatingEmail" style="color: #e8e8e8">Email</label> | |
</div> | |
<div class="form-floating mb-4"> | |
<input type="text" class="form-control floating-username" | |
id="floatingUsername" | |
placeholder="Rick" | |
style="background-color: #292323; color: white; border-radius: 10px" | |
required> | |
<label for="floatingUsername" style="color: #e8e8e8">Username</label> | |
</div> | |
<div class="form-floating mb-4"> | |
<input type="password" class="form-control" id="floatingPassword1" | |
placeholder="Password" | |
style="background-color: #292323; color: white; border-radius: 10px" | |
required> | |
<label for="floatingPassword1" style="color: #e8e8e8">Password</label> | |
</div> | |
<div class="form-floating"> | |
<input type="password" class="form-control" id="floatingPassword2" | |
placeholder="Confirm password" | |
style="background-color: #292323; color: white; border-radius: 10px" | |
required> | |
<label for="floatingPassword2" style="color: #e8e8e8">Confirm the password</label> | |
</div> | |
<div class="form-group d-flex align-items-center justify-content-center mt-4 mb-0"> | |
<button class="btn py-2 fs-5 auth-button text-white w-100" type="Submit"> | |
Sign Up | |
</button> | |
</div> | |
<div class="d-flex justify-content-center mt-4"> | |
<div class="auth-line"></div> | |
</div> | |
</form> | |
</div> | |
<div class="text-center my-4"> | |
Do you have an account? <a href="{{ url_for('login') }}" style="color: black">Log In</a> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</main> | |
</div> | |
</div> | |
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" crossorigin="anonymous"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" | |
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" | |
crossorigin="anonymous"></script> | |
<!--<script>--> | |
<!-- window.addEventListener('DOMContentLoaded', function () {--> | |
<!-- var form = document.getElementById('signup-form');--> | |
<!-- form.addEventListener('submit', function (event) {--> | |
<!-- event.preventDefault();--> | |
<!-- // Получить значения полей формы--> | |
<!-- var email = document.getElementById('floatingEmail').value;--> | |
<!-- var username = document.getElementById('floatingUsername').value;--> | |
<!-- var password1 = document.getElementById('floatingPassword1').value;--> | |
<!-- var password2 = document.getElementById('floatingPassword2').value;--> | |
<!-- if (password1 !== password2) {--> | |
<!-- alert("Passwords didn't match!");--> | |
<!-- event.preventDefault();--> | |
<!-- } else {--> | |
<!-- var formData = {--> | |
<!-- email: email,--> | |
<!-- password: password1,--> | |
<!-- is_active: true,--> | |
<!-- is_superuser: false,--> | |
<!-- is_verified: false,--> | |
<!-- username: username,--> | |
<!-- id: 0--> | |
<!-- };--> | |
<!-- fetch('/auth/register', {--> | |
<!-- method: 'POST',--> | |
<!-- headers: {--> | |
<!-- 'Content-Type': 'application/json'--> | |
<!-- },--> | |
<!-- body: JSON.stringify(formData)--> | |
<!-- })--> | |
<!-- .then(function (response) {--> | |
<!-- if (response.ok) {--> | |
<!-- console.log('Form data submitted successfully');--> | |
<!-- window.location.href = 'http://' + window.location.host + '/user/login';--> | |
<!-- } else if (response.status === 400) {--> | |
<!-- alert("A user with this email already exists");--> | |
<!-- event.preventDefault()--> | |
<!-- } else if (response.status === 500) {--> | |
<!-- alert("A user with this username already exists");--> | |
<!-- event.preventDefault()--> | |
<!-- } else {--> | |
<!-- console.error('Error submitting form data');--> | |
<!-- alert('Something was wrong...')--> | |
<!-- event.preventDefault()--> | |
<!-- }--> | |
<!-- })--> | |
<!-- .catch(function (error) {--> | |
<!-- console.error('Error submitting form data:', error);--> | |
<!-- });--> | |
<!-- }--> | |
<!-- });--> | |
<!-- });--> | |
<!--</script>--> | |
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" crossorigin="anonymous"></script> | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" | |
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" | |
crossorigin="anonymous"></script> | |
<script src="https://kit.fontawesome.com/d4ffd37f75.js" crossorigin="anonymous"></script> | |
{#<script type="text/javascript" src="{{ url_for('static', path='/js/users/register.js') }}"></script>#} | |
<script type="text/javascript" src="../../../static/js/users/register.js"></script> | |
</body> | |
</html> | |