new folder structure / add de translation

This commit is contained in:
nocci 2025-05-03 11:37:42 +02:00
parent 8aba6f5129
commit 4a0a5bac3f
35 changed files with 696 additions and 1124 deletions

View file

@ -2,40 +2,44 @@
{% block content %}
<div class="card p-4 shadow-sm">
<h2 class="mb-4">{{ _('Add New Game') }}</h2>
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<form method="POST" aria-label="{{ _('Add New Game') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label">{{ _('Name') }} *</label>
<input type="text" name="name" class="form-control" required>
<label for="game_name" class="form-label">{{ _('Name') }} <span aria-hidden="true" class="text-danger">*</span></label>
<input type="text" id="game_name" name="name" class="form-control" required aria-required="true">
</div>
<div class="col-md-6">
<label class="form-label">{{ _('Game Key') }} *</label>
<input type="text" name="steam_key" class="form-control" required>
<label for="game_key" class="form-label">{{ _('Game Key') }} <span aria-hidden="true" class="text-danger">*</span></label>
<input type="text" id="game_key" name="steam_key" class="form-control" required aria-required="true">
</div>
<div class="col-md-4">
<label class="form-label">{{ _('Status') }} *</label>
<select name="status" class="form-select" required>
<label for="game_status" class="form-label">{{ _('Status') }} <span aria-hidden="true" class="text-danger">*</span></label>
<select id="game_status" name="status" class="form-select" required aria-required="true">
<option value="nicht eingelöst">{{ _('Not redeemed') }}</option>
<option value="verschenkt">{{ _('Gifted') }}</option>
<option value="eingelöst">{{ _('Redeemed') }}</option>
</select>
</div>
<div class="col-md-4">
<label class="form-label">{{ _('Redeem by') }}</label>
<input type="date" name="redeem_date" class="form-control">
<label for="game_redeem_date" class="form-label">{{ _('Redeem by') }}</label>
<input type="date" id="game_redeem_date" name="redeem_date" class="form-control">
</div>
<div class="col-md-4">
<label class="form-label">{{ _('Recipient') }}</label>
<input type="text" name="recipient" class="form-control">
<label for="game_recipient" class="form-label">{{ _('Recipient') }}</label>
<input type="text" id="game_recipient" name="recipient" class="form-control">
</div>
<div class="col-md-6">
<label for="game_appid" class="form-label">{{ _('Steam AppID (optional)') }}</label>
<input type="text" id="game_appid" name="steam_appid" class="form-control">
</div>
<div class="col-md-6">
<label for="game_url" class="form-label">{{ _('Shop URL') }}</label>
<input type="url" id="game_url" name="url" class="form-control">
</div>
<div class="col-12">
<label class="form-label">{{ _('Shop URL') }}</label>
<input type="url" name="url" class="form-control">
</div>
<div class="col-12">
<label class="form-label">{{ _('Notes') }}</label>
<textarea name="notes" class="form-control" rows="3"></textarea>
<label for="game_notes" class="form-label">{{ _('Notes') }}</label>
<textarea id="game_notes" name="notes" class="form-control" rows="3"></textarea>
</div>
<div class="col-12">
<button type="submit" class="btn btn-success">{{ _('Save') }}</button>

View file

