450ae37f42
- server/routes/weather.js: OpenWeatherMap-Proxy (aktuelles Wetter + 3-Tage-Forecast, 30-min-Cache, graceful fallback wenn kein API-Key gesetzt) - public/pages/dashboard.js: Weather-Widget parallel mit Dashboard-Daten laden - public/styles/dashboard.css: Weather-Widget-Styles (Gradient, Forecast-Strip) - server/services/recurrence.js: RRULE-Parser (FREQ=DAILY/WEEKLY/MONTHLY, BYDAY, INTERVAL, UNTIL) + nextOccurrence()-Funktion - server/routes/tasks.js: Bei PATCH /:id/status = done → nächste Instanz wiederkehrender Aufgaben automatisch anlegen - public/pages/tasks.js: Kanban-Ansicht (3 Spalten: Offen/In Bearbeitung/Erledigt) mit HTML5 Drag & Drop, View-Toggle (Liste/Kanban) - public/styles/tasks.css: Kanban-Board-Styles (Spalten, Cards, Drag-over-Highlight) - public/sw.js: Cache-Version auf v2, alle Modul-CSS-Dateien im APP_SHELL-Cache Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
540 lines
11 KiB
CSS
540 lines
11 KiB
CSS
/**
|
|
* Modul: Dashboard
|
|
* Zweck: Styles für das Dashboard — Begrüßung, Widget-Grid, alle Widget-Typen, FAB-Speed-Dial
|
|
* Abhängigkeiten: tokens.css, layout.css
|
|
*/
|
|
|
|
/* --------------------------------------------------------
|
|
* Dashboard-Layout
|
|
* -------------------------------------------------------- */
|
|
.dashboard {
|
|
padding: var(--space-4);
|
|
padding-bottom: calc(var(--nav-height-mobile) + var(--safe-area-inset-bottom) + var(--space-16));
|
|
max-width: var(--content-max-width);
|
|
margin: 0 auto;
|
|
}
|
|
|
|
@media (min-width: 1024px) {
|
|
.dashboard {
|
|
padding: var(--space-8);
|
|
padding-bottom: var(--space-16);
|
|
}
|
|
}
|
|
|
|
/* --------------------------------------------------------
|
|
* Widget-Grid
|
|
* -------------------------------------------------------- */
|
|
.dashboard__grid {
|
|
display: grid;
|
|
gap: var(--space-4);
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.dashboard__grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
.widget--wide {
|
|
grid-column: 1 / -1;
|
|
}
|
|
}
|
|
|
|
@media (min-width: 1024px) {
|
|
.dashboard__grid {
|
|
grid-template-columns: repeat(3, 1fr);
|
|
}
|
|
|
|
.widget--wide {
|
|
grid-column: span 2;
|
|
}
|
|
}
|
|
|
|
/* --------------------------------------------------------
|
|
* Begrüßungs-Widget
|
|
* -------------------------------------------------------- */
|
|
.widget-greeting {
|
|
background: linear-gradient(135deg, var(--color-accent) 0%, #5B9FFF 100%);
|
|
border-radius: var(--radius-md);
|
|
padding: var(--space-5) var(--space-6);
|
|
color: #ffffff;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.widget-greeting {
|
|
grid-column: 1 / -1;
|
|
}
|
|
}
|
|
|
|
.widget-greeting__title {
|
|
font-size: var(--text-2xl);
|
|
font-weight: var(--font-weight-bold);
|
|
margin-bottom: var(--space-1);
|
|
}
|
|
|
|
.widget-greeting__date {
|
|
font-size: var(--text-base);
|
|
opacity: 0.85;
|
|
}
|
|
|
|
/* --------------------------------------------------------
|
|
* Basis-Widget (Card)
|
|
* -------------------------------------------------------- */
|
|
.widget {
|
|
background-color: var(--color-surface);
|
|
border-radius: var(--radius-md);
|
|
box-shadow: var(--shadow-sm);
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.widget__header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: var(--space-4) var(--space-4) var(--space-3);
|
|
border-bottom: 1px solid var(--color-border);
|
|
}
|
|
|
|
.widget__title {
|
|
font-size: var(--text-base);
|
|
font-weight: var(--font-weight-semibold);
|
|
color: var(--color-text-primary);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.widget__title-icon {
|
|
width: 18px;
|
|
height: 18px;
|
|
color: var(--color-accent);
|
|
}
|
|
|
|
.widget__link {
|
|
font-size: var(--text-sm);
|
|
color: var(--color-accent);
|
|
font-weight: var(--font-weight-medium);
|
|
}
|
|
|
|
.widget__body {
|
|
flex: 1;
|
|
padding: var(--space-3) var(--space-4);
|
|
}
|
|
|
|
.widget__empty {
|
|
padding: var(--space-6) var(--space-4);
|
|
text-align: center;
|
|
color: var(--color-text-secondary);
|
|
font-size: var(--text-sm);
|
|
}
|
|
|
|
/* --------------------------------------------------------
|
|
* Aufgaben-Widget
|
|
* -------------------------------------------------------- */
|
|
.task-item {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: var(--space-3);
|
|
padding: var(--space-3) 0;
|
|
border-bottom: 1px solid var(--color-border);
|
|
cursor: pointer;
|
|
transition: opacity var(--transition-fast);
|
|
}
|
|
|
|
.task-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.task-item:hover {
|
|
opacity: 0.75;
|
|
}
|
|
|
|
.task-item__priority {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: var(--radius-full);
|
|
flex-shrink: 0;
|
|
margin-top: 6px;
|
|
}
|
|
|
|
.task-item__priority--urgent { background-color: var(--color-priority-urgent); }
|
|
.task-item__priority--high { background-color: var(--color-priority-high); }
|
|
|
|
.task-item__content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.task-item__title {
|
|
font-size: var(--text-sm);
|
|
font-weight: var(--font-weight-medium);
|
|
color: var(--color-text-primary);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.task-item__meta {
|
|
font-size: var(--text-xs);
|
|
color: var(--color-text-secondary);
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.task-item__meta--overdue {
|
|
color: var(--color-danger);
|
|
font-weight: var(--font-weight-medium);
|
|
}
|
|
|
|
.task-item__avatar {
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: var(--radius-full);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 10px;
|
|
font-weight: var(--font-weight-bold);
|
|
color: #ffffff;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* --------------------------------------------------------
|
|
* Termine-Widget
|
|
* -------------------------------------------------------- */
|
|
.event-item {
|
|
display: flex;
|
|
align-items: stretch;
|
|
gap: var(--space-3);
|
|
padding: var(--space-3) 0;
|
|
border-bottom: 1px solid var(--color-border);
|
|
cursor: pointer;
|
|
transition: opacity var(--transition-fast);
|
|
}
|
|
|
|
.event-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.event-item:hover {
|
|
opacity: 0.75;
|
|
}
|
|
|
|
.event-item__bar {
|
|
width: 3px;
|
|
border-radius: var(--radius-full);
|
|
flex-shrink: 0;
|
|
background-color: var(--color-accent);
|
|
}
|
|
|
|
.event-item__content {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.event-item__title {
|
|
font-size: var(--text-sm);
|
|
font-weight: var(--font-weight-medium);
|
|
color: var(--color-text-primary);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.event-item__time {
|
|
font-size: var(--text-xs);
|
|
color: var(--color-text-secondary);
|
|
margin-top: 2px;
|
|
}
|
|
|
|
/* --------------------------------------------------------
|
|
* Essen-Widget
|
|
* -------------------------------------------------------- */
|
|
.meal-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-3);
|
|
padding: var(--space-3) 0;
|
|
border-bottom: 1px solid var(--color-border);
|
|
cursor: pointer;
|
|
transition: opacity var(--transition-fast);
|
|
}
|
|
|
|
.meal-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.meal-item:hover {
|
|
opacity: 0.75;
|
|
}
|
|
|
|
.meal-item__type-badge {
|
|
font-size: var(--text-xs);
|
|
font-weight: var(--font-weight-semibold);
|
|
padding: 2px var(--space-2);
|
|
border-radius: var(--radius-xs);
|
|
background-color: var(--color-accent-light);
|
|
color: var(--color-accent);
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
min-width: 72px;
|
|
text-align: center;
|
|
}
|
|
|
|
.meal-item__title {
|
|
font-size: var(--text-sm);
|
|
color: var(--color-text-primary);
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
/* --------------------------------------------------------
|
|
* Notizen-Widget
|
|
* -------------------------------------------------------- */
|
|
.note-item {
|
|
border-radius: var(--radius-sm);
|
|
padding: var(--space-3);
|
|
margin-bottom: var(--space-2);
|
|
cursor: pointer;
|
|
transition: opacity var(--transition-fast);
|
|
border-left: 3px solid transparent;
|
|
}
|
|
|
|
.note-item:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.note-item:hover {
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.note-item__title {
|
|
font-size: var(--text-sm);
|
|
font-weight: var(--font-weight-semibold);
|
|
color: var(--color-text-primary);
|
|
margin-bottom: 2px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.note-item__content {
|
|
font-size: var(--text-xs);
|
|
color: var(--color-text-secondary);
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* --------------------------------------------------------
|
|
* Wetter-Widget
|
|
* -------------------------------------------------------- */
|
|
.weather-widget {
|
|
background: linear-gradient(135deg, #1a73e8 0%, #0f4fa8 100%);
|
|
color: #ffffff;
|
|
}
|
|
|
|
.weather-widget__main {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: var(--space-4) var(--space-5);
|
|
}
|
|
|
|
.weather-widget__temp {
|
|
font-size: var(--text-4xl, 2.25rem);
|
|
font-weight: var(--font-weight-bold);
|
|
line-height: 1;
|
|
margin-bottom: var(--space-1);
|
|
}
|
|
|
|
.weather-widget__desc {
|
|
font-size: var(--text-base);
|
|
font-weight: var(--font-weight-medium);
|
|
text-transform: capitalize;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.weather-widget__city {
|
|
font-size: var(--text-sm);
|
|
opacity: 0.85;
|
|
margin-bottom: var(--space-2);
|
|
}
|
|
|
|
.weather-widget__meta {
|
|
font-size: var(--text-xs);
|
|
opacity: 0.75;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.weather-widget__icon {
|
|
width: 80px;
|
|
height: 80px;
|
|
flex-shrink: 0;
|
|
filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
|
|
}
|
|
|
|
.weather-forecast {
|
|
display: flex;
|
|
border-top: 1px solid rgba(255,255,255,0.2);
|
|
padding: var(--space-3) var(--space-5);
|
|
gap: var(--space-4);
|
|
}
|
|
|
|
.weather-forecast__day {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 2px;
|
|
flex: 1;
|
|
}
|
|
|
|
.weather-forecast__label {
|
|
font-size: var(--text-xs);
|
|
font-weight: var(--font-weight-semibold);
|
|
opacity: 0.85;
|
|
text-transform: capitalize;
|
|
}
|
|
|
|
.weather-forecast__icon {
|
|
width: 32px;
|
|
height: 32px;
|
|
}
|
|
|
|
.weather-forecast__temps {
|
|
display: flex;
|
|
gap: var(--space-2);
|
|
font-size: var(--text-xs);
|
|
}
|
|
|
|
.weather-forecast__high {
|
|
font-weight: var(--font-weight-semibold);
|
|
}
|
|
|
|
.weather-forecast__low {
|
|
opacity: 0.65;
|
|
}
|
|
|
|
/* --------------------------------------------------------
|
|
* Skeleton-Zustände (pro Widget)
|
|
* -------------------------------------------------------- */
|
|
.widget-skeleton {
|
|
background-color: var(--color-surface);
|
|
border-radius: var(--radius-md);
|
|
box-shadow: var(--shadow-sm);
|
|
padding: var(--space-4);
|
|
}
|
|
|
|
.skeleton-line {
|
|
height: 14px;
|
|
margin-bottom: var(--space-2);
|
|
border-radius: var(--radius-xs);
|
|
}
|
|
|
|
.skeleton-line--short { width: 40%; }
|
|
.skeleton-line--medium { width: 65%; }
|
|
.skeleton-line--full { width: 100%; }
|
|
|
|
/* --------------------------------------------------------
|
|
* FAB Speed-Dial
|
|
* -------------------------------------------------------- */
|
|
.fab-container {
|
|
position: fixed;
|
|
bottom: calc(var(--nav-height-mobile) + var(--safe-area-inset-bottom) + var(--space-4));
|
|
right: var(--space-4);
|
|
z-index: calc(var(--z-nav) - 1);
|
|
display: flex;
|
|
flex-direction: column-reverse;
|
|
align-items: flex-end;
|
|
gap: var(--space-3);
|
|
}
|
|
|
|
@media (min-width: 1024px) {
|
|
.fab-container {
|
|
bottom: var(--space-8);
|
|
}
|
|
}
|
|
|
|
.fab-main {
|
|
width: 56px;
|
|
height: 56px;
|
|
border-radius: var(--radius-full);
|
|
background-color: var(--color-accent);
|
|
color: #ffffff;
|
|
box-shadow: var(--shadow-lg);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
transition: transform var(--transition-base), background-color var(--transition-fast);
|
|
border: none;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.fab-main:hover {
|
|
background-color: var(--color-accent-hover);
|
|
}
|
|
|
|
.fab-main--open {
|
|
transform: rotate(45deg);
|
|
background-color: var(--color-text-secondary);
|
|
}
|
|
|
|
.fab-actions {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-end;
|
|
gap: var(--space-2);
|
|
opacity: 0;
|
|
pointer-events: none;
|
|
transform: translateY(8px);
|
|
transition: opacity var(--transition-base), transform var(--transition-base);
|
|
}
|
|
|
|
.fab-actions--visible {
|
|
opacity: 1;
|
|
pointer-events: auto;
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.fab-action {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-3);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.fab-action__label {
|
|
background-color: var(--color-surface);
|
|
color: var(--color-text-primary);
|
|
font-size: var(--text-sm);
|
|
font-weight: var(--font-weight-medium);
|
|
padding: var(--space-2) var(--space-3);
|
|
border-radius: var(--radius-sm);
|
|
box-shadow: var(--shadow-md);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.fab-action__btn {
|
|
width: 44px;
|
|
height: 44px;
|
|
border-radius: var(--radius-full);
|
|
background-color: var(--color-surface);
|
|
color: var(--color-accent);
|
|
box-shadow: var(--shadow-md);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border: none;
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
transition: background-color var(--transition-fast);
|
|
}
|
|
|
|
.fab-action__btn:hover {
|
|
background-color: var(--color-accent-light);
|
|
}
|