parcel/templates/user/signin.html
Blake Rain cd8efa869f
Some checks failed
Check / check (push) Failing after 59s
fix: tidy up layout on smaller screen sizes
2024-08-10 11:37:36 +01:00

38 lines
1.3 KiB
HTML

{% extends "base.html" %}
{% block title %}Sign In{% endblock %}
{% block content %}
<div class="grow container mx-auto flex justify-center items-center p-4 lg:p-0">
<div class="panel thin">
<h1 class="heading">
Sign in to your account
</h1>
{% if error %}
<div id="error" class="text-danger">
{{ error }}
</div>
{% endif %}
<form method="POST" action="/user/signin" class="form" id="signin-form">
<input type="hidden" name="token" value="{{ token }}">
<label for="username">Your username</label>
<input class="field" type="text" name="username" id="username" placeholder="Username" required>
<label for="password">Your password</label>
<input class="field" type="password" name="password" id="password" placeholder="••••••••" required>
<div class="buttons end">
<button type="submit" class="button">Sign in</button>
</div>
</form>
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
document.querySelector("form#signin-form").addEventListener("submit", (event) => {
// Disable the submit button so we don't try multiple submissions.
document.querySelector("button[type=submit]").disabled = true;
});
</script>
{% endblock %}