Files
3d.lehrstun.de/templates/login_pin.html
Hans Puettmann 4658d4931a Initial commit: Konzept v2 + Etappe 1 (Blueprints + Login + Profile)
Schwester-Projekt zu arduino.lehrstun.de fuer die 3D-Druck-AG am
Lessing-Gymnasium. Offene jahrelange Nachmittags-AG (kein Trimester),
8-10 Einzel-SuS mit optionalen 2er-Paarungen, 4 Bambu-Lab-Drucker
(3 geschlossen + 1 A1 mini).

Konzept v2 (Reality-Check-Iteration 2026-05-24):
- Onboarding-Pfad statt Pflicht-Lektionen (L1-L3 selbst-zertifiziert)
- Selbstlern-Loop als Kern: SuS-Projekte wachsen die interne Bibliothek
- Drill-Down-Lehrer-Dashboard (Wer ist hier / Wartet Review / Haengt fest)
- Cockpit progressiv: zeigt nur was zum Status passt
- Bambu-Cloud-API fuer Drucker-Live-Status (fragil + Fallback manuell)
- Three.js-Vorschau fuer Cover-aus-3D-Ansicht (Etappe 6)
- Vollstaendige Doku als Obsidian-Vault (24 Markdown-Dateien)
- Entscheidungen E-001 bis E-022 in docs/decisions.md

Etappe 1 lauffaehig (~1800 Zeilen Code):
- Blueprint-Struktur (V8): routes/oeffentlich+profil+admin+api,
  services/auth+bambu+datei
- Komplettes Schema in database.py (14 Tabellen, idempotent)
- Login mit bcrypt + persistentem Lockout in DB (V7, verbessert ggue
  Arduino-Kurs der In-Memory-Dict nutzt)
- Admin-Login + Profile-CRUD + PIN-Reset + PIN-Karten-Druckbogen
- Inline-Edit-Endpunkt mit Whitelist + Audit-Log
- Seeds: AG lessing-3d-ag + 4 Drucker + Default-Einstellungen
- Smoke-Test bestanden (Login, Profil-Anlage, Lockout-Logging)

Nicht im Repo (.gitignore): .env, *.db, venv/, .obsidian/workspace.json
2026-05-24 18:56:59 +02:00

43 lines
1.8 KiB
HTML

{% extends "base.html" %}
{% block title %}PIN-Eingabe — {{ profil.vorname }}{% endblock %}
{% block content %}
<div class="card" style="max-width: 420px; margin: 2rem auto; text-align: center;">
<div style="font-size: 4rem; margin-bottom: 0.5rem;">{{ tier_emoji(profil.tier) }}</div>
<h1 style="font-size: 1.4rem; margin-bottom: 0.2rem;">{{ profil.vorname }}</h1>
<p style="color: var(--text-light); font-size: 0.9rem;">{{ tier_name(profil.tier) }}</p>
{% if gesperrt %}
<div class="flash flash-error" style="margin-top: 1.5rem;">
Zu viele Fehlversuche &mdash; gesperrt fuer noch ca. <strong>{{ min_rest }} Minuten</strong>.
Frag den Lehrer, wenn du nicht warten kannst.
</div>
<p style="margin-top: 1rem;">
<a href="{{ url_for('profil.login') }}" class="btn btn-secondary">Anderes Profil waehlen</a>
</p>
{% else %}
<form method="post" style="margin-top: 1.5rem;">
<label for="pin" style="display:block; font-size: 0.9rem; color: var(--text-light); margin-bottom: 0.5rem;">
Deine 4-stellige PIN:
</label>
<input
type="text"
inputmode="numeric"
pattern="[0-9]{4}"
maxlength="4"
id="pin"
name="pin"
autofocus
autocomplete="off"
style="font-size: 2rem; text-align: center; letter-spacing: 0.8rem;
width: 12rem; padding: 0.5rem; border: 2px solid var(--primary);
border-radius: 8px; margin-bottom: 1rem;"
>
<br>
<button type="submit" class="btn btn-primary">Einloggen</button>
<a href="{{ url_for('profil.login') }}" class="btn btn-secondary" style="margin-left: 0.5rem;">Anderes Profil</a>
</form>
{% endif %}
</div>
{% endblock %}