nun Ohne Tailwind

This commit is contained in:
rxf
2026-03-12 09:11:43 +01:00
parent a949ebcdc8
commit 0faa144e4f
8 changed files with 204 additions and 694 deletions

View File

@@ -1,22 +1,15 @@
@import "tailwindcss";
:root {
--background: #ffffff;
--foreground: #171717;
}
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-geist-sans);
--font-mono: var(--font-geist-mono);
}
body {
background: var(--background);
color: var(--foreground);
font-family: "Lucida Grande", Helvetica, Arial, sans-serif;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
main {
@@ -49,7 +42,10 @@ main {
.btn-icon { background: none; border: none; cursor: pointer; font-size: 16px; padding: 0; }
/* ---- Table ---- */
.table-container { overflow-x: auto; }
.table-container {
overflow-x: auto;
width: 100%;
}
.main-table {
width: 100%;
@@ -118,3 +114,172 @@ main {
}
.modal input:disabled { background: #eee; color: #777; }
.modal-buttons { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
/* ---- App Layout ---- */
.app-wrapper {
min-height: 100vh;
padding: 32px 16px;
}
.app-container {
max-width: 1264px;
margin: 0 auto;
border: 2px solid black;
border-radius: 12px;
background-color: #d1d5db;
padding: 24px;
}
.app-title {
font-size: 2.25rem;
font-weight: bold;
text-align: center;
margin-bottom: 24px;
letter-spacing: -0.025em;
}
.app-inner {
width: 97%;
margin: 0 auto;
}
.app-logout-bar {
display: flex;
justify-content: flex-end;
margin-bottom: -2px;
}
.btn-logout {
padding: 8px 16px;
background-color: #dc2626;
color: white;
font-size: 0.875rem;
border: none;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0,0,0,0.2);
cursor: pointer;
}
.btn-logout:hover { background-color: #b91c1c; }
.app-main {
width: 96%;
border: 2px solid black;
border-radius: 8px;
padding: 24px;
background-color: #FFFFDD;
}
.app-footer {
margin-top: 32px;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.875rem;
color: #4b5563;
padding: 0 16px;
}
.app-footer a:hover { text-decoration: underline; }
/* ---- Login Page ---- */
.login-wrapper {
min-height: 100vh;
background-color: white;
padding: 16px;
}
.login-outer {
max-width: 72rem;
margin: 0 auto;
border: 2px solid black;
border-radius: 8px;
padding: 24px;
background-color: #FFFFDD;
}
.login-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 24px;
}
.login-page-title {
font-size: 1.875rem;
font-weight: bold;
}
.login-center {
display: flex;
justify-content: center;
padding: 40px 0;
}
.login-card {
width: 100%;
max-width: 24rem;
background: white;
border: 1px solid #d1d5db;
border-radius: 12px;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
padding: 32px;
box-sizing: border-box;
}
.login-card-title {
font-size: 1.25rem;
font-weight: 600;
color: #111827;
margin-bottom: 24px;
text-align: center;
}
.login-form {
display: flex;
flex-direction: column;
gap: 20px;
}
.login-label {
display: block;
font-size: 0.875rem;
font-weight: 500;
color: #374151;
margin-bottom: 4px;
}
.login-input {
width: 100%;
padding: 8px 12px;
border: 2px solid #9ca3af;
border-radius: 8px;
background: white;
color: #111827;
font-size: 0.875rem;
outline: none;
box-sizing: border-box;
}
.login-input:focus { border-color: #3b82f6; }
.login-input:disabled { opacity: 0.6; cursor: not-allowed; }
.login-error {
background-color: #fef2f2;
border: 1px solid #fca5a5;
color: #b91c1c;
padding: 8px 12px;
border-radius: 8px;
font-size: 0.875rem;
}
.login-submit {
width: 100%;
padding: 8px 16px;
background-color: #85B7D7;
color: black;
font-weight: 500;
border: none;
border-radius: 8px;
font-size: 0.875rem;
cursor: pointer;
}
.login-submit:hover:not(:disabled) { background-color: #6a9fc5; }
.login-submit:disabled { opacity: 0.5; cursor: not-allowed; }

View File

@@ -1,17 +1,6 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export const metadata: Metadata = {
title: "Tabletten-Übersicht",
description: "Verwaltung von Medikamenten und Tabletten",
@@ -24,9 +13,7 @@ export default function RootLayout({
}>) {
return (
<html lang="en">
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<body>
{children}
</body>
</html>

View File

@@ -7,19 +7,19 @@ export default function LoginPage() {
const [state, loginAction, isPending] = useActionState(login, undefined);
return (
<div className="min-h-screen bg-white py-4 px-4">
<main className="max-w-6xl mx-auto border-2 border-black rounded-lg p-6 bg-[#FFFFDD]">
<div className="flex justify-between items-center mb-6">
<h1 className="text-3xl font-bold">Tabletten-Übersicht</h1>
<div className="login-wrapper">
<main className="login-outer">
<div className="login-header">
<h1 className="login-page-title">Tabletten-Übersicht</h1>
</div>
<div className="flex justify-center py-10">
<div className="w-full max-w-sm bg-white border border-gray-300 rounded-xl shadow-md p-8">
<h2 className="text-xl font-semibold text-gray-900 mb-6 text-center">Anmeldung</h2>
<div className="login-center">
<div className="login-card">
<h2 className="login-card-title">Anmeldung</h2>
<form action={loginAction} className="space-y-5">
<form action={loginAction} className="login-form">
<div>
<label htmlFor="username" className="block text-sm font-medium text-gray-700 mb-1">
<label htmlFor="username" className="login-label">
Benutzername
</label>
<input
@@ -28,14 +28,14 @@ export default function LoginPage() {
type="text"
required
autoComplete="off"
className="w-full px-3 py-2 border-2 border-gray-400 rounded-lg bg-white text-gray-900 focus:border-blue-500 focus:outline-none text-sm"
className="login-input"
placeholder="Benutzername"
disabled={isPending}
/>
</div>
<div>
<label htmlFor="password" className="block text-sm font-medium text-gray-700 mb-1">
<label htmlFor="password" className="login-label">
Passwort
</label>
<input
@@ -44,14 +44,14 @@ export default function LoginPage() {
type="password"
required
autoComplete="new-password"
className="w-full px-3 py-2 border-2 border-gray-400 rounded-lg bg-white text-gray-900 focus:border-blue-500 focus:outline-none text-sm"
className="login-input"
placeholder="Passwort"
disabled={isPending}
/>
</div>
{state?.error && (
<div className="bg-red-50 border border-red-300 text-red-700 px-3 py-2 rounded-lg text-sm">
<div className="login-error">
{state.error}
</div>
)}
@@ -59,7 +59,7 @@ export default function LoginPage() {
<button
type="submit"
disabled={isPending}
className="w-full py-2 px-4 bg-[#85B7D7] hover:bg-[#6a9fc5] text-black font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed text-sm"
className="login-submit"
>
{isPending ? 'Anmeldung läuft...' : 'Anmelden'}
</button>