login
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
// Fallback falls $authView nicht gesetzt ist
|
||||||
|
$authView = $authView ?? 'login';
|
||||||
|
?>
|
||||||
<section id="auth" class="border-t border-brand-border/70 bg-brand-primarySoft/20">
|
<section id="auth" class="border-t border-brand-border/70 bg-brand-primarySoft/20">
|
||||||
<div class="mx-auto max-w-4xl px-4 sm:px-6 lg:px-8 py-16 sm:py-20">
|
<div class="mx-auto max-w-xl px-4 sm:px-6 lg:px-8 py-16 sm:py-20">
|
||||||
<div class="mb-10 text-center space-y-3">
|
<div class="mb-8 text-center space-y-3">
|
||||||
<p class="text-xs font-heading font-semibold tracking-[0.3em] uppercase text-brand-primary" data-i18n="auth_kicker">
|
<p class="text-xs font-heading font-semibold tracking-[0.3em] uppercase text-brand-primary" data-i18n="auth_kicker">
|
||||||
Account & Login
|
Account & Login
|
||||||
</p>
|
</p>
|
||||||
@@ -12,9 +16,30 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid gap-8 md:grid-cols-2 items-start">
|
<!-- Tabs -->
|
||||||
<!-- Login -->
|
<div class="mb-6 rounded-full border border-brand-border bg-brand-surface/80 p-1 flex text-xs font-semibold uppercase tracking-[0.18em] text-brand-muted">
|
||||||
<div class="rounded-xl2 border border-brand-border bg-brand-surface/90 shadow-soft p-6 space-y-5">
|
<button
|
||||||
|
type="button"
|
||||||
|
class="flex-1 px-3 py-2 rounded-full text-center transition-colors auth-tab <?= $authView === 'login' ? 'bg-brand-primary text-brand-bg' : 'hover:text-brand-primary'; ?>"
|
||||||
|
data-tab="login"
|
||||||
|
data-i18n="auth_tab_login">
|
||||||
|
Login
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="flex-1 px-3 py-2 rounded-full text-center transition-colors auth-tab <?= $authView === 'register' ? 'bg-brand-primary text-brand-bg' : 'hover:text-brand-primary'; ?>"
|
||||||
|
data-tab="register"
|
||||||
|
data-i18n="auth_tab_register">
|
||||||
|
Registrieren
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Panels -->
|
||||||
|
<div class="space-y-6">
|
||||||
|
<!-- Login Panel -->
|
||||||
|
<div
|
||||||
|
id="authPanelLogin"
|
||||||
|
class="rounded-xl2 border border-brand-border bg-brand-surface/90 shadow-soft p-6 space-y-5 <?= $authView !== 'login' ? 'hidden' : ''; ?>">
|
||||||
<h2 class="font-heading text-lg font-semibold text-white" data-i18n="auth_login_title">
|
<h2 class="font-heading text-lg font-semibold text-white" data-i18n="auth_login_title">
|
||||||
Login
|
Login
|
||||||
</h2>
|
</h2>
|
||||||
@@ -22,7 +47,9 @@
|
|||||||
Melde dich mit deiner E-Mail-Adresse und deinem Passwort an.
|
Melde dich mit deiner E-Mail-Adresse und deinem Passwort an.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<form method="post" action="/login/" class="space-y-4" autocomplete="on">
|
<form method="post" action="/login/?lang=<?= htmlspecialchars($lang) ?>" class="space-y-4" autocomplete="on">
|
||||||
|
<input type="hidden" name="action" value="login">
|
||||||
|
|
||||||
<div class="space-y-1">
|
<div class="space-y-1">
|
||||||
<label for="login_email" class="block text-xs font-semibold tracking-wide uppercase text-brand-muted" data-i18n="auth_login_email_label">
|
<label for="login_email" class="block text-xs font-semibold tracking-wide uppercase text-brand-muted" data-i18n="auth_login_email_label">
|
||||||
E-Mail-Adresse
|
E-Mail-Adresse
|
||||||
@@ -51,9 +78,8 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Platzhalter für Fehlermeldungen (später per PHP / JS) -->
|
|
||||||
<p class="text-xs text-red-400 hidden" id="login_error">
|
<p class="text-xs text-red-400 hidden" id="login_error">
|
||||||
<!-- Wird später dynamisch gefüllt -->
|
<!-- später dynamisch -->
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
@@ -71,8 +97,10 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Registrierung -->
|
<!-- Register Panel -->
|
||||||
<div class="rounded-xl2 border border-brand-border bg-brand-surface/80 shadow-soft p-6 space-y-5">
|
<div
|
||||||
|
id="authPanelRegister"
|
||||||
|
class="rounded-xl2 border border-brand-border bg-brand-surface/80 shadow-soft p-6 space-y-5 <?= $authView !== 'register' ? 'hidden' : ''; ?>">
|
||||||
<h2 class="font-heading text-lg font-semibold text-white" data-i18n="auth_register_title">
|
<h2 class="font-heading text-lg font-semibold text-white" data-i18n="auth_register_title">
|
||||||
Kostenlos registrieren
|
Kostenlos registrieren
|
||||||
</h2>
|
</h2>
|
||||||
@@ -80,7 +108,7 @@
|
|||||||
Erstelle einen kostenlosen Account, um Tests zu speichern, Berichte zu exportieren und den Pro-Modus später freizuschalten.
|
Erstelle einen kostenlosen Account, um Tests zu speichern, Berichte zu exportieren und den Pro-Modus später freizuschalten.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<form method="post" action="/login/" class="space-y-4" autocomplete="on">
|
<form method="post" action="/login/?lang=<?= htmlspecialchars($lang) ?>" class="space-y-4" autocomplete="on">
|
||||||
<input type="hidden" name="action" value="register">
|
<input type="hidden" name="action" value="register">
|
||||||
|
|
||||||
<div class="space-y-1">
|
<div class="space-y-1">
|
||||||
@@ -125,9 +153,8 @@
|
|||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Platzhalter für Fehlermeldungen (später per PHP / JS) -->
|
|
||||||
<p class="text-xs text-red-400 hidden" id="register_error">
|
<p class="text-xs text-red-400 hidden" id="register_error">
|
||||||
<!-- Wird später dynamisch gefüllt -->
|
<!-- später dynamisch -->
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
// Error-Output für Entwicklung
|
|
||||||
ini_set('display_errors', 1);
|
ini_set('display_errors', 1);
|
||||||
ini_set('display_startup_errors', 1);
|
ini_set('display_startup_errors', 1);
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
@@ -10,22 +9,22 @@ require __DIR__ . '/../../src/functions.php';
|
|||||||
$lang = $_GET['lang'] ?? 'en';
|
$lang = $_GET['lang'] ?? 'en';
|
||||||
$lang = in_array($lang, ['de','en','it','fr']) ? $lang : 'en';
|
$lang = in_array($lang, ['de','en','it','fr']) ? $lang : 'en';
|
||||||
|
|
||||||
// (später: User-Dummy durch echte Session ersetzen)
|
// später: echte Session
|
||||||
$userInitials = null;
|
$userInitials = null;
|
||||||
|
|
||||||
// Seitentitel & Description für das Layout
|
|
||||||
$pageTitle = 'Login – usbcheck.it';
|
$pageTitle = 'Login – usbcheck.it';
|
||||||
$pageDescription = 'Melde dich bei USBCheck an, um Tests zu speichern, Pro-Modus zu nutzen und mehrere Geräte zu verwalten.';
|
$pageDescription = 'Melde dich bei USBCheck an, um Tests zu speichern, Pro-Modus zu nutzen und mehrere Geräte zu verwalten.';
|
||||||
|
|
||||||
// Für die Login-Seite brauchen wir typischerweise keine Sektionen-Navigation
|
// Navigation ausblenden:
|
||||||
$navAnchors = [];
|
$navAnchors = [];
|
||||||
|
|
||||||
// Layout-Start
|
// Welche Ansicht? login | register
|
||||||
|
$authView = ($_GET['mode'] ?? 'login') === 'register' ? 'register' : 'login';
|
||||||
|
|
||||||
tpl('layout_start', 'structure');
|
tpl('layout_start', 'structure');
|
||||||
|
|
||||||
// Login-/Register-Section
|
// Login-/Register-Section
|
||||||
|
// $authView wird in der Partial verfügbar sein
|
||||||
tpl('login', 'landing', 'login');
|
tpl('login', 'landing', 'login');
|
||||||
// sss
|
|
||||||
|
|
||||||
// Layout-Ende
|
|
||||||
tpl('layout_end', 'structure');
|
tpl('layout_end', 'structure');
|
||||||
|
|||||||
Reference in New Issue
Block a user