218 lines
6.8 KiB
HTML
218 lines
6.8 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">Login</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="email" placeholder="Email" id="EmailID">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field">
|
|
<div class="control">
|
|
<input class="input is-medium" type="password" placeholder="Password" id="Password">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="field">
|
|
<div class="control">
|
|
<p id="EmailIDError"></p>
|
|
<p id="PasswordError"></p>
|
|
<p id="ResponseText"></p>
|
|
</div>
|
|
</div>
|
|
|
|
<button class="button is-block is-success is-fullwidth is-medium" onclick="LoginSubmit();return false;">Login</button>
|
|
<br>
|
|
<a href="/register" >Create a new account</a>
|
|
<br>
|
|
<a href="/forgotpassword">Forgot password ?</a>
|
|
<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>  
|
|
</div>
|
|
</div>
|
|
<div class="level-right">
|
|
<small class="level-item" style="color: var(--textLight)">
|
|
© Super Cool Website. All Rights Reserved.
|
|
</small>
|
|
</div>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</body>
|
|
<script>
|
|
// The function is called on OnClick action
|
|
function LoginSubmit() {
|
|
// Getting element information of all the fields
|
|
// required for registration
|
|
var EmailID = document.getElementById("EmailID").value
|
|
var Password = document.getElementById("Password").value
|
|
|
|
|
|
// 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 != "") {
|
|
document.getElementById("PasswordError").innerHTML = ""
|
|
}
|
|
// When the password matches then clear the field
|
|
if (Password == "") {
|
|
document.getElementById("PasswordError").innerHTML = "Enter password"
|
|
return
|
|
}
|
|
|
|
// binding data to uri encoded string
|
|
uriencoded = "EmailID=" + EmailID + "&Password=" + Password
|
|
|
|
// Submitting the registration information
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.open("POST", "/login", true);
|
|
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
xhr.send(uriencoded);
|
|
|
|
xhr.onload = function () {
|
|
console.log(xhr.responseText)
|
|
// Outputting response text
|
|
document.getElementById("ResponseText").innerHTML = xhr.responseText
|
|
// Create Sessions browser
|
|
// if response is success then redirect
|
|
if (xhr.responseText == "Success!") {
|
|
window.location.replace("/");
|
|
}
|
|
}
|
|
}
|
|
</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> |