@ -1,51 +1,81 @@
<!DOCTYPE html>
<html lang="{{ get_locale() }}" data-bs-theme="{{ theme }}">
<html lang="{{ session.get('lang', 'en') }}" data-bs-theme="{{ theme }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="csrf-token" content="{{ csrf_token() }}">
<meta name="description" content="Manage your Steam and GOG keys efficiently. Track redemption dates, share games, and export lists.">
<meta name="theme-color" content="#212529">
<link rel="manifest" href="{{ url_for('static', filename='manifest.json') }}">
<title>{{ _('Game Key Manager') }}</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Preload Bootstrap CSS for better LCP -->
<link rel="preload" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"></noscript>
<!-- Eigene Styles -->
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
{# LCP-Optimierung: Preload für das erste Cover-Bild, falls vorhanden #}
{% if games and games[0].steam_appid %}
<link rel="preload"
as="image"
href="https://cdn.cloudflare.steamstatic.com/steam/apps/{{ games[0].steam_appid }}/header.jpg"
imagesrcset="https://cdn.cloudflare.steamstatic.com/steam/apps/{{ games[0].steam_appid }}/header.jpg 368w"
fetchpriority="high"
type="image/jpeg">
{% endif %}
</head>
<script>
(function() {
try {
var theme = localStorage.getItem('theme');
if (!theme) {
// Systempräferenz als Fallback
theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
}
document.documentElement.setAttribute('data-bs-theme', theme);
} catch(e) {}
})();
</script>
<body>
<nav class="navbar navbar-expand-lg bg-body-tertiary">
<div class="container">
<a class="navbar-brand d-flex align-items-center gap-2" href="/">
<img src="{{ url_for('static', filename='logo_small.png') }}" alt="Logo" width="150" height="116" style="object-fit:contain; border-radius:8px;">
<span>Game Key Manager</span>
<img src="{{ url_for('static', filename='logo_small.webp') }}" alt="Logo" width="150" height="116" style="object-fit:contain; border-radius:8px;">
<span>Game Key Manager</span>
</a>
<div class="d-flex align-items-center gap-3">
<form class="d-flex" action="{{ url_for('index') }}" method="GET">
<form class="d-flex" action="{{ url_for('index') }}" method="GET" role="search" aria-label="{{ _('Search games') }}">
<label for="searchInput" class="visually-hidden">{{ _('Search') }}</label>
<input class="form-control me-2"
type="search"
name="q"
id="searchInput"
placeholder="{{ _('Search') }}"
value="{{ search_query }}">
<button class="btn btn-outline-success" type="submit">🔍</button>
<button class="btn btn-outline-success" type="submit" aria-label="{{ _('Search') }}">🔍</button>
</form>
<div class="form-check form-switch">
<input class="form-check-input"
type="checkbox"
<input class="form-check-input"
type="checkbox"
id="darkModeSwitch" {% if theme == 'dark' %}checked{% endif %}>
<label class="form-check-label" for="darkModeSwitch">{{ _('Dark Mode') }}</label>
</div>
<div class="dropdown ms-3">
<div hidden id="locale-debug" data-locale="{{ session.get('lang', 'en') }}"></div>
<button class="btn btn-outline-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
{% if get_locale() == 'de' %} Deutsch {% elif get_locale() == 'en' %} English {% else %} Sprache {% endif %}
{% if session.get('lang', 'en') == 'de' %} Deutsch {% elif session.get('lang', 'en') == 'en' %} English {% else %} Sprache {% endif %}
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item {% if get_locale() == 'de' %}active{% endif %}" href="{{ url_for('set_lang', lang='de') }}">Deutsch</a></li>
<li><a class="dropdown-item {% if get_locale() == 'en' %}active{% endif %}" href="{{ url_for('set_lang', lang='en') }}">English</a></li>
<li><a class="dropdown-item {% if session.get('lang', 'en') == 'de' %}active{% endif %}" href="{{ url_for('set_lang', lang='de') }}">Deutsch</a></li>
<li><a class="dropdown-item {% if session.get('lang', 'en') == 'en' %}active{% endif %}" href="{{ url_for('set_lang', lang='en') }}">English</a></li>
</ul>
</div>
{% if current_user.is_authenticated %}
<li class="nav-item">
<a class="nav-link" href="{{ url_for('change_password') }}">🔒 {{ _('Passwort') }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('logout') }}">🚪 {{ _('Logout') }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('change_password') }}">🔒 {{ _('Password') }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url_for('logout') }}">🚪 {{ _('Logout') }}</a>
</li>
{% endif %}
</div>
</div>
@ -65,16 +95,44 @@
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<script>
// Service Worker Registration for PWA
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('{{ url_for("static", filename="serviceworker.js") }}', {scope: '/'})
.then(registration => {
console.log('ServiceWorker registered:', registration.scope);
})
.catch(error => {
console.log('ServiceWorker registration failed:', error);
});
});
}
// Dark Mode Switch
document.addEventListener('DOMContentLoaded', function() {
const toggle = document.getElementById('darkModeSwitch')
const html = document.documentElement
toggle.addEventListener('change', function() {
const theme = this.checked ? 'dark' : 'light'
fetch('/set-theme/' + theme)
.then(() => html.setAttribute('data-bs-theme', theme))
})
})
const toggle = document.getElementById('darkModeSwitch');
const html = document.documentElement;
if (toggle) {
toggle.checked = (html.getAttribute('data-bs-theme') === 'dark')
toggle.addEventListener('change', function() {
const theme = this.checked ? 'dark' : 'light';
document.cookie = "theme=" + theme + ";path=/;max-age=31536000";
html.setAttribute('data-bs-theme', theme);
fetch('/set-theme/' + theme);
});
}
// Set theme on page load
function getThemeCookie() {
const cookies = document.cookie.split(';');
for (let cookie of cookies) {
const [name, value] = cookie.trim().split('=');
if (name === 'theme') return value;
}
return null;
}
const savedTheme = getThemeCookie() || (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
document.documentElement.setAttribute('data-bs-theme', savedTheme);
});
</script>
{% include "footer.html" %}
</body>

