This repository has been archived on 2025-03-01. You can view files and clone it, but cannot push or open issues or pull requests.
trantor/templates/login.html
Las Zenow 6a3da59c75 Port the web to bootstrap5
So it is responsive in phones.
2021-05-01 11:08:35 +00:00

87 lines
3.1 KiB
HTML

{{template "header.html" .S}}
<script>
$(document).ready(function () {
$("#passCheck").keyup(checkPasswordMatch);
});
function checkPasswordMatch() {
var password = $("#pass").val();
var confirmPassword = $("#confirmPass").val();
if (password != confirmPassword) {
$("#passCheck").removeClass("success");
$("#passCheck").addClass("error");
$("#passCheckHelp").html("Passwords don't match!");
} else {
$("#passCheck").removeClass("error");
$("#passCheck").addClass("success");
$("#passCheckHelp").html("");
}
}
</script>
<div class="row justify-content-center">
<div class="col-sm-4">
<h3>Log In</h3>
<form id="login" method="POST" action="/login/" enctype="application/x-www-form-urlencoded">
<div class="input-group mb-3">
<span class="input-group-text" id="user">
<svg class="bi" width="1.5em" height="1.5em" fill="currentColor">
<use xlink:href="/img/bootstrap-icons.svg#person-fill"/>
</svg>
</span>
<input type="text" class="form-control" placeholder="Username" name="user" autofocus="autofocus" aria-label="Username" aria-describedby="user">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="pass">
<svg class="bi" width="1.5em" height="1.5em" fill="currentColor">
<use xlink:href="/img/bootstrap-icons.svg#key-fill"/>
</svg>
</span>
<input type="password" class="form-control" placeholder="Password" name="pass" aria-label="Password" aria-describedby="pass">
</div>
<input class="btn btn-primary" type="submit" name="submit" value="Log In"/>
</form>
</div>
<div class="col-sm-2">
<br />
<br />
<h3 class="centered">Or</h3>
<br />
<br />
</div>
<div class="col-sm-4">
<h3>Create an Account</h3>
<form id="login" method="POST" action="/create_user/" enctype="application/x-www-form-urlencoded">
<div class="input-group mb-3">
<span class="input-group-text" id="user">
<svg class="bi" width="1.5em" height="1.5em" fill="currentColor">
<use xlink:href="/img/bootstrap-icons.svg#person-fill"/>
</svg>
</span>
<input type="text" class="form-control" placeholder="Username" name="user" autofocus="autofocus" aria-label="Username" aria-describedby="user">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="pass">
<svg class="bi" width="1.5em" height="1.5em" fill="currentColor">
<use xlink:href="/img/bootstrap-icons.svg#key-fill"/>
</svg>
</span>
<input type="password" class="form-control" placeholder="Password" name="pass" aria-label="Password" aria-describedby="pass" id="pass">
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="pass">
<svg class="bi" width="1.5em" height="1.5em" fill="currentColor">
<use xlink:href="/img/bootstrap-icons.svg#key-fill"/>
</svg>
</span>
<input type="password" class="form-control" placeholder="Confirm password" name="confirmPass" aria-label="Password" aria-describedby="confirmPass" id="confirmPass">
</div>
<input class="btn btn-primary" type="submit" name="submit" value="Create" />
</form>
</div>
</div>
{{template "footer.html" .S}}