From 1d94ebbaa3c46e141a06d8f850b72fa9057b5fba Mon Sep 17 00:00:00 2001 From: David Larlet Date: Mon, 16 Oct 2023 16:28:41 -0400 Subject: [PATCH] Responsiveness of the header when logged in --- umap/static/umap/js/umap.controls.js | 6 ++++-- umap/static/umap/map.css | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/umap/static/umap/js/umap.controls.js b/umap/static/umap/js/umap.controls.js index 68e2030f..9ba1e37d 100644 --- a/umap/static/umap/js/umap.controls.js +++ b/umap/static/umap/js/umap.controls.js @@ -946,7 +946,9 @@ L.U.Map.include({ L.DomUtil.createLink( 'umap-user', rightContainer, - L._(`My Dashboard ({username})`, { username: this.options.user.name }), + L._(`My Dashboard ({username})`, { + username: this.options.user.name, + }), this.options.user.url ) } @@ -954,7 +956,7 @@ L.U.Map.include({ const controlEditCancel = L.DomUtil.createButton( 'leaflet-control-edit-cancel', rightContainer, - L._('Cancel edits'), + L.DomUtil.add('span', '', null, L._('Cancel edits')), this.askForReset, this ) diff --git a/umap/static/umap/map.css b/umap/static/umap/map.css index 5a8532e2..cf9bd419 100644 --- a/umap/static/umap/map.css +++ b/umap/static/umap/map.css @@ -1549,6 +1549,7 @@ a.add-datalayer:hover, @media all and (max-width: 980px) { + .umap-main-edit-toolbox .umap-user span, .leaflet-container .leaflet-control-edit-save span, .leaflet-container .leaflet-control-edit-disable span, .leaflet-container .leaflet-control-edit-cancel span { @@ -1565,6 +1566,10 @@ a.add-datalayer:hover, } } @media all and (max-width: 640px) { + .umap-main-edit-toolbox .umap-user { + display: none; + } + .umap-main-edit-toolbox .map-name { max-width: 150px; }