feat(ui,roundtrip): modern neutral “Apple Glass” UI, scenic round trips, and isochrone guidance
Some checks failed
build-and-push / docker (push) Failing after 10m2s

- UI (neutral minimal, glass-like)
  - Rewrote app shell and control panel in [app/web/static/index.html](cci:7://file:///home/pedan/freemoto/app/web/static/index.html:0:0-0:0)
  - Modernized responsive styles in [app/web/static/styles.css](cci:7://file:///home/pedan/freemoto/app/web/static/styles.css:0:0-0:0)
  - Proper internal scrolling for control panel, suggestions, waypoints, and directions sheet
  - Improved dark mode, spacing, and visual polish

- Round Trip generation
  - Direction preference (N/E/S/W) with biased waypoint bearings ([route.js](cci:7://file:///home/pedan/freemoto/app/web/static/route.js:0:0-0:0))
  - Ferry avoidance by default on round trips; added strong ferry cost
  - Coastal safety: reverse-geocode water check and automatic inland adjustment for generated waypoints
  - New “Scenic optimizer” option: generate candidate loops, route them, score twistiness, pick the best
    - Heading-change/turn-density based scoring using decoded polyline

- Isochrone-guided loops
  - Backend: added `/isochrone` proxy in [app/web/main.go](cci:7://file:///home/pedan/freemoto/app/web/main.go:0:0-0:0) (derives Valhalla base from `VALHALLA_URL`)
  - Frontend: optional “Use isochrone guidance” + time (minutes); sample preferred sector of polygon

- Settings persistence and live updates
  - Direction, scenic, isochrone, and distance persist via localStorage
  - Changing options regenerates round trips when enabled

- Docker/Build
  - Confirmed multi-arch build (amd64/arm64) and push to git.ztsw.de/pedan/freemoto/freemoto-web:latest

Refs: [index.html](cci:7://file:///home/pedan/freemoto/app/web/static/index.html:0:0-0:0), [styles.css](cci:7://file:///home/pedan/freemoto/app/web/static/styles.css:0:0-0:0), [route.js](cci:7://file:///home/pedan/freemoto/app/web/static/route.js:0:0-0:0), [main.js](cci:7://file:///home/pedan/freemoto/app/web/static/main.js:0:0-0:0), [app/web/main.go](cci:7://file:///home/pedan/freemoto/app/web/main.go:0:0-0:0), [Dockerfile](cci:7://file:///home/pedan/freemoto/Dockerfile:0:0-0:0)
This commit is contained in:
2025-09-19 14:45:21 +02:00
parent c8aa3fb3b2
commit c37ca4e8b4
5 changed files with 494 additions and 38 deletions

View File

@@ -14,13 +14,10 @@
--shadow-2: 0 10px 30px rgba(2, 8, 20, 0.12);
}
html, body {
height: 100%;
}
html, body { height: 100%; }
body {
margin: 0;
overflow: hidden;
overflow: hidden; /* map-focused app; internal sections handle their own scroll */
background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
color: #0f172a;
}
@@ -66,6 +63,8 @@ body {
box-shadow: var(--shadow-2);
padding: 10px 12px;
transition: max-height 200ms ease, transform 200ms ease, padding 200ms ease;
overflow: auto; /* allow scroll when content grows */
max-height: 60vh; /* default for mobile */
}
.nav-panel .form-control,
.nav-panel .btn {
@@ -106,7 +105,7 @@ body {
.sheet-card {
border-radius: var(--panel-radius) var(--panel-radius) 0 0;
max-height: 60vh;
overflow: hidden;
overflow: hidden; /* header fixed; body scrolls */
box-shadow: var(--shadow-2);
}
.sheet .handle {
@@ -124,10 +123,7 @@ body {
padding: 4px 8px;
border-bottom: 1px solid #eef2f6;
}
.sheet-body {
overflow: auto;
max-height: calc(60vh - 42px);
}
.sheet-body { overflow: auto; max-height: calc(60vh - 42px); }
#directionsSheet { display: none; }
.sheet.collapsed .sheet-card { max-height: 28vh; }
.sheet.collapsed .sheet-body { max-height: calc(28vh - 42px); }
@@ -172,8 +168,8 @@ body {
left: 8px;
right: 8px;
bottom: 8px;
max-height: 48vh;
overflow: visible; /* allow suggestion dropdowns to overflow */
max-height: 56vh; /* slightly taller for more controls */
overflow: auto; /* scroll internally */
}
.nav-panel.collapsed {
max-height: 56px; /* show a small header */
@@ -185,16 +181,18 @@ body {
.section-title { font-size: 0.95rem; }
}
/* Desktop layout refinements */
/* Desktop/tablet layout refinements */
@media (min-width: 768px) {
.nav-panel {
top: 88px;
bottom: auto;
bottom: 24px; /* allow taller panel while preserving map footer space */
left: 24px;
right: auto;
width: 560px;
width: min(560px, 42vw);
border-radius: var(--panel-radius);
padding: 16px;
max-height: calc(100vh - 88px - 24px);
overflow: auto; /* scroll the panel content when needed */
}
.nav-panel .form-control,
.nav-panel .btn {
@@ -205,6 +203,18 @@ body {
}
}
/* Make long lists scrollable inside the panel */
.nav-panel .list-group {
max-height: 34vh;
overflow: auto;
}
/* Scrollbar styling for WebKit browsers */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background-color: rgba(100, 116, 139, 0.5); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background-color: rgba(71, 85, 105, 0.7); }
*::-webkit-scrollbar-track { background: transparent; }
/* Dark theme */
/* Improved dark mode for readability */
[data-theme="dark"] :root {