View file

@ -1,22 +1,28 @@
{% extends "base.html" %}
{% block content %}
<div class="card p-4 shadow-sm">
<h2 class="mb-4">{{ _('Change Password') }}</h2>
<form method="POST">
<div class="row justify-content-center">
<div class="col-md-6 col-lg-5">
<div class="card p-4 shadow-sm">
<h2 class="mb-4">{{ _('Change Password') }}</h2>
<form method="POST" aria-label="{{ _('Change password form') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="mb-3">
<label class="form-label">{{ _('Current Password') }}</label>
<input type="password" name="current_password" class="form-control" required>
<label for="current_password" class="form-label">{{ _('Current Password') }} <span aria-hidden="true" class="text-danger">*</span></label>
<input type="password" id="current_password" name="current_password" class="form-control" required autocomplete="current-password" aria-required="true">
</div>
<div class="mb-3">
<label class="form-label">{{ _('New Password') }}</label>
<input type="password" name="new_password" class="form-control" required>
<label for="new_password" class="form-label">{{ _('New Password') }} <span aria-hidden="true" class="text-danger">*</span></label>
<input type="password" id="new_password" name="new_password" class="form-control" required autocomplete="new-password" aria-required="true">
</div>
<div class="mb-3">
<label class="form-label">{{ _('Confirm New Password') }}</label>
<input type="password" name="confirm_password" class="form-control" required>
<label for="confirm_password" class="form-label">{{ _('Confirm New Password') }} <span aria-hidden="true" class="text-danger">*</span></label>
<input type="password" id="confirm_password" name="confirm_password" class="form-control" required autocomplete="new-password" aria-required="true">
</div>
<button type="submit" class="btn btn-primary">{{ _('Change Password') }}</button>
</form>
<a href="{{ url_for('index') }}" class="btn btn-outline-secondary ms-2">{{ _('Cancel') }}</a>
</form>
</div>
</div>
</div>
{% endblock %}

View file

