69 lines
3.9 KiB
Twig
69 lines
3.9 KiB
Twig
<!DOCTYPE html>
|
|
<html lang="{{ admin_lang|default('nl') }}">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{{ ta.login_title|default('CodePress Admin - Login') }}</title>
|
|
<link rel="stylesheet" href="/admin/assets/css/bootstrap.min.css">
|
|
<link rel="stylesheet" href="/admin/assets/css/bootstrap-icons.css">
|
|
<link rel="stylesheet" href="/admin/assets/css/style.css">
|
|
<style>
|
|
body { background-color: #f5f6fa; }
|
|
.login-card { max-width: 400px; margin: 10vh auto; }
|
|
.login-header { background-color: #0a369d; color: #fff; padding: 2rem; text-align: center; border-radius: 0.5rem 0.5rem 0 0; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<div class="login-card">
|
|
<div class="login-header">
|
|
<h4><i class="bi bi-shield-lock"></i> {{ ta.admin_title|default('CodePress Admin') }}</h4>
|
|
</div>
|
|
<div class="card border-0 shadow-sm" style="border-radius: 0 0 0.5rem 0.5rem;">
|
|
<div class="card-body p-4">
|
|
{% if error %}
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
{{ error }}
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert"></button>
|
|
</div>
|
|
{% endif %}
|
|
{% if generated_password %}
|
|
<div class="alert alert-warning" role="alert">
|
|
<h6 class="alert-heading"><i class="bi bi-exclamation-triangle-fill"></i> Eerste installatie</h6>
|
|
<p class="mb-2">Er is nog geen <code>admin.json</code> aanwezig. Een nieuw wachtwoord is gegenereerd voor de gebruiker <strong>admin</strong>:</p>
|
|
<p class="mb-2"><code class="fs-5">{{ generated_password }}</code></p>
|
|
<p class="mb-0 small">Log in met dit wachtwoord en wijzig het direct na login. Sla het veilig op; het wordt niet opnieuw getoond.</p>
|
|
</div>
|
|
{% endif %}
|
|
<form method="POST" action="/admin/login">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
|
<div class="mb-3">
|
|
<label for="username" class="form-label">{{ ta.username_label|default('Gebruikersnaam') }}</label>
|
|
<div class="input-group">
|
|
<span class="input-group-text"><i class="bi bi-person"></i></span>
|
|
<input type="text" class="form-control" id="username" name="username" required autofocus>
|
|
</div>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label for="password" class="form-label">{{ ta.password_label|default('Wachtwoord') }}</label>
|
|
<div class="input-group">
|
|
<span class="input-group-text"><i class="bi bi-key"></i></span>
|
|
<input type="password" class="form-control" id="password" name="password" required>
|
|
</div>
|
|
</div>
|
|
<div class="d-grid">
|
|
<button type="submit" class="btn btn-primary">
|
|
<i class="bi bi-box-arrow-in-right"></i> {{ ta.login_btn|default('Inloggen') }}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<p class="text-center text-muted mt-3 small">
|
|
<a href="/" class="text-decoration-none"><i class="bi bi-arrow-left"></i> {{ ta.back_to_website|default('Terug naar website') }}</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<script src="/admin/assets/js/bootstrap.bundle.min.js"></script>
|
|
</body>
|
|
</html> |