From 5d5896f3171d9822ad03d4f2ddaafcad6e37f750 Mon Sep 17 00:00:00 2001 From: Ike Saunders Date: Tue, 28 Jan 2025 17:49:09 -0500 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=8E=89=20hide=20footer=20when=20print?= =?UTF-8?q?ing,=20better=20article=20layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/gdocs/components/centered-article.scss | 34 +++++++++++++++++++++ site/owid.scss | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/site/gdocs/components/centered-article.scss b/site/gdocs/components/centered-article.scss index 835cf88d55..74d960788d 100644 --- a/site/gdocs/components/centered-article.scss +++ b/site/gdocs/components/centered-article.scss @@ -164,6 +164,40 @@ } } } + + // Quick and dirty layout overrides for article printing + // Stacks all elements into a single, full-width column + // There's lots to improve, but it's better than before! + @media print { + grid-template-columns: repeat(12, 1fr); + + .centered-article-header { + grid-column: 2 / span 10; + } + + [class*="article-block__"] { + grid-column: 2 / span 10 !important; + } + + .article-block__side-by-side, + .article-block__sticky-left, + .article-block__sticky-right { + grid-template-columns: repeat(12, 1fr); + grid-column: 1 / span 12 !important; + > div { + display: grid; + grid-column: 1 / span 12 !important; + grid-template-columns: repeat(12, 1fr); + grid-row-start: auto; + } + } + + .sticky-column-wrapper { + position: relative; + grid-column: 1 / span 12 !important; + grid-template-columns: repeat(12, 1fr); + } + } } $banner-height: 200px; diff --git a/site/owid.scss b/site/owid.scss index cf0ddcd6ef..1c4cec3bc7 100644 --- a/site/owid.scss +++ b/site/owid.scss @@ -757,7 +757,7 @@ a.ref sup { .site-header, .alert-banner, .offset-subnavigation, - footer.SiteFooter, + .site-footer, .citation-note, .entry-sidebar, address, From 9cdd48515d1ade848ba65afbacdf245a770775c4 Mon Sep 17 00:00:00 2001 From: Marcel Gerber Date: Wed, 29 Jan 2025 11:00:47 +0100 Subject: [PATCH 2/2] enhance: hide cookie notice when printing --- site/owid.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/site/owid.scss b/site/owid.scss index 1c4cec3bc7..a48d2c7965 100644 --- a/site/owid.scss +++ b/site/owid.scss @@ -758,6 +758,7 @@ a.ref sup { .alert-banner, .offset-subnavigation, .site-footer, + .cookie-notice, .citation-note, .entry-sidebar, address,