Files
Remote-Gameplay/templates/registration.html

249 lines
7.9 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Register - Free Bulma template</title>
<link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;500;700&display=swap" rel="stylesheet">
<script src="https://kit.fontawesome.com/15181efa86.js" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://unpkg.com/bulma@0.9.0/css/bulma.min.css"/>
<link rel="stylesheet" type="text/css" href="assets/css/register.css">
</head>
<body>
<section class="container">
<div class="columns is-multiline">
<div class="column is-8 is-offset-2 register">
<div class="columns">
<div class="column left">
<h1 class="title is-1">Xplane 11 WebRTC</h1>
<br>
<h2 class="subtitle is-4">Enjoy the XPlane 11 gameplay performance without any setup</h2>
<p></p>
</div>
<div class="column right has-text-centered">
<h1 class="title is-4">Sign up today</h1>
<p class="description">We cool so long as your computer supports a browser</p>
<form>
<div class="field">
<div class="control">
<input class="input is-medium" type="text" id="Name" placeholder="Name" required>
</div>
</div>
<div class="field">
<div class="control">
<input class="input is-medium" type="email" id="EmailID" placeholder="Email" required>
</div>
</div>
<div class="field">
<div class="control">
<input class="input is-medium" type="password" id="Password" placeholder="Password" required>
</div>
</div>
<div class="field">
<div class="control">
<input class="input is-medium" type="password" id="ConfirmPassword" placeholder="Confirm password" required>
</div>
</div>
<div class="field">
<div class="control">
<p id="NameError"></p>
<p id="EmailIDError"></p>
<p id="ConfirmPasswordError"></p>
<p id="ResponseText"></p>
</div>
</div>
<button class="button is-block is-success is-fullwidth is-medium" onclick="RegisterSubmit();return false;">Submit</button>
<br>
<a href="/login" >Already have an account ?</a>
<br>
<a href="/forgotpassword">Forgot password ?</a>
<br/>
<br/>
<small><em></em></small>
</form>
</div>
</div>
</div>
<div class="column is-8 is-offset-2">
<br>
<nav class="level">
<div class="level-left">
<div class="level-item">
<span class="icon">
<i class="fab fa-github"></i>
</span> &emsp;
</div>
</div>
<div class="level-right">
<small class="level-item" style="color: var(--textLight)">
&copy; Super Cool Website. All Rights Reserved.
</small>
</div>
</nav>
</div>
</div>
</section>
</body>
<!-- The following script handles communicating with the server for registration -->
<script>
// The function is called on OnClick action
function RegisterSubmit() {
// Getting element information of all the fields
// required for registration
var EmailID = document.getElementById("EmailID").value
var Name = document.getElementById("Name").value
var Password = document.getElementById("Password").value
var ConfirmPassword = document.getElementById("ConfirmPassword").value
// When Name is not entered
if (Name == "") {
document.getElementById("Name").innerHTML = "Enter Name"
return
}
// When Name is entered
if (Name != "") {
document.getElementById("Name").innerHTML = ""
}
// When EmailID is not entered
if (EmailID == "") {
document.getElementById("EmailIDError").innerHTML = "Enter EmailID"
return
}
// When EmailID is entered
if (EmailID != "") {
document.getElementById("EmailIDError").innerHTML = ""
}
// When password and confirm password don't match
if (Password != ConfirmPassword) {
document.getElementById("ConfirmPasswordError").innerHTML = "Password and confirm password don't match"
return
}
// When the password matches then clear the field
if (Password == ConfirmPassword){
document.getElementById("ConfirmPasswordError").innerHTML = ""
}
// binding data to uri encoded string
uriencoded = "Name=" + Name + "&EmailID=" + EmailID + "&Password=" + Password
// Submitting the registration information
var xhr = new XMLHttpRequest();
xhr.open("POST", "/register", true);
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
xhr.send(uriencoded);
xhr.onload = function() {
// Outputting response text
document.getElementById("ResponseText").innerHTML = xhr.responseText
}
}
// comparing strings
function strcmp(a, b)
{
return (a<b?-1:(a>b?1:0));
}
</script>
<style>
:root {
--brandColor: hsl(166, 67%, 51%);
--background: rgb(247, 247, 247);
--textDark: hsla(0, 0%, 0%, 0.66);
--textLight: hsla(0, 0%, 0%, 0.33);
}
body {
background: url('https://forums.x-plane.org/screenshots/monthly_2017_07/b738_21.png.5ba5bcaca689d85705396affb04473ce.png');
background-size: cover; /* <------ */
background-repeat: no-repeat;
background-position: center center;
height: 100vh;
color: var(--textDark);
}
.field:not(:last-child) {
margin-bottom: 1rem;
}
.register {
margin-top: 10rem;
background: white;
border-radius: 10px;
}
.left,
.right {
padding: 4.5rem;
}
.left {
border-right: 5px solid var(--background);
}
.left .title {
font-weight: 800;
letter-spacing: -2px;
}
.left .colored {
color: var(--brandColor);
font-weight: 500;
margin-top: 1rem !important;
letter-spacing: -1px;
}
.left p {
color: var(--textLight);
font-size: 1.15rem;
}
.right .title {
font-weight: 800;
letter-spacing: -1px;
}
.right .description {
margin-top: 1rem;
margin-bottom: 1rem !important;
color: var(--textLight);
font-size: 1.15rem;
}
.right small {
color: var(--textLight);
}
input {
font-size: 1rem;
}
input:focus {
border-color: var(--brandColor) !important;
box-shadow: 0 0 0 1px var(--brandColor) !important;
}
.fab,
.fas {
color: var(--textLight);
margin-right: 1rem;
}
</style>
</html>