Sprint 6: Karte / Orte / Routen mit GPS-Aufzeichnung
- backend/routes/places.py: CRUD für hundefreundliche Orte (6 Typen) - backend/routes/routen.py: CRUD für Gassi-Routen mit GPS-Track (JSON) - main.py: beide Router eingehängt (/api/places, /api/routes) - api.js: places + routes erweitert (list, update, delete) - pages/places.js: Karte + Liste, Typ-Filter, Ort anlegen/bearbeiten - pages/routes.js: Routen entdecken + GPS-Aufzeichnung mit Stoppuhr - pages/map.js: zentrale Übersichtskarte (Orte + Giftköder, Layer-Toggle) - components.css: Styles für alle drei neuen Seiten - sw.js: by-v19 → by-v20
This commit is contained in:
parent
956e34db88
commit
b9df636535
9 changed files with 1948 additions and 9 deletions
|
|
@ -1330,3 +1330,292 @@ textarea.form-control {
|
|||
color: var(--c-text-secondary);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
ORTE (places.js)
|
||||
============================================================ */
|
||||
.places-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.places-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
padding: var(--space-3) var(--space-4);
|
||||
background: var(--c-surface);
|
||||
border-bottom: 1px solid var(--c-border-light);
|
||||
flex-shrink: 0;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.places-toolbar::-webkit-scrollbar { display: none; }
|
||||
.places-filter {
|
||||
display: flex;
|
||||
gap: var(--space-2);
|
||||
flex: 1;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
.places-filter::-webkit-scrollbar { display: none; }
|
||||
.places-filter-btn {
|
||||
padding: var(--space-1) var(--space-3);
|
||||
border-radius: var(--radius-full);
|
||||
border: 1.5px solid var(--c-border);
|
||||
background: var(--c-surface);
|
||||
color: var(--c-text-secondary);
|
||||
font-size: var(--text-sm);
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: all 0.15s;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.places-filter-btn.active {
|
||||
background: var(--c-primary);
|
||||
border-color: var(--c-primary);
|
||||
color: #fff;
|
||||
}
|
||||
.places-map {
|
||||
height: 42%;
|
||||
flex-shrink: 0;
|
||||
min-height: 180px;
|
||||
}
|
||||
.places-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--c-primary) var(--c-surface);
|
||||
}
|
||||
.places-list-inner {
|
||||
padding: var(--space-3) var(--space-4);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
.places-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
padding: var(--space-3);
|
||||
background: var(--c-surface);
|
||||
border: 1.5px solid var(--c-border-light);
|
||||
border-left: 4px solid var(--typ-color, var(--c-primary));
|
||||
border-radius: var(--radius-lg);
|
||||
cursor: pointer;
|
||||
transition: box-shadow 0.15s;
|
||||
}
|
||||
.places-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
|
||||
.places-card-icon { font-size: 1.6rem; flex-shrink: 0; }
|
||||
.places-card-body { flex: 1; min-width: 0; }
|
||||
.places-card-name { font-weight: var(--weight-semibold); color: var(--c-text); }
|
||||
.places-card-meta { font-size: var(--text-sm); color: var(--c-text-secondary); margin-top: 2px; }
|
||||
.places-card-flags { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-1); }
|
||||
.places-card-arrow { color: var(--c-text-muted); font-size: 1.2rem; }
|
||||
.places-flag {
|
||||
font-size: var(--text-xs);
|
||||
padding: 2px 7px;
|
||||
border-radius: var(--radius-full);
|
||||
background: var(--c-surface-2);
|
||||
color: var(--c-text-secondary);
|
||||
}
|
||||
.places-flag--detail {
|
||||
font-size: var(--text-sm);
|
||||
padding: var(--space-1) var(--space-3);
|
||||
}
|
||||
.places-locate-btn {
|
||||
font-size: 1.3rem;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
border-radius: 50%;
|
||||
background: var(--c-surface);
|
||||
border: 1.5px solid var(--c-border);
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.15);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
ROUTEN (routes.js)
|
||||
============================================================ */
|
||||
.routes-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.routes-tabs {
|
||||
display: flex;
|
||||
border-bottom: 2px solid var(--c-border-light);
|
||||
flex-shrink: 0;
|
||||
background: var(--c-surface);
|
||||
}
|
||||
.routes-tab {
|
||||
flex: 1;
|
||||
padding: var(--space-3) var(--space-4);
|
||||
font-size: var(--text-sm);
|
||||
font-weight: var(--weight-medium);
|
||||
color: var(--c-text-secondary);
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
border-bottom: 3px solid transparent;
|
||||
margin-bottom: -2px;
|
||||
transition: all 0.15s;
|
||||
}
|
||||
.routes-tab.active {
|
||||
color: var(--c-primary);
|
||||
border-color: var(--c-primary);
|
||||
}
|
||||
.routes-tab-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
.routes-map {
|
||||
height: 40%;
|
||||
min-height: 160px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.routes-list {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: var(--space-3) var(--space-4);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--space-2);
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--c-primary) var(--c-surface);
|
||||
}
|
||||
.routes-card {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: var(--space-3);
|
||||
padding: var(--space-3);
|
||||
background: var(--c-surface);
|
||||
border: 1.5px solid var(--c-border-light);
|
||||
border-radius: var(--radius-lg);
|
||||
cursor: pointer;
|
||||
transition: box-shadow 0.15s;
|
||||
}
|
||||
.routes-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
|
||||
.routes-card-num {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 50%;
|
||||
color: #fff;
|
||||
font-weight: var(--weight-bold);
|
||||
font-size: var(--text-sm);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.routes-card-body { flex: 1; min-width: 0; }
|
||||
.routes-card-name { font-weight: var(--weight-semibold); color: var(--c-text); }
|
||||
.routes-card-meta { font-size: var(--text-sm); color: var(--c-text-secondary); margin-top: 2px; }
|
||||
.routes-card-tags { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: var(--space-2); }
|
||||
.routes-badge {
|
||||
font-size: var(--text-xs);
|
||||
padding: 2px 8px;
|
||||
border-radius: var(--radius-full);
|
||||
background: var(--c-surface-2);
|
||||
color: var(--c-text-secondary);
|
||||
}
|
||||
.routes-badge--leicht { background: #dcfce7; color: #15803d; }
|
||||
.routes-badge--mittel { background: #fef9c3; color: #a16207; }
|
||||
.routes-badge--anspruchsvoll{ background: #fee2e2; color: #b91c1c; }
|
||||
.routes-badge--info { background: var(--c-primary-subtle); color: var(--c-primary-dark); }
|
||||
|
||||
/* Aufzeichnungs-Panel */
|
||||
.routes-rec-panel {
|
||||
padding: var(--space-5) var(--space-4);
|
||||
background: var(--c-surface);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.routes-rec-stats {
|
||||
display: flex;
|
||||
gap: var(--space-4);
|
||||
margin-bottom: var(--space-4);
|
||||
justify-content: center;
|
||||
}
|
||||
.routes-rec-stat {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
min-width: 70px;
|
||||
}
|
||||
.routes-rec-stat-val {
|
||||
font-size: 1.8rem;
|
||||
font-weight: var(--weight-bold);
|
||||
color: var(--c-primary);
|
||||
line-height: 1;
|
||||
}
|
||||
.routes-rec-stat-lbl {
|
||||
font-size: var(--text-xs);
|
||||
color: var(--c-text-muted);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
ZENTRALE KARTE (map.js)
|
||||
============================================================ */
|
||||
.map-full-layout {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.map-full {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.map-legend {
|
||||
position: absolute;
|
||||
top: var(--space-3);
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 1000;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: var(--space-1);
|
||||
max-width: calc(100vw - var(--space-6));
|
||||
justify-content: center;
|
||||
}
|
||||
.map-legend-btn {
|
||||
padding: var(--space-1) var(--space-2);
|
||||
border-radius: var(--radius-full);
|
||||
background: rgba(255,255,255,0.92);
|
||||
border: 1.5px solid var(--layer-color, var(--c-border));
|
||||
color: var(--c-text-secondary);
|
||||
font-size: var(--text-xs);
|
||||
cursor: pointer;
|
||||
backdrop-filter: blur(4px);
|
||||
transition: all 0.15s;
|
||||
box-shadow: 0 1px 4px rgba(0,0,0,0.15);
|
||||
}
|
||||
.map-legend-btn.active {
|
||||
background: var(--layer-color, var(--c-primary));
|
||||
color: #fff;
|
||||
border-color: var(--layer-color, var(--c-primary));
|
||||
}
|
||||
.map-locate-btn {
|
||||
position: absolute;
|
||||
bottom: var(--space-6);
|
||||
right: var(--space-4);
|
||||
z-index: 1000;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 50%;
|
||||
background: var(--c-surface);
|
||||
border: 1.5px solid var(--c-border);
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.2);
|
||||
cursor: pointer;
|
||||
font-size: 1.3rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue