improvements

This commit is contained in:
Fabian Schieder 2026-01-22 22:14:55 +01:00
parent 6a426f6902
commit 5795861b96
2 changed files with 101 additions and 114 deletions

View File

@ -1,155 +1,141 @@
/* Datei: assets/css/login.css */ /* assets/css/login.css
Geizhals-inspiriertes, cleanes Login-Layout
*/
:root{ :root{
--bg1:#0b1220; --gh-bg: #f4f6f8;
--bg2:#0f172a; --gh-card: #ffffff;
--card:rgba(255,255,255,.06); --gh-text: #1f2937;
--border:rgba(255,255,255,.10); --gh-muted: #6b7280;
--text:#e5e7eb; --gh-border: #e5e7eb;
--muted:#9ca3af; --gh-accent: #18a957; /* "Deal"-Grün */
--accent:#22c55e; --gh-accent-2: #0f8a45;
--accent2:#38bdf8; --gh-danger: #d92d20;
--danger:#ef4444; --gh-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
--shadow:0 18px 60px rgba(0,0,0,.45); --gh-radius: 14px;
--radius:16px; --gh-focus: 0 0 0 4px rgba(24, 169, 87, 0.18);
} }
*{ box-sizing:border-box; } html, body{
html,body{ height:100%; } height: 100%;
}
body{ body{
margin:0; margin: 0;
font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,"Noto Sans","Helvetica Neue",sans-serif; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
color:var(--text); color: var(--gh-text);
background: background:
radial-gradient(1100px 550px at 15% 10%, rgba(56,189,248,.22), transparent 60%), radial-gradient(1200px 500px at 20% 0%, rgba(24,169,87,0.10), transparent 55%),
radial-gradient(900px 500px at 85% 15%, rgba(34,197,94,.18), transparent 55%), radial-gradient(900px 400px at 90% 10%, rgba(59,130,246,0.08), transparent 60%),
linear-gradient(180deg, var(--bg1), var(--bg2)); var(--gh-bg);
display:grid;
place-items:center;
padding:28px 16px;
} }
.login-shell{ /* Überschrift */
width:min(420px, 100%); h2{
max-width: 440px;
margin: 44px auto 14px;
padding: 0 18px;
font-size: 1.55rem;
letter-spacing: 0.2px;
} }
.login-card{ /* Formular-Karte */
background:var(--card); form{
border:1px solid var(--border); max-width: 440px;
border-radius:var(--radius); margin: 0 auto;
box-shadow:var(--shadow); padding: 22px 18px 18px;
backdrop-filter: blur(10px); background: var(--gh-card);
padding:26px 22px; border: 1px solid var(--gh-border);
} border-radius: var(--gh-radius);
box-shadow: var(--gh-shadow);
.login-title{
margin:0 0 6px 0;
font-size:26px;
letter-spacing:.2px;
}
.login-subtitle{
margin:0 0 18px 0;
color:var(--muted);
font-size:14px;
line-height:1.35;
}
.form-group{
margin:0 0 14px 0;
} }
label{ label{
display:block; display: block;
font-size:13px; margin: 12px 0 6px;
color:var(--muted); font-size: 0.95rem;
margin:0 0 6px 0; color: var(--gh-muted);
} }
input[type="text"], input[type="text"],
input[type="password"]{ input[type="password"]{
width:100%; width: 100%;
border:1px solid rgba(255,255,255,.14); box-sizing: border-box;
background:rgba(15,23,42,.55); padding: 12px 12px;
color:var(--text); border: 1px solid var(--gh-border);
border-radius:12px; border-radius: 12px;
padding:12px 12px; background: #fbfbfc;
outline:none; color: var(--gh-text);
transition: border-color .2s ease, box-shadow .2s ease, transform .06s ease; outline: none;
} transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
input[type="text"]::placeholder,
input[type="password"]::placeholder{
color:rgba(229,231,235,.55);
} }
input[type="text"]:focus, input[type="text"]:focus,
input[type="password"]:focus{ input[type="password"]:focus{
border-color: rgba(56,189,248,.55); border-color: rgba(24,169,87,0.55);
box-shadow: 0 0 0 4px rgba(56,189,248,.18); box-shadow: var(--gh-focus);
background: #ffffff;
} }
.actions{ /* Submit */
display:flex;
gap:10px;
margin-top:8px;
}
button,
input[type="submit"]{ input[type="submit"]{
width:100%; width: 100%;
border:0; margin-top: 14px;
border-radius:12px; padding: 12px 14px;
padding:12px 14px; border: 0;
font-weight:600; border-radius: 12px;
cursor:pointer; background: linear-gradient(180deg, var(--gh-accent), var(--gh-accent-2));
transition: transform .06s ease, filter .2s ease, box-shadow .2s ease; color: #ffffff;
background: linear-gradient(135deg, var(--accent2), var(--accent)); font-weight: 650;
color:#071018; cursor: pointer;
box-shadow: 0 12px 30px rgba(34,197,94,.18); transition: transform 120ms ease, filter 120ms ease;
} }
button:hover,
input[type="submit"]:hover{ input[type="submit"]:hover{
filter: brightness(1.02); filter: brightness(1.02);
transform: translateY(-1px);
} }
button:active,
input[type="submit"]:active{ input[type="submit"]:active{
transform: translateY(1px); transform: translateY(0px);
} }
.login-error{ /* Fehlertext (dein <p> oberhalb des Forms) */
border:1px solid rgba(239,68,68,.35); p{
background:rgba(239,68,68,.10); max-width: 440px;
color:#fecaca; margin: 10px auto;
padding:10px 12px; padding: 0 18px;
border-radius:12px; color: var(--gh-muted);
margin:0 0 14px 0;
font-size:14px;
} }
.login-footer{ p:has(+ form){
margin-top:14px; /* der Absatz direkt vor dem Form: als Alert darstellen */
text-align:center; color: #ffffff;
color:var(--muted); background: var(--gh-danger);
font-size:14px; border-radius: 12px;
padding: 10px 12px;
box-shadow: 0 8px 18px rgba(217, 45, 32, 0.18);
} }
.login-footer a{ /* Register-Link */
color:rgba(56,189,248,.95); p a{
text-decoration:none; color: var(--gh-accent-2);
text-decoration: none;
font-weight: 600;
} }
.login-footer a:hover{ p a:hover{
text-decoration:underline; text-decoration: underline;
} }
/* Optional: dunkle HR */ /* Kleine Anpassungen für sehr schmale Displays */
.hr{ @media (max-width: 520px){
border:0; h2{
height:1px; margin-top: 28px;
background:rgba(255,255,255,.10); font-size: 1.35rem;
margin:16px 0; }
}
form{
border-radius: 12px;
}
}

View File

@ -30,7 +30,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Basic Validierung // Basic Validierung
if ($uname === '' || $pw === '') { if ($uname === '' || $pw === '') {
$loginError = "Bitte Username und Passwort eingeben."; $loginError = "Bitte Username und Passwort eingeben.";
} else { }
else {
// Login ist SELECT, nicht INSERT // Login ist SELECT, nicht INSERT
$stmt = mysqli_prepare($conn, "SELECT id, pw FROM user WHERE un = ?"); $stmt = mysqli_prepare($conn, "SELECT id, pw FROM user WHERE un = ?");
mysqli_stmt_bind_param($stmt, "s", $uname); mysqli_stmt_bind_param($stmt, "s", $uname);