Files
VacatureRadar/templates/registration/login.html
T
2026-07-24 22:46:37 +02:00

150 lines
6.1 KiB
HTML

{% load static %}<!doctype html>
<html lang="nl">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="light">
<meta name="theme-color" content="#fbf8ff">
<title>Inloggen · VacatureRadar</title>
<link rel="icon" href="{% static 'favicon.svg' %}" type="image/svg+xml">
<link rel="stylesheet" href="{% static 'css/auth.css' %}?v={{ app_version }}">
</head>
<body class="auth-page">
{% include "components/icon_sprite.html" %}
<main class="auth-shell">
<div class="auth-brand">
<img class="auth-brand-logo" src="{% static 'img/vacatureradar-logo.svg' %}" alt="VacatureRadar logo" width="64" height="64">
<p class="auth-brand-name">VacatureRadar</p>
<p class="auth-brand-tagline">Intelligence cockpit</p>
</div>
<div class="auth-card">
<h1>Inloggen</h1>
{% if messages %}
{% for message in messages %}
<div class="auth-alert {% if message.tags == 'error' %}is-error{% elif message.tags == 'success' %}is-success{% else %}is-info{% endif %}" role="alert">
<svg class="icon" aria-hidden="true"><use href="{% if message.tags == 'error' %}#icon-alert{% else %}#icon-check{% endif %}"></use></svg>
<span>{{ message }}</span>
</div>
{% endfor %}
{% endif %}
{% if form.errors and not messages %}
<div class="auth-alert is-error" role="alert">
<svg class="icon" aria-hidden="true"><use href="#icon-alert"></use></svg>
<span>E-mailadres of wachtwoord klopt niet. Probeer het opnieuw.</span>
</div>
{% endif %}
<form method="post" class="auth-form" novalidate>
{% csrf_token %}
<div class="field">
<label for="id_username">E-mailadres</label>
<input class="auth-input" id="id_username" name="username" type="email"
autocomplete="username" autocapitalize="none" spellcheck="false"
placeholder="naam@organisatie.nl" required
{% if form.errors %}aria-invalid="true"{% endif %}
value="{{ form.username.value|default:'' }}">
</div>
<div class="field">
<div class="field-label-row">
<label for="id_password">Wachtwoord</label>
<a class="field-link" href="{% url 'password_reset' %}">Wachtwoord vergeten?</a>
</div>
<div class="input-wrap">
<input class="auth-input" id="id_password" name="password" type="password"
autocomplete="current-password" placeholder="••••••••" required
{% if form.errors %}aria-invalid="true"{% endif %}>
<button class="pw-toggle" type="button" data-pw-toggle aria-label="Wachtwoord tonen">
<svg class="icon" aria-hidden="true" data-eye><use href="#icon-eye"></use></svg>
<svg class="icon" aria-hidden="true" data-eye-off hidden><use href="#icon-eye-off"></use></svg>
</button>
</div>
</div>
{% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
<button class="btn btn-primary" type="submit" data-submit>
<span data-label>Inloggen</span>
<svg class="icon" aria-hidden="true" data-arrow><use href="#icon-arrow"></use></svg>
</button>
{% if entra_enabled %}
<div class="auth-separator"><span>Of ga door met</span></div>
{% endif %}
</form>
{% if entra_enabled %}
<form method="post" action="{% url 'entra-login' %}">
{% csrf_token %}
{% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
<button class="btn btn-sso" type="submit">
<svg viewBox="0 0 23 23" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M1 1h10v10H1z" fill="#f35325"></path>
<path d="M12 1h10v10H12z" fill="#81bc06"></path>
<path d="M1 12h10v10H1z" fill="#05a6f0"></path>
<path d="M12 12h10v10H12z" fill="#ffba08"></path>
</svg>
Inloggen met Entra ID
</button>
</form>
{% endif %}
{% if demo_enabled %}
<div class="auth-secondary">
<p>Nog geen account?</p>
<form method="post" action="{% url 'demo-login' %}" class="btn-ghost inline-form">
{% csrf_token %}
{% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
<button class="btn-ghost" type="submit">
<svg class="icon" aria-hidden="true"><use href="#icon-eye"></use></svg>
Bekijk demo
</button>
</form>
</div>
{% endif %}
</div>
<footer class="auth-footer">
<div class="auth-footer-links">
<a href="{% url 'password_reset' %}">Wachtwoord vergeten</a>
</div>
<div class="auth-badge">
<svg class="icon" aria-hidden="true"><use href="#icon-shield"></use></svg>
<span>Local-first secure node</span>
</div>
</footer>
</main>
<script>
(function () {
var toggle = document.querySelector('[data-pw-toggle]');
if (toggle) {
var pw = document.getElementById('id_password');
var eye = toggle.querySelector('[data-eye]');
var eyeOff = toggle.querySelector('[data-eye-off]');
toggle.addEventListener('click', function () {
var show = pw.type === 'password';
pw.type = show ? 'text' : 'password';
toggle.setAttribute('aria-label', show ? 'Wachtwoord verbergen' : 'Wachtwoord tonen');
if (eye && eyeOff) { eye.hidden = show; eyeOff.hidden = !show; }
});
}
var form = document.querySelector('form.auth-form');
if (form) {
form.addEventListener('submit', function () {
var btn = form.querySelector('[data-submit]');
if (!btn || btn.dataset.busy) return;
if (typeof form.checkValidity === 'function' && !form.checkValidity()) return;
btn.dataset.busy = '1';
var label = btn.querySelector('[data-label]');
if (label) label.textContent = 'Bezig met inloggen…';
});
}
})();
</script>
</body>
</html>