From 00f5c756275c57fc234e28a6c38fb88b660908c7 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Fri, 18 Aug 2023 17:32:50 +0300 Subject: [PATCH] Show sidebar in print media --- app/assets/stylesheets/print.scss | 54 +++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/print.scss b/app/assets/stylesheets/print.scss index 71fdf39780..a4afdf576e 100644 --- a/app/assets/stylesheets/print.scss +++ b/app/assets/stylesheets/print.scss @@ -1,30 +1,58 @@ +html { + height: 100%; +} + +body { + height: 100%; + margin: 0; +} + +#content { + height: 100%; +} + header, -#sidebar, -#permalink, .leaflet-control { display: none; } -html { - height: 100%; +.map-layout .overlay-sidebar #sidebar { + display: none; +} + +.map-layout #sidebar { + page-break-after: always; + + & > * { + display: none; + } + #sidebar_content { + display: unset; + } + + button, + input, + textarea, + .secondary-actions { + display: none; + } +} + +#map-ui { + display: none !important; } #map { - position: absolute !important; - top: 0; - bottom: 40px; - left: 0; - right: 0; + position: relative; + height: calc(100% - 40px); + box-sizing: border-box; border: 1px solid black; } /* Rules for attribution text under the main map shown on printouts */ #attribution { - position: absolute !important; - bottom: 0; - left: 0; - right: 0; + page-break-inside: avoid; height: 40px; font-size: 12px; text-align: center;