Illustrations/web/templates/login.html

95 lines
2.7 KiB
HTML

{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Sign in · Illustrations</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="{% static 'app.css' %}">
</head>
<body class="login-page">
<div class="login-hero">
<div class="login-card">
<h1 class="login-title">Sign in</h1>
<!-- Preferred sign-in -->
<div class="login-sso">
<a class="login-sso-button" href="{% url 'oidc_authentication_init' %}">
Sign in with your account
</a>
</div>
<!-- Toggle for legacy login -->
<div class="login-divider">
<span>
<a href="#"
onclick="event.preventDefault(); document.getElementById('alt-login').toggleAttribute('hidden');">
Use a different sign-in method
</a>
</span>
</div>
<!-- Legacy login (hidden by default) -->
<div id="alt-login" hidden>
{% if form.non_field_errors %}
<div class="login-alert">
{% for e in form.non_field_errors %}
{{ e }}{% if not forloop.last %}<br>{% endif %}
{% endfor %}
</div>
{% endif %}
<form method="post" action="{% url 'login' %}" novalidate>
{% csrf_token %}
{% if next %}
<input type="hidden" name="next" value="{{ next }}">
{% endif %}
<label for="id_username" class="login-label">Username</label>
<input id="id_username"
name="username"
type="text"
autocomplete="username"
value="{{ form.username.value|default:'' }}"
class="login-input">
{% if form.username.errors %}
<div class="login-field-error">
{% for e in form.username.errors %}
{{ e }}{% if not forloop.last %}<br>{% endif %}
{% endfor %}
</div>
{% endif %}
<label for="id_password" class="login-label">Password</label>
<input id="id_password"
name="password"
type="password"
autocomplete="current-password"
class="login-input">
{% if form.password.errors %}
<div class="login-field-error">
{% for e in form.password.errors %}
{{ e }}{% if not forloop.last %}<br>{% endif %}
{% endfor %}
</div>
{% endif %}
<button class="btn btn-primary btn-lg login-submit" type="submit">
Sign in
</button>
</form>
</div>
</div>
</div>
</body>
</html>