docs: add mobile-ux session learnings and shared partial architecture
This commit is contained in:
@@ -35,6 +35,28 @@ The site is structured around Trip entities. Key facts:
|
||||
- GPX route files live as media on the trip page itself, served via leaflet-gpx CDN
|
||||
- Manage GPX files (view/upload/delete) at `/gpx-manager` — requires admin login; filenames are auto-slugified on upload
|
||||
|
||||
### Shared feed-map partial
|
||||
|
||||
The mini-map above the feed is shared across two pages via a Twig partial:
|
||||
|
||||
- **Partial:** `user/themes/intotheeast/templates/partials/feed-map.html.twig`
|
||||
- **Used by:** `dailies.html.twig` and `stories.html.twig`
|
||||
- **NOT used by:** `trip.html.twig` (uses its own `#trip-map` / `.home-map-col` layout)
|
||||
|
||||
**Parameters (passed via `{% include ... with {...} only %}`):**
|
||||
|
||||
| Parameter | Type | Description |
|
||||
|---|---|---|
|
||||
| `map_entries` | array | `[{lat, lng, title, slug, url, type, force_connect, transport_mode}]` |
|
||||
| `map_id` | string | HTML id for map div: `'feed-map'` or `'stories-map'` |
|
||||
| `map_var` | string | JS global variable: `'feedMap'` or `'storiesMap'` |
|
||||
| `link_href` | string\|null | "View full map" link URL; `null` hides it |
|
||||
| `card_prefix` | string | Scroll-to ID prefix: `'entry-'` (dailies) or `'story-'` (stories) |
|
||||
| `trip_page` | Page | Trip page object for autoconnect setting |
|
||||
| `show_journey` | bool | `true` draws the route connector; `false` skips it |
|
||||
|
||||
The partial always: starts attribution collapsed, shows the fullscreen button (mobile-only, CSS `display:none` ≥769px), and on marker click scrolls to `#<card_prefix><slug>` + flashes `.is-highlighted`.
|
||||
|
||||
### GPX file management
|
||||
|
||||
GPX files are stored as page media on the trip page (`user/pages/01.trips/<slug>/`). They are picked up automatically by `map.html.twig` via `trip_page.media.all`.
|
||||
|
||||
Reference in New Issue
Block a user