<!DOCTYPE html>
<html lang="{{ self.locale() }}" data-theme="light" data-lat-mode="{{ look.mode }}" data-lat-skin="{{ skin.code }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ self.t("Sign in") }} - {{ brand }}</title>
{% if let Some(icon) = look.favicon_url %}<link rel="icon" href="{{ icon }}">{% else %}<link rel="icon" type="image/svg+xml" href="{{ self.asset("mark.svg") }}">{% endif %}
<link rel="stylesheet" href="{{ self.asset("laterite.css") }}">
{% if let Some(url) = skin.stylesheet %}<link rel="stylesheet" href="{{ url }}">{% endif %}
{% if !look.css.is_empty() %}<style id="lat-brand">{{ look.css|safe }}</style>{% endif %}
{# Colour mode: blocking on purpose, so a dark-mode operator sees no white flash. #}
<script src="{{ self.asset("theme-boot.js") }}"></script>
<script defer src="{{ self.asset("laterite.js") }}"></script>
</head>
<body>
{% if let Some(message) = notice %}
{# The admin's own toast. The session that would have queued it is the
thing that ended, so it comes from the redirect instead, and stays until
dismissed. #}
<div class="lat-flashes" role="status" aria-live="polite">
<div class="lat-flash is-info" data-lat-widget="flash" data-lat-persist>
<span class="lat-flash__text">{{ message }}</span>
<button type="button" class="lat-flash__close" aria-label='{{ self.t("Dismiss") }}' data-lat-dismiss>×</button>
</div>
</div>
{% endif %}
<div class="lat-login{% if !look.login_hero %} lat-login--plain{% endif %}">
<div class="lat-login__form">
<div class="lat-login__inner">
<div class="lat-login__brand">
{% if let Some(logo) = look.logo_url %}<img src="{{ logo }}" alt="">{% else %}<img src="{{ self.asset("mark.png") }}" alt="">{% endif %}
<h1>{{ brand }}</h1>
</div>
<h2 class="lat-login__title">{{ self.t("Admin panel") }}</h2>
<p class="lat-login__lead">{% if let Some(prompt) = look.login_prompt %}{{ prompt }}{% else %}{{ self.t("Sign in to continue.") }}{% endif %}</p>
{% if let Some(message) = error %}<div class="lat-alert">{{ message }}</div>{% endif %}
<form method="post" action="{{ base }}/login">
<div class="lat-field">
<label class="lat-field__label" for="username">{{ self.t("Username") }}</label>
<input class="lat-input" type="text" id="username" name="username" autocomplete="username" autofocus required>
</div>
<div class="lat-field">
<label class="lat-field__label" for="password">{{ self.t("Password") }}</label>
<div class="lat-input-group lat-reveal"><input class="lat-input" type="password" id="password" name="password" autocomplete="current-password" required><button type="button" class="lat-input-group__btn lat-reveal__btn" data-lat-widget="reveal" aria-label='{{ self.t("Show password") }}' aria-pressed="false" hidden></button></div>
</div>
<label class="lat-check"><input type="checkbox" name="remember" value="1"> {{ self.t("Stay signed in") }}</label>
<button class="lat-btn lat-btn--primary lat-btn--lg lat-btn--block" type="submit" style="margin-top:20px">{{ self.t("Sign in") }}</button>
</form>
<div class="lat-login__forgot">{{ self.t("Forgot your password? Ask an administrator to reset it.") }}</div>
</div>
<a class="lat-poweredby" href="https://laterite.rs" target="_blank" rel="noopener noreferrer"><img src="{{ self.asset("mark.png") }}" alt="" width="14" height="14">{{ self.t("Powered by Laterite") }}</a>
</div>
<div class="lat-login__hero{% if look.login_background_url.is_some() %} lat-login__hero--image{% endif %}" aria-hidden="true"{% if let Some(bg) = look.login_background_url %} style="background-image:url('{{ bg }}')"{% endif %}>
<div class="lat-hero-blob lat-hero-blob--1"></div>
<div class="lat-hero-blob lat-hero-blob--2"></div>
<div class="lat-hero-blob lat-hero-blob--3"></div>
<div class="lat-hero__caption">
<div class="lat-hero__eyebrow">{{ self.t("Open source Rust web framework") }}</div>
<div class="lat-hero__tag">{% if let Some(tag) = look.login_tagline %}{{ tag }}{% else %}{{ self.t("Build sites. Ship solid.") }}{% endif %}</div>
</div>
</div>
</div>
</body>
</html>