diff --git a/frontend/package.json b/frontend/package.json index 053b816..88af69d 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,11 +9,12 @@ "preview": "vite preview" }, "dependencies": { - "react": "^18.3.1", - "react-dom": "^18.3.1", "chart.js": "^4.4.1", + "chartjs-adapter-date-fns": "^3.0.0", + "date-fns": "^3.3.1", + "react": "^18.3.1", "react-chartjs-2": "^5.2.0", - "date-fns": "^3.3.1" + "react-dom": "^18.3.1" }, "devDependencies": { "@types/react": "^18.3.1", diff --git a/frontend/src/App.css b/frontend/src/App.css index 16e8294..0976989 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -5,20 +5,37 @@ } .app-header { - background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); - color: white; - padding: 2rem; + background: #e6f2ff; + color: #333; + padding: 1rem 1.5rem; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); + text-align: center; } .app-header h1 { font-size: 2.5rem; + font-weight: bold; + margin: 0 0 0.5rem 0; +} + +.header-datetime { + font-size: 0.95rem; + font-weight: bold; margin-bottom: 0.5rem; } -.last-update { +.header-spacer { + height: 0.5rem; +} + +.header-coordinates { font-size: 0.9rem; - opacity: 0.9; + font-weight: bold; +} + +.header-astro { + font-size: 0.85rem; + font-weight: bold; } .app-main { diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index df54f0e..4c3da2e 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -38,15 +38,35 @@ function App() { ) } + // Aktuelle Zeit formatieren + const now = new Date() + const dateStr = now.toLocaleDateString('de-DE', { + weekday: 'long', + year: 'numeric', + month: 'long', + day: 'numeric' + }) + const timeStr = now.toLocaleTimeString('de-DE', { + hour: '2-digit', + minute: '2-digit' + }) + + // TODO: Sonnenauf-/untergang und Mondphase berechnen + // Aktuell Platzhalter - benötigt Bibliothek wie 'suncalc' + const sunrise = "06:45" + const sunset = "18:30" + const moonPhase = "abnehmend 50%" + return (
- Letzte Aktualisierung: {lastUpdate.toLocaleTimeString('de-DE')} -
- )} +