From b7a47a1d909946543fc30dcc79d396423db13889 Mon Sep 17 00:00:00 2001 From: elpatron Date: Sun, 31 May 2026 14:40:03 +0200 Subject: [PATCH] fix(ui): Vite-Template-CSS entfernen und App-Layout wieder zentrieren index.css auf App-Shell reduziert, App.css zentral in main.tsx geladen und #root zentriert Dashboard/Logbuch-Ansichten nach dem Login. Co-authored-by: Cursor --- client/src/App.tsx | 1 - client/src/index.css | 111 +++++-------------------------------------- client/src/main.tsx | 1 + 3 files changed, 12 insertions(+), 101 deletions(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index c58d526..30a6985 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -1,5 +1,4 @@ import { useState, useEffect, useCallback, useRef } from 'react' -import './App.css' import { DialogProvider } from './components/ModalDialog.tsx' import AuthOnboarding from './components/AuthOnboarding.tsx' import UserProfilePage from './components/UserProfilePage.tsx' diff --git a/client/src/index.css b/client/src/index.css index 03134e4..3896cc7 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -1,64 +1,8 @@ -:root { - --text: #6b6375; - --text-h: #08060d; - --bg: #fff; - --border: #e5e4e7; - --code-bg: #f4f3ec; - --accent: #aa3bff; - --accent-bg: rgba(170, 59, 255, 0.1); - --accent-border: rgba(170, 59, 255, 0.5); - --social-bg: rgba(244, 243, 236, 0.5); - --shadow: - rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px; +/* Minimal app shell — component styles live in App.css / themes.css */ - --sans: system-ui, 'Segoe UI', Roboto, sans-serif; - --heading: system-ui, 'Segoe UI', Roboto, sans-serif; - --mono: ui-monospace, Consolas, monospace; - - font: 18px/145% var(--sans); - letter-spacing: 0.18px; - color-scheme: light dark; - color: var(--text); - background: var(--bg); - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - - @media (max-width: 1024px) { - font-size: 16px; - } -} - -@media (prefers-color-scheme: dark) { - :root { - --text: #9ca3af; - --text-h: #f3f4f6; - --bg: #16171d; - --border: #2e303a; - --code-bg: #1f2028; - --accent: #c084fc; - --accent-bg: rgba(192, 132, 252, 0.15); - --accent-border: rgba(192, 132, 252, 0.5); - --social-bg: rgba(47, 48, 58, 0.5); - --shadow: - rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px; - } - - #social .button-icon { - filter: invert(1) brightness(2); - } -} - -#root { - width: 1126px; - max-width: 100%; - margin: 0 auto; - text-align: center; - border-inline: 1px solid var(--border); - min-height: 100svh; - display: flex; - flex-direction: column; +*, +*::before, +*::after { box-sizing: border-box; } @@ -66,44 +10,11 @@ body { margin: 0; } -h1, -h2 { - font-family: var(--heading); - font-weight: 500; - color: var(--text-h); -} - -h1 { - font-size: 56px; - letter-spacing: -1.68px; - margin: 32px 0; - @media (max-width: 1024px) { - font-size: 36px; - margin: 20px 0; - } -} -h2 { - font-size: 24px; - line-height: 118%; - letter-spacing: -0.24px; - margin: 0 0 8px; - @media (max-width: 1024px) { - font-size: 20px; - } -} -p { - margin: 0; -} - -code, -.counter { - font-family: var(--mono); - display: inline-flex; - border-radius: 4px; -} - -code { - font-size: 15px; - line-height: 135%; - padding: 4px 8px; +#root { + width: 100%; + max-width: 100%; + min-height: 100svh; + display: flex; + flex-direction: column; + align-items: center; } diff --git a/client/src/main.tsx b/client/src/main.tsx index 415fdf3..dfefcb3 100644 --- a/client/src/main.tsx +++ b/client/src/main.tsx @@ -3,6 +3,7 @@ import { createRoot } from 'react-dom/client' import 'leaflet/dist/leaflet.css' import './themes.css' import './index.css' +import './App.css' import './i18n' import App from './App.tsx' import { applyAppearanceToDocument } from './services/appearance.ts'