330 lines
16 KiB
ERB
330 lines
16 KiB
ERB
<div id="app">
|
||
<header class="topbar">
|
||
<span class="topbar__brand" title="rev <%= revision %>">MapTool</span>
|
||
<div class="topbar__search"></div>
|
||
<span class="topbar__center"></span>
|
||
<div class="sun-chart" hidden></div>
|
||
<span class="topbar__offline-status" hidden></span>
|
||
<button type="button" class="topbar__update" hidden></button>
|
||
<button type="button" class="topbar__night" hidden></button> <!-- the cycle On the map's Theme row and drive mode use; no place of its own in the bar -->
|
||
<div class="topbar__auth">
|
||
<% if logged_in %>
|
||
<span><%= user %></span>
|
||
<a href="/logout">Log out</a>
|
||
<% else %>
|
||
<a href="/login">Log in</a>
|
||
<% end %>
|
||
</div>
|
||
</header>
|
||
|
||
<div class="app-body">
|
||
<nav id="sidebar" class="sidebar"></nav>
|
||
<div id="map"></div>
|
||
</div>
|
||
|
||
<footer class="statusbar">
|
||
<span class="statusbar__coords"></span>
|
||
<span class="statusbar__cursor"></span>
|
||
<span class="statusbar__zoom"></span>
|
||
<span class="statusbar__rev">rev <%= revision %></span>
|
||
<span class="statusbar__sun" title="Sun & moon" hidden></span>
|
||
</footer>
|
||
</div>
|
||
|
||
<div id="profile-panel" class="profile-panel" hidden>
|
||
<div class="profile-panel__header">
|
||
<strong class="profile-panel__title"></strong>
|
||
<span class="profile-panel__stats"></span>
|
||
<button type="button" class="profile-panel__close" aria-label="Close">×</button>
|
||
</div>
|
||
<div class="profile-panel__charts"></div>
|
||
</div>
|
||
|
||
<div id="trail-panel" class="trail-panel" hidden>
|
||
<button type="button" class="trail-panel__close" aria-label="Close">×</button>
|
||
<div class="trail-panel__body"></div>
|
||
</div>
|
||
|
||
<div id="gpx-panel" class="gpx-panel" hidden<%= " data-sync-client" if sync_client %>>
|
||
<div class="gpx-panel__header">
|
||
<strong>Library</strong>
|
||
<div class="gpx-panel__actions">
|
||
<button type="button" class="gpx-panel__action" data-action="new-folder" title="New folder" aria-label="New folder"></button>
|
||
<button type="button" class="gpx-panel__action" data-action="upload" title="Upload GPX/FIT/TCX/GeoJSON file" aria-label="Upload GPX/FIT/TCX/GeoJSON file"></button>
|
||
<button type="button" class="gpx-panel__close" aria-label="Close">×</button>
|
||
</div>
|
||
</div>
|
||
|
||
<input type="file" class="gpx-file-input" accept=".gpx,.fit,.tcx,.geojson,.zip" multiple hidden>
|
||
<p class="gpx-upload__status" hidden></p>
|
||
|
||
<!-- Find first (the Design canvas' Library): filled by GpxPanelControl. -->
|
||
<div class="lib-find">
|
||
<input type="search" class="lib-find__input" placeholder="Find a point, track, folder…" aria-label="Find in the library">
|
||
<div class="lib-find__kinds" role="group" aria-label="What"></div>
|
||
<div class="lib-find__bar">
|
||
<button type="button" class="lib-chip" data-find="shown" aria-pressed="false">Shown on the map</button>
|
||
<span class="lib-seg" role="group" aria-label="View">
|
||
<button type="button" data-mode="folders" aria-pressed="true">Folders</button>
|
||
<button type="button" data-mode="list" aria-pressed="false">List</button>
|
||
</span>
|
||
</div>
|
||
</div>
|
||
<div class="lib-crumb" hidden></div>
|
||
<div class="gpx-tree"></div>
|
||
<div class="gpx-legend" hidden></div>
|
||
<div class="lib-foot">
|
||
<span class="lib-foot__text"></span>
|
||
<button type="button" data-action="hide-all">Hide all</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="overlays-panel" class="basemap-panel" hidden>
|
||
<div class="basemap-panel__header">
|
||
<strong>On the map</strong>
|
||
<button type="button" class="basemap-panel__close" aria-label="Close">×</button>
|
||
</div>
|
||
<!-- On the map (the Design canvas): the map itself first — online or the
|
||
offline one (LayerToggleControl, map.js) — then the overlays. -->
|
||
<div class="onthemap-map">
|
||
<div class="overlays-panel__group">Map</div>
|
||
<div class="onthemap-row">
|
||
<span class="onthemap-row__icon" aria-hidden="true">▦</span>
|
||
<span class="onthemap-row__text"><b>Map</b><small>online or this server's offline map</small></span>
|
||
<span class="basemap-panel__sources onthemap-seg" role="group" aria-label="Map">
|
||
<button type="button" class="basemap-panel__option" data-style="online">Online</button>
|
||
<button type="button" class="basemap-panel__option" data-style="offline">Offline</button>
|
||
</span>
|
||
</div>
|
||
<div class="onthemap-row">
|
||
<span class="onthemap-row__icon" aria-hidden="true">◑</span>
|
||
<span class="onthemap-row__text"><b>Theme</b><small>day / dusk / night, auto by the sun</small></span>
|
||
<button type="button" class="onthemap-theme"></button>
|
||
</div>
|
||
<div class="onthemap-row">
|
||
<span class="onthemap-row__icon" aria-hidden="true">?</span>
|
||
<a class="onthemap-row__text basemap-panel__link" href="/symbols.html" target="_blank"><b>Legend & symbols ↗</b><small>what the map's colours and symbols mean</small></a>
|
||
</div>
|
||
</div>
|
||
<!-- Each item is a live layer refetched/toggled from its own source as
|
||
the map moves, not a file to add/remove/reorder — a plain on/off
|
||
list, no upload/new-folder actions the way Tracks & Points has.
|
||
Populated by OverlaysControl#mount (public/js/overlays.js), not
|
||
here — Radar's item needs its own scrub/forecast markup built by
|
||
RadarControl itself (radar.js), so all three items go through the
|
||
same "control owns its own <li>" path rather than half static
|
||
markup, half dynamic. -->
|
||
<ul class="overlays-panel__list"></ul>
|
||
</div>
|
||
|
||
<div id="livetrack-panel" class="basemap-panel" hidden>
|
||
<div class="basemap-panel__header">
|
||
<strong>LiveTrack sessions</strong>
|
||
<button type="button" class="basemap-panel__close" aria-label="Close">×</button>
|
||
</div>
|
||
<ul class="livetrack-panel__list"></ul>
|
||
</div>
|
||
|
||
<div id="debug-panel" class="basemap-panel" hidden>
|
||
<div class="basemap-panel__header">
|
||
<strong>Status / debug</strong>
|
||
<button type="button" class="basemap-panel__close" aria-label="Close">×</button>
|
||
</div>
|
||
<div class="basemap-panel__list">
|
||
<a class="basemap-panel__link" href="/status.html" target="_blank">Server status (all endpoints) ↗</a>
|
||
<a class="basemap-panel__link" href="/can.html" target="_blank">CANopen diagnostics ↗</a>
|
||
<a class="basemap-panel__link" href="/sim.html" target="_blank">GNSS simulation ↗</a>
|
||
<button type="button" class="basemap-panel__link debug-panel__update-check" hidden>Check for an update now</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="plugins-panel" class="basemap-panel" hidden>
|
||
<div class="basemap-panel__header">
|
||
<strong>Import plugins</strong>
|
||
<button type="button" class="basemap-panel__close" aria-label="Close">×</button>
|
||
</div>
|
||
<!-- Filled by PluginsControl (public/js/plugins.js), logged-in only. -->
|
||
<div class="plugins-panel__body">
|
||
<p class="plugins-panel__hint">Runs for whatever area is currently on screen.</p>
|
||
<ul class="plugins-panel__list"></ul>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="route-panel" class="basemap-panel route-panel" hidden>
|
||
<div class="basemap-panel__header">
|
||
<strong>Route</strong>
|
||
<!-- Icons are added by RoutePanelControl (public/js/icons.js). -->
|
||
<span class="route-panel__head-actions">
|
||
<button type="button" data-action="reverse">Reverse</button>
|
||
<button type="button" data-action="clear">Clear</button>
|
||
</span>
|
||
<button type="button" class="basemap-panel__close" aria-label="Close">×</button>
|
||
</div>
|
||
<!-- Filled by RoutePanelControl (public/js/route.js), laid out after the
|
||
Design canvas' Desktop artboard: the points with their legs, adding
|
||
one, the totals, the vehicle and what to avoid, the long parts folded,
|
||
saving at the bottom. -->
|
||
<div class="route-panel__body">
|
||
<p class="route-panel__editing" hidden></p>
|
||
<!-- the itinerary (the Design canvas' Itinerary): the shared trip's name,
|
||
when it leaves; a day after a night stop starts at "Days start"; its note -->
|
||
<div class="route-panel__trip">
|
||
<input type="text" name="name" maxlength="80" placeholder="Trip name" aria-label="Trip name">
|
||
<label>Leave <input type="datetime-local" name="start"></label>
|
||
<label>Days start <input type="time" name="day_start" placeholder="09:00"></label>
|
||
<label>Fuel <input type="number" name="fuel_price" min="0" max="10" step="0.01" placeholder="–"> €/l</label>
|
||
<label>Budget <input type="number" name="budget" min="0" max="1000000" step="10" placeholder="–"> €</label>
|
||
<textarea name="note" rows="1" maxlength="2000" placeholder="The trip's note" aria-label="The trip's note"></textarea>
|
||
</div>
|
||
<!-- is the trip ready (the canvas' Plan, Check): each problem with its stop -->
|
||
<details class="route-panel__fold route-panel__check" hidden>
|
||
<summary>Check <span class="route-panel__fold-meta"></span></summary>
|
||
<ul></ul>
|
||
</details>
|
||
<!-- the money (the canvas' Plan, Costs): planned from the route and the stops vs paid -->
|
||
<details class="route-panel__fold route-panel__costs" hidden>
|
||
<summary>Costs <span class="route-panel__fold-meta"></span></summary>
|
||
<ul></ul>
|
||
</details>
|
||
<ol class="route-panel__points"></ol>
|
||
<div class="route-panel__add">
|
||
<button type="button" class="route-panel__chip route-panel__chip--add" data-action="search">+ Search</button>
|
||
<button type="button" class="route-panel__chip" data-action="saved-point">Saved point</button>
|
||
<button type="button" class="route-panel__chip" data-action="position">My position</button>
|
||
<span class="route-panel__hint">or click the map</span>
|
||
</div>
|
||
<div class="route-panel__saved" hidden>
|
||
<input type="search" placeholder="Search saved points" aria-label="Search saved points">
|
||
<ul></ul>
|
||
</div>
|
||
<div class="route-panel__totals" hidden></div>
|
||
<p class="route-panel__summary"></p>
|
||
<ul class="route-panel__countries" hidden></ul>
|
||
<div class="route-panel__row route-panel__avoid">
|
||
<span class="route-panel__label">Avoid</span>
|
||
<label class="route-panel__chip"><input type="checkbox" name="tolls"> Tolls</label>
|
||
<label class="route-panel__chip"><input type="checkbox" name="highways"> Motorways</label>
|
||
<label class="route-panel__chip"><input type="checkbox" name="ferries"> Ferries</label>
|
||
<label class="route-panel__chip"><input type="checkbox" name="unpaved"> Unpaved</label>
|
||
</div>
|
||
<details class="route-panel__fold route-panel__directions" hidden>
|
||
<summary>Directions <span class="route-panel__fold-meta"></span></summary>
|
||
<ol></ol>
|
||
</details>
|
||
<details class="route-panel__fold">
|
||
<summary>Reach <span class="route-panel__fold-meta">30 min · 1 h · 2 h</span></summary>
|
||
<div class="route-panel__reach">
|
||
<span>Reach in</span>
|
||
<select>
|
||
<option value="30">30 min</option>
|
||
<option value="60" selected>1 h</option>
|
||
<option value="120">2 h</option>
|
||
<option value="30,60,120">30 min · 1 h · 2 h</option>
|
||
</select>
|
||
<button type="button" data-action="reach">Show</button>
|
||
<button type="button" data-action="reach-clear" hidden>Hide</button>
|
||
</div>
|
||
<p class="route-panel__reach-status" hidden></p>
|
||
</details>
|
||
</div>
|
||
<div class="route-panel__footer">
|
||
<button type="button" class="route-panel__primary" data-action="save" hidden>Save to library</button>
|
||
<button type="button" class="route-panel__secondary route-panel__profile" hidden>Elevation profile</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div id="offline-data-panel" class="basemap-panel" hidden>
|
||
<div class="basemap-panel__header">
|
||
<strong>Offline data</strong>
|
||
<button type="button" class="basemap-panel__close" aria-label="Close">×</button>
|
||
</div>
|
||
<!-- Two rows (map data / terrain data), each its own status text +
|
||
"Regenerate for current view" button — built by
|
||
OfflineDataControl#mount (public/js/offline_data.js), same
|
||
"control owns its content" story as the Overlays panel. -->
|
||
<div class="offline-data-panel__body"></div>
|
||
</div>
|
||
|
||
<!-- Profiles (cars and activities): set once, rarely opened again (the
|
||
Design canvas' Vehicle). The map's bottom-left chip picks one (route.js). -->
|
||
<dialog class="profiles" aria-label="Profiles">
|
||
<div class="profiles__head"><h2>Profiles</h2><button type="button" class="profiles__close" aria-label="Close">✕</button></div>
|
||
<div class="profiles__list"><ul></ul><button type="button" data-action="vehicle-add">+ New profile</button></div>
|
||
<fieldset class="profiles__form">
|
||
<label class="route-panel__vehicle-name">Name <input type="text" name="name" maxlength="40"></label>
|
||
<label>Type
|
||
<select name="type">
|
||
<option value="car">Car</option>
|
||
<option value="bicycle">Bicycle</option>
|
||
<option value="foot">On foot</option>
|
||
</select>
|
||
</label>
|
||
<!-- data-for: the types a field applies to, the rest are hidden. -->
|
||
<label data-for="car">Height <input type="number" name="height" step="0.1" min="1" max="6" placeholder="–"> m</label>
|
||
<label data-for="car">Width <input type="number" name="width" step="0.1" min="1" max="4" placeholder="–"> m</label>
|
||
<label data-for="car">Length <input type="number" name="length" step="0.5" min="2" max="25" placeholder="–"> m</label>
|
||
<label data-for="car">Weight <input type="number" name="weight" step="0.1" min="0.5" max="60" placeholder="–"> t</label>
|
||
<label data-for="car">Wheelbase <input type="number" name="wheelbase" step="0.01" min="1" max="10" placeholder="–"> m</label>
|
||
<label data-for="car">Track <input type="number" name="track" step="0.01" min="1" max="3" placeholder="–" title="Between the wheels' centres, side to side"> m</label>
|
||
<label data-for="car">Uses <input type="number" name="consumption" step="0.1" min="1" max="100" placeholder="–" title="Per 100 km: litres (kWh for an electric car), for the trip's costs"> /100 km</label>
|
||
<label data-for="car">Ramps <input type="text" name="ramps" maxlength="30" placeholder="3 6 9" title="The levelling ramps' steps, cm"> cm</label>
|
||
<label data-for="bicycle">Bike
|
||
<select name="bicycle_type">
|
||
<option value="Road">Road</option>
|
||
<option value="Hybrid">Trekking</option>
|
||
<option value="Cross">Gravel</option>
|
||
<option value="Mountain">MTB</option>
|
||
</select>
|
||
</label>
|
||
<label data-for="bicycle foot">Speed <input type="number" name="speed" step="0.5" min="1" max="60" placeholder="–"> km/h</label>
|
||
<label data-for="bicycle foot">Hills
|
||
<select name="hills">
|
||
<option value="">Default</option>
|
||
<option value="0">Avoid</option>
|
||
<option value="1">Seek</option>
|
||
</select>
|
||
</label>
|
||
<label data-for="foot">Up to
|
||
<select name="sac">
|
||
<option value="">T1 hiking</option>
|
||
<option value="2">T2 mountain hiking</option>
|
||
<option value="3">T3 demanding</option>
|
||
<option value="4">T4 alpine</option>
|
||
<option value="5">T5 demanding alpine</option>
|
||
<option value="6">T6 difficult alpine</option>
|
||
</select>
|
||
</label>
|
||
<label data-for="car">Fuel
|
||
<select name="fuel">
|
||
<option value="">–</option>
|
||
<option value="petrol">Petrol</option>
|
||
<option value="diesel">Diesel</option>
|
||
<option value="lpg">LPG</option>
|
||
<option value="cng">CNG</option>
|
||
<option value="electric">Electric</option>
|
||
<option value="hybrid">Hybrid</option>
|
||
</select>
|
||
</label>
|
||
<label data-for="car">Euro
|
||
<select name="euro">
|
||
<option value="">–</option>
|
||
<option value="3">Euro 3</option>
|
||
<option value="4">Euro 4</option>
|
||
<option value="5">Euro 5</option>
|
||
<option value="6">Euro 6</option>
|
||
<option value="6d">Euro 6d</option>
|
||
</select>
|
||
</label>
|
||
<label data-for="car" class="profiles__wide">Stickers <input type="text" name="stickers" maxlength="80" placeholder="DE green 4 · FR Crit'Air 2"></label>
|
||
<div data-for="car" class="profiles__wide profiles__vignettes">
|
||
<span>Vignettes & toll units</span>
|
||
<ul></ul>
|
||
<button type="button" data-action="vignette-add">+ Add</button>
|
||
</div>
|
||
<p class="route-panel__vehicle-hint" data-for="car">Empty: no limit. Over 3.5 t routes as a truck.</p>
|
||
<p class="route-panel__vehicle-hint" data-for="bicycle foot">Empty speed: the usual one for the bike or walking.</p>
|
||
<button type="button" data-action="vehicle-delete" class="profiles__delete">Delete this profile</button>
|
||
</fieldset>
|
||
<div class="profiles__foot">Stored on this server for every screen; changes save as you go.</div>
|
||
</dialog>
|