Feature: 3 Community-Features — Foto-Challenge, Stamm-Gassis, Rassen-Chip (SW by-v700)

- Foto-Challenge der Woche: DB-Tabellen, routes/challenges.py (current/submit/vote/winners),
  Scheduler-Job jeden Montag 08:00, walks.js Challenge-Tab mit Banner, Galerie, Voting-Herz
- Gassi-Zeiten-Pool: DB-Tabelle gassi_zeiten, routes/gassi_zeiten.py (CRUD + Umkreis),
  walks.js Stamm-Gassis-Tab mit Karten, Wochentag-Selector, Mitmachen→Chat
- Rassen-Treffen-Chip: GET /api/friends/same-breed, dog-profile.js zeigt Chip
  wenn andere User gleiche Rasse haben, Klick → Forum mit Rassen-Suche vorausgefüllt
This commit is contained in:
rene 2026-05-04 21:09:35 +02:00
parent d6206d378e
commit aa4849d947
10 changed files with 1322 additions and 22 deletions

View file

@ -7304,6 +7304,20 @@ svg.empty-state-icon {
color: var(--c-text-secondary);
line-height: 1.2;
}
.exp-kachel-jahr {
font-size: 9px;
color: var(--c-text-muted);
margin-top: 2px;
line-height: 1.2;
}
.exp-kachel-add {
display: flex;
align-items: center;
gap: 2px;
font-size: 10px;
color: var(--c-text-muted);
margin-top: 3px;
}
/* ---- Sektion-Block (Verlauf etc.) ---- */
.exp-section {
@ -7479,6 +7493,36 @@ svg.empty-state-icon {
border-radius: 999px;
padding: 1px 6px;
}
.exp-dog-selector {
display: flex;
gap: 8px;
padding: 10px 16px 4px;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
}
.exp-dog-selector::-webkit-scrollbar { display: none; }
.exp-dog-pill {
flex-shrink: 0;
display: inline-flex;
align-items: center;
gap: 4px;
padding: 5px 14px;
border-radius: 999px;
border: 1px solid var(--c-border);
background: var(--c-bg-card);
color: var(--c-text-secondary);
font-size: var(--text-sm);
font-weight: var(--weight-medium);
cursor: pointer;
white-space: nowrap;
transition: background .15s, color .15s, border-color .15s;
}
.exp-dog-pill.active {
background: var(--c-primary);
color: #fff;
border-color: var(--c-primary);
}
/* Rechte Spalte: Betrag + Löschen-Icon */
.exp-entry-right {
@ -8133,3 +8177,189 @@ svg.empty-state-icon {
0%, 100% { opacity: 0.5; }
50% { opacity: 0.25; }
}
/* ── COMMUNITY-FEATURES ──────────────────────────────────── */
/* Walks-Tab-Bar */
.walks-tab-panel { display: flex; flex-direction: column; min-height: 0; flex: 1; }
/* Foto-Challenge */
.challenge-banner {
background: linear-gradient(135deg, var(--c-amber, #f59e0b), var(--c-primary, #C4843A));
border-radius: var(--radius-lg);
margin: var(--space-4);
overflow: hidden;
}
.challenge-banner-inner {
padding: var(--space-5) var(--space-4);
color: #fff;
}
.challenge-thema {
font-size: var(--text-xl);
font-weight: var(--weight-bold);
line-height: 1.2;
margin-bottom: var(--space-2);
}
.challenge-meta {
font-size: var(--text-sm);
opacity: 0.88;
}
.challenge-gallery {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
gap: var(--space-3);
padding: 0 var(--space-4) var(--space-6);
}
.challenge-sub-card {
background: var(--c-surface);
border-radius: var(--radius-md);
overflow: hidden;
box-shadow: var(--shadow-sm);
}
.challenge-sub-card img {
width: 100%;
aspect-ratio: 1;
object-fit: cover;
display: block;
cursor: pointer;
}
.challenge-sub-info {
padding: var(--space-2);
}
.challenge-sub-user {
font-size: var(--text-xs);
color: var(--c-text-secondary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 2px;
}
.challenge-sub-caption {
font-size: var(--text-xs);
color: var(--c-text);
margin-bottom: var(--space-1);
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.challenge-vote-btn {
border: none;
background: transparent;
color: var(--c-text-secondary);
font-size: var(--text-xs);
cursor: pointer;
padding: 2px 6px;
border-radius: var(--radius-sm);
display: flex;
align-items: center;
gap: 3px;
}
.challenge-vote-btn.voted {
color: var(--c-danger, #ef4444);
}
.challenge-winners { border-top: 1px solid var(--c-border); }
.challenge-winners-row {
display: flex;
gap: var(--space-3);
overflow-x: auto;
padding: var(--space-2) var(--space-4) var(--space-3);
scroll-snap-type: x mandatory;
}
.challenge-winner-chip {
display: flex;
align-items: center;
gap: var(--space-2);
background: var(--c-surface-alt, #fdf6ef);
border-radius: var(--radius-md);
padding: var(--space-2) var(--space-3);
min-width: 160px;
flex-shrink: 0;
scroll-snap-align: start;
}
.challenge-winner-chip img {
width: 40px;
height: 40px;
border-radius: var(--radius-full);
object-fit: cover;
flex-shrink: 0;
}
/* Wochentag-Selector */
.wd-selector {
display: flex;
gap: var(--space-2);
flex-wrap: wrap;
}
.wd-btn {
display: flex;
align-items: center;
gap: 4px;
cursor: pointer;
padding: 4px 10px;
border: 1.5px solid var(--c-border);
border-radius: var(--radius-full);
font-size: var(--text-sm);
user-select: none;
transition: background .15s, border-color .15s;
}
.wd-btn input { display: none; }
.wd-btn:has(input:checked) {
background: var(--c-primary, #C4843A);
border-color: var(--c-primary, #C4843A);
color: #fff;
}
/* Gassi-Zeit-Karten */
.gassi-zeit-card {
display: flex;
align-items: center;
gap: var(--space-3);
padding: var(--space-3) var(--space-4);
border-bottom: 1px solid var(--c-border);
background: var(--c-surface);
}
.gz-avatar {
width: 48px;
height: 48px;
border-radius: var(--radius-full);
overflow: hidden;
flex-shrink: 0;
background: var(--c-surface-alt);
display: flex;
align-items: center;
justify-content: center;
}
.gz-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gz-avatar-placeholder { font-size: 1.5rem; color: var(--c-text-secondary); }
.gz-body { flex: 1; min-width: 0; }
.gz-name {
font-weight: var(--weight-semibold);
font-size: var(--text-sm);
display: flex;
align-items: center;
gap: var(--space-1);
flex-wrap: wrap;
}
.gz-meta { font-size: var(--text-xs); color: var(--c-text-secondary); margin-top: 2px; }
.gz-notiz { font-size: var(--text-xs); color: var(--c-text-secondary); margin-top: 2px; font-style: italic; }
.gz-actions { display: flex; gap: var(--space-1); flex-shrink: 0; }
/* Rassen-Community-Chip */
.breed-community-chip {
display: inline-flex;
align-items: center;
gap: var(--space-1);
background: var(--c-surface-alt, #fdf6ef);
border: 1.5px solid var(--c-amber, #f59e0b);
border-radius: var(--radius-full);
padding: 6px 16px;
font-size: var(--text-sm);
font-weight: var(--weight-medium);
color: var(--c-text);
cursor: pointer;
transition: background .15s;
}
.breed-community-chip:hover, .breed-community-chip:active {
background: #fff3e0;
}