@ -1,66 +1,67 @@
{% extends "base.html" %}
{% block content %}
<div class="card p-4 shadow-sm">
<h2 class="mb-4">{{ _('Edit Game') }}</h2>
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="row g-3">
<div class="col-md-6">
<label class="form-label">{{ _('Name') }} *</label>
<input type="text" name="name" class="form-control" value="{{ game.name }}" required>
</div>
<div class="col-md-6">
<label class="form-label">{{ _('Game Key') }} *</label>
<input type="text" name="steam_key" class="form-control" value="{{ game.steam_key }}" required>
</div>
<div class="col-md-6">
<label class="form-label">{{ _('Steam AppID (optional)') }}</label>
<input type="text" name="steam_appid" class="form-control" value="{{ game.steam_appid or '' }}">
</div>
<div class="col-md-4">
<label class="form-label">{{ _('Status') }} *</label>
<select name="status" class="form-select" required>
<option value="nicht eingelöst" {% if game.status == 'nicht eingelöst' %}selected{% endif %}>{{ _('Not redeemed') }}</option>
<option value="verschenkt" {% if game.status == 'verschenkt' %}selected{% endif %}>{{ _('Gifted') }}</option>
<option value="eingelöst" {% if game.status == 'eingelöst' %}selected{% endif %}>{{ _('Redeemed') }}</option>
</select>
</div>
<div class="col-md-4">
<label class="form-label">{{ _('Redeem by') }}</label>
<input type="date" name="redeem_date" class="form-control" value="{{ redeem_date }}">
</div>
<div class="col-md-4">
<label class="form-label">{{ _('Recipient') }}</label>
<input type="text" name="recipient" class="form-control" value="{{ game.recipient }}">
</div>
<div class="col-12">
<label class="form-label">{{ _('Shop URL') }}</label>
<input type="url" name="url" class="form-control" value="{{ game.url }}">
</div>
<div class="col-12">
<label class="form-label">{{ _('Notes') }}</label>
<textarea name="notes" class="form-control" rows="3">{{ game.notes }}</textarea>
</div>
<div class="col-12">
{% if redeem_url and active_redeem %}
<div class="mb-3">
<label class="form-label">{{ _('Active Redeem Link') }}</label>
<input type="text"
class="form-control"
value="{{ redeem_url }}"
readonly
onclick="this.select()">
<small class="text-muted">
{{ _('Expires at') }}: {{ active_redeem.expires.strftime('%d.%m.%Y %H:%M') }}
</small>
</div>
{% endif %}
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary">{{ _('Save') }}</button>
<a href="{{ url_for('index') }}" class="btn btn-outline-secondary">{{ _('Cancel') }}</a>
</div>
<h2 class="mb-4">{{ _('Edit Game') }}</h2>
<form method="POST" aria-label="{{ _('Edit Game') }}">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="row g-3">
<div class="col-md-6">
<label for="game_name" class="form-label">{{ _('Name') }} <span aria-hidden="true" class="text-danger">*</span></label>
<input type="text" id="game_name" name="name" class="form-control" value="{{ game.name }}" required aria-required="true">
</div>
<div class="col-md-6">
<label for="game_key" class="form-label">{{ _('Game Key') }} <span aria-hidden="true" class="text-danger">*</span></label>
<input type="text" id="game_key" name="steam_key" class="form-control" value="{{ game.steam_key }}" required aria-required="true">
</div>
<div class="col-md-6">
<label for="game_appid" class="form-label">{{ _('Steam AppID (optional)') }}</label>
<input type="text" id="game_appid" name="steam_appid" class="form-control" value="{{ game.steam_appid or '' }}">
</div>
<div class="col-md-4">
<label for="game_status" class="form-label">{{ _('Status') }} <span aria-hidden="true" class="text-danger">*</span></label>
<select id="game_status" name="status" class="form-select" required aria-required="true">
<option value="nicht eingelöst" {% if game.status == 'nicht eingelöst' %}selected{% endif %}>{{ _('Not redeemed') }}</option>
<option value="verschenkt" {% if game.status == 'verschenkt' %}selected{% endif %}>{{ _('Gifted') }}</option>
<option value="eingelöst" {% if game.status == 'eingelöst' %}selected{% endif %}>{{ _('Redeemed') }}</option>
</select>
</div>
<div class="col-md-4">
<label for="game_redeem_date" class="form-label">{{ _('Redeem by') }}</label>
<input type="date" id="game_redeem_date" name="redeem_date" class="form-control" value="{{ redeem_date }}">
</div>
<div class="col-md-4">
<label for="game_recipient" class="form-label">{{ _('Recipient') }}</label>
<input type="text" id="game_recipient" name="recipient" class="form-control" value="{{ game.recipient }}">
</div>
<div class="col-12">
<label for="game_url" class="form-label">{{ _('Shop URL') }}</label>
<input type="url" id="game_url" name="url" class="form-control" value="{{ game.url }}">
</div>
<div class="col-12">
<label for="game_notes" class="form-label">{{ _('Notes') }}</label>
<textarea id="game_notes" name="notes" class="form-control" rows="3">{{ game.notes }}</textarea>
</div>
<div class="col-12">
{% if redeem_url and active_redeem %}
<div class="mb-3">
<label for="active_redeem_link" class="form-label">{{ _('Active Redeem Link') }}</label>
<input type="text"
id="active_redeem_link"
class="form-control"
value="{{ redeem_url }}"
readonly
onclick="this.select()">
<small class="text-muted">
{{ _('Expires at') }}: {{ active_redeem.expires.strftime('%d.%m.%Y %H:%M') }}
</small>
</div>
</form>
{% endif %}
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary">{{ _('Save') }}</button>
<a href="{{ url_for('index') }}" class="btn btn-outline-secondary ms-2">{{ _('Cancel') }}</a>
</div>
</div>
</form>
</div>
{% endblock %}

