layouts: map: Change defaults for width/height to auto and 50vh

This commit is contained in:
Martin Rubli
2023-10-17 22:58:01 +02:00
parent 78588d0c2d
commit cad859304d

View File

@@ -24,10 +24,10 @@ Map options:
Zoom level of the map. Optional iif tracks or markers are given. Zoom level of the map. Optional iif tracks or markers are given.
width: width:
Width of the map, including CSS units (e.g. "50%", "300px"). Width of the map, including CSS units (e.g. "50%", "300px").
Optional, defaults to "600px". Optional, defaults to "auto".
height: height:
Height of the map, including CSS units (e.g. "50%", "300px"). Height of the map, including CSS units (e.g. "50%", "300px").
Optional, defaults to "400px". Optional, defaults to "50vh".
Layer options: Layer options:
@@ -90,7 +90,7 @@ Elevation profile options:
{{ $uniqueId := .Ordinal | safeJS }} {{ $uniqueId := .Ordinal | safeJS }}
<div id="map_container_{{ $uniqueId }}" class="map-container" style="width: {{ .Get "width" | default "600px" }}; height: {{ .Get "height" | default "400px" }};"> <div id="map_container_{{ $uniqueId }}" class="map-container" style="width: {{ .Get "width" | default "auto" }}; height: {{ .Get "height" | default "50vh" }};">
<div id="map_{{ $uniqueId }}" class="map"></div> <div id="map_{{ $uniqueId }}" class="map"></div>
<div id="map_backdrop_{{ $uniqueId }}" class="map-backdrop"></div> <div id="map_backdrop_{{ $uniqueId }}" class="map-backdrop"></div>
<div id="map_attribution_{{ $uniqueId }}" class="map-attribution"></div> <div id="map_attribution_{{ $uniqueId }}" class="map-attribution"></div>