37 lines
1.5 KiB
HTML
37 lines
1.5 KiB
HTML
|
|
{% extends "base.html" %}
|
||
|
|
{% block title %}RSS → ntfy{% endblock %}
|
||
|
|
{% block body %}
|
||
|
|
<div class="login-wrap">
|
||
|
|
<form class="login-card" method="post" action="/login">
|
||
|
|
<div class="login-logo">📡</div>
|
||
|
|
<h1>RSS → ntfy</h1>
|
||
|
|
<p class="muted" data-i18n="login.subtitle">Войдите, чтобы продолжить</p>
|
||
|
|
{% if error %}<div class="alert error" data-i18n="login.error">{{ error }}</div>{% endif %}
|
||
|
|
<label><span data-i18n="login.user">Логин</span>
|
||
|
|
<input type="text" name="username" autocomplete="username" required autofocus>
|
||
|
|
</label>
|
||
|
|
<label><span data-i18n="login.pass">Пароль</span>
|
||
|
|
<input type="password" name="password" autocomplete="current-password" required>
|
||
|
|
</label>
|
||
|
|
<button type="submit" class="btn primary block" data-i18n="login.submit">Войти</button>
|
||
|
|
<div class="login-controls">
|
||
|
|
<button type="button" class="icon-btn" id="theme-btn" data-i18n-title="theme.toggle">🌓</button>
|
||
|
|
<select id="lang-select" class="lang-select">
|
||
|
|
<option value="ru">RU</option>
|
||
|
|
<option value="en">EN</option>
|
||
|
|
</select>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
{% endblock %}
|
||
|
|
{% block scripts %}
|
||
|
|
<script>
|
||
|
|
applyI18n();
|
||
|
|
const ls = document.getElementById("lang-select");
|
||
|
|
ls.value = getLang();
|
||
|
|
ls.onchange = () => { setLang(ls.value); applyI18n(); };
|
||
|
|
document.getElementById("theme-btn").onclick = () =>
|
||
|
|
setTheme(getTheme() === "dark" ? "light" : "dark");
|
||
|
|
</script>
|
||
|
|
{% endblock %}
|