View file

@ -5,7 +5,7 @@
</div>
<div class="mb-2">
<a href="https://git.nocci.it/nocci/GiftGamesDB" target="_blank" rel="noopener">
<img src="{{ url_for('static', filename='forgejo.svg') }}" alt="forgejo" width="20" style="vertical-align:middle;margin-right:4px;">
<img src="{{ url_for('static', filename='forgejo.webp') }}" alt="forgejo" width="20" style="vertical-align:middle;margin-right:4px;">
find the source code on my Forgejo
</a>
</div>

View file

@ -5,11 +5,11 @@
<form method="POST" enctype="multipart/form-data">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="mb-3">
<label class="form-label">{{ _('CSV-Datei auswählen') }}</label>
<label class="form-label">{{ _('Select CSV file') }}</label>
<input type="file" name="file" class="form-control" accept=".csv" required>
</div>
<button type="submit" class="btn btn-success">{{ _('Importieren') }}</button>
<a href="{{ url_for('index') }}" class="btn btn-outline-secondary">{{ _('Abbrechen') }}</a>
<button type="submit" class="btn btn-success">{{ _('Import') }}</button>
<a href="{{ url_for('index') }}" class="btn btn-outline-secondary">{{ _('Cancel') }}</a>
</form>
</div>
{% endblock %}

View file

@ -31,7 +31,19 @@
<td>
{% if game.steam_appid %}
<img src="https://cdn.cloudflare.steamstatic.com/steam/apps/{{ game.steam_appid }}/header.jpg"
alt="Steam Header" style="height:64px;max-width:120px;object-fit:cover;">
alt="Steam Header"
class="game-cover"
{% if loop.first %}fetchpriority="high"{% endif %}
width="368"
height="172"
loading="lazy">
{% elif game.url and 'gog.com' in game.url %}
<img src="{{ url_for('static', filename='gog_logo.webp') }}"
alt="GOG Logo"
class="game-cover"
width="368"
height="172"
loading="lazy">
{% endif %}
</td>
<td>{{ game.name }}</td>

View file

