diff --git a/layouts/shortcodes/leaflet-map.html b/layouts/shortcodes/leaflet-map.html index acae842..2af1c3f 100644 --- a/layouts/shortcodes/leaflet-map.html +++ b/layouts/shortcodes/leaflet-map.html @@ -2,7 +2,7 @@ Syntax summary: - {{< leaflet-map centerLat=FLOAT centerLon=FLOAT zoom=INT >}} + {{< leaflet-map centerLat=FLOAT centerLon=FLOAT zoom=INT width="STRING" height="STRING" >}} {{< leaflet-layer id="STRING" apiKey="STRING" >}} @@ -22,6 +22,12 @@ Map options: Center point coordinates of the map as decimal values. Optional iif tracks or markers are given. zoom: Zoom level of the map. Optional iif tracks or markers are given. + width: + Width of the map, including CSS units (e.g. "50%", "300px"). + Optional, defaults to "600px". + height: + Height of the map, including CSS units (e.g. "50%", "300px"). + Optional, defaults to "400px". Layer options: @@ -84,7 +90,7 @@ Elevation profile options: {{ $uniqueId := .Ordinal | safeJS }} -
+
diff --git a/static/css/hugo-mod-leaflet.css b/static/css/hugo-mod-leaflet.css index df48abd..9fcef81 100644 --- a/static/css/hugo-mod-leaflet.css +++ b/static/css/hugo-mod-leaflet.css @@ -1,6 +1,4 @@ .map-container { - height: 400px; - width: 600px; padding: 6px 6px 18px 6px; background: #eee; border-radius: 8px;