From 05e5977ea238b06957fb0e632f7f546cf09c25f5 Mon Sep 17 00:00:00 2001 From: Martin Rubli Date: Sun, 15 Oct 2023 16:38:24 +0200 Subject: [PATCH] static: Add basic styles requires for quip-maps --- static/css/hugo-mod-leaflet.css | 89 +++++++++++++++++++++++++++++ static/images/resize-handle-se.png | Bin 0 -> 265 bytes 2 files changed, 89 insertions(+) create mode 100644 static/css/hugo-mod-leaflet.css create mode 100644 static/images/resize-handle-se.png diff --git a/static/css/hugo-mod-leaflet.css b/static/css/hugo-mod-leaflet.css new file mode 100644 index 0000000..dee753f --- /dev/null +++ b/static/css/hugo-mod-leaflet.css @@ -0,0 +1,89 @@ +.map-container { + height: 400px; + width: 600px; + padding: 6px 6px 18px 6px; + background: #eee; + border-radius: 8px; +} + +.ui-icon { + background-image: url('/images/resize-handle-se.png'); + background-position: -1px -1px; + z-index: 400 !important; /* make sure it overlays the map since we don't have a border yet */ +} + +.map { + height: 100%; + border-radius: 8px; +} + +.map g.legend, g.legend-hover { + display: none; +} + +.map .heightgraph-container { + border-radius: 8px; +} + +/* Heightgraph grid lines */ +.map .heightgraph .grid .tick line { + stroke: #ccc; +} + +.map-attribution { + position: absolute; + left: 0px; + bottom: 3px; + font-size: 11px; + font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; +} + +.map-attribution a { + color: #0078A8; + text-decoration: none; +} + +.leaflet-right .leaflet-control { + margin: 6px; +} + +/* Heightgraph data point selector */ +svg.heightgraph-container .select-info { + display: none; +} + +svg.heightgraph-container .select-symbol { + display: none; +} + +/* Map style when maximized */ + +.map.leaflet-maximized { + height: 90% !important; + top: 5%; + border: 2px solid white; + border-radius: 8px; + z-index: 1; /* above the backdrop */ +} + +.map-backdrop { + position: fixed; + width: 100%; + height: 100%; + top: 0; + left: 0; + background-color: rgba(0, 0, 0, 0.9); +} + +.map ~ .map-backdrop { + display: none; +} + +.map.leaflet-maximized ~ .map-backdrop { + display: block; + z-index: 0; +} + +.map.leaflet-maximized ~ .map-attribution { + display: none; +} diff --git a/static/images/resize-handle-se.png b/static/images/resize-handle-se.png new file mode 100644 index 0000000000000000000000000000000000000000..c6869e2e82f6eec4ef220f9c1a37b586fd74fe2f GIT binary patch literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$1|-8uW1a&kmUKs7M+SzC{oH>NS%G}c0*}aI z1_r)EAj~ML;ne^Xlq_+LC<)F_D=AMbN@XZW%*-p%%S$a$Fwry6Gc;Js#dQFvsLj*G zF+?M{xBo70g91;B;>V-r(?8sFIbI;8_8^_@u}$Bz*jwyL8Wo(L(S5Jme=nAJ9O8A; ziDPr$uTz%uD@q>fSZ!jxJTItfL!#^J)LR0EGuAvy?pPvWKDph)l