@ -1,29 +1,43 @@
{% extends "base.html" %}
{% block content %}
<div class="row justify-content-center mt-5">
<div class="col-md-6">
<div class="card shadow-sm">
<div class="card-body text-center">
<img src="{{ url_for('static', filename='logo.png') }}" alt="Logo" width="266" height="206" class="mb-4" style="object-fit:contain;">
<h2 class="card-title mb-4">{{ _('Login') }}</h2>
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="mb-3">
<label class="form-label">{{ _('Username') }}</label>
<input type="text" name="username" class="form-control" required>
</div>
<div class="mb-3">
<label class="form-label">{{ _('Password') }}</label>
<input type="password" name="password" class="form-control" required>
</div>
<button type="submit" class="btn btn-primary w-100">{{ _('Login') }}</button>
</form>
<div class="mt-3 text-center">
<a href="{{ url_for('register') }}">{{ _('No account yet? Register') }}</a>
</div>
</div>
</div>
<div class="row justify-content-center">
<div class="col-md-6 col-lg-4">
<h1 class="mb-4">{{ _('Login') }}</h1>
<form method="POST" aria-label="{{ _('Login form') }}" autocomplete="on">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="mb-3">
<label for="username" class="form-label">{{ _('Username') }} <span aria-hidden="true" class="text-danger">*</span></label>
<input type="text"
id="username"
name="username"
class="form-control"
required
autocomplete="username"
aria-required="true"
autofocus>
</div>
<div class="mb-3">
<label for="password" class="form-label">{{ _('Password') }} <span aria-hidden="true" class="text-danger">*</span></label>
<input type="password"
id="password"
name="password"
class="form-control"
required
autocomplete="current-password"
aria-required="true">
</div>
{% if error %}
<div class="alert alert-danger" role="alert">
{{ error }}
</div>
{% endif %}
<button type="submit" class="btn btn-primary w-100">{{ _('Login') }}</button>
</form>
<div class="mt-3 text-center">
<a href="{{ url_for('register') }}">{{ _('No account? Register here!') }}</a>
</div>
</div>
</div>
{% endblock %}

View file

@ -1,24 +1,51 @@
{% extends "base.html" %}
{% block content %}
<div class="row justify-content-center mt-5">
<div class="col-md-6">
<div class="card shadow-sm">
<div class="card-body">
<h2 class="card-title mb-4">{{ _('Register') }}</h2>
<form method="POST">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="mb-3">
<label class="form-label">{{ _('Username') }}</label>
<input type="text" name="username" class="form-control" required>
</div>
<div class="mb-3">
<label class="form-label">{{ _('Password') }}</label>
<input type="password" name="password" class="form-control" required>
</div>
<button type="submit" class="btn btn-primary w-100">{{ _('Register') }}</button>
</form>
</div>
</div>
<div class="row justify-content-center">
<div class="col-md-6 col-lg-4">
<h1 class="mb-4">{{ _('Register') }}</h1>
<form method="POST" aria-label="{{ _('Registration form') }}" autocomplete="on">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="mb-3">
<label for="reg-username" class="form-label">{{ _('Username') }} <span aria-hidden="true" class="text-danger">*</span></label>
<input type="text"
id="reg-username"
name="username"
class="form-control"
required
autocomplete="username"
aria-required="true">
</div>
<div class="mb-3">
<label for="reg-password" class="form-label">{{ _('Password') }} <span aria-hidden="true" class="text-danger">*</span></label>
<input type="password"
id="reg-password"
name="password"
class="form-control"
required
autocomplete="new-password"
aria-required="true">
</div>
<div class="mb-3">
<label for="reg-password2" class="form-label">{{ _('Confirm Password') }} <span aria-hidden="true" class="text-danger">*</span></label>
<input type="password"
id="reg-password2"
name="password2"
class="form-control"
required
autocomplete="new-password"
aria-required="true">
</div>
{% if error %}
<div class="alert alert-danger" role="alert">
{{ error }}
</div>
{% endif %}
<button type="submit" class="btn btn-primary w-100">{{ _('Register') }}</button>
</form>
<div class="mt-3 text-center">
<a href="{{ url_for('login') }}">{{ _('Already have an account? Login!') }}</a>
</div>
</div>
</div>
{% endblock %}