{# Vendored map partial (authored in glidertest first; part of the vendored set, see MANIFEST.txt; byte-identical across the family, ctdcast main the source of truth). Package-neutral: it knows only a generic payload of coloured tracks, each with an `href` and info-panel HTML, plus optional coastline GeoJSON. Rows elsewhere on the page opt into hover-linking by carrying `data-track-id=""` matching a payload `id`; nothing here mentions missions, casts or dives. #} {# Styles for the map; call from the page's head_extra block. `leaflet_css` is the inlined Leaflet stylesheet so the map needs no network at view time. #} {% macro map_styles(leaflet_css, map_height) %} {% endmacro %} {# The map itself; call from the page content. `payload_json`, `coastline_json` and `bounds_json` are pre-serialised JSON strings (coastline/bounds may be the literal "null"); `fallback_png` is a base64 PNG shown before Leaflet starts, in print, and with no JavaScript; `leaflet_js` is the inlined Leaflet library. #} {% macro track_map(payload_json, coastline_json, bounds_json, fallback_png, leaflet_js) %}
{% if fallback_png %}Mission tracks{% endif %}
Hover a track or a row.
{% endmacro %}