From 23d36b6fc3568a667a25bbd801195ee68997ce52 Mon Sep 17 00:00:00 2001 From: Ike Saunders Date: Tue, 26 Sep 2023 20:48:04 +0000 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=90=9B=20fix=20ref=20links=20not=20st?= =?UTF-8?q?yled=20incorrectly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/gdocs/centered-article.scss | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/site/gdocs/centered-article.scss b/site/gdocs/centered-article.scss index 2463ddb2bc7..2cd6acc1898 100644 --- a/site/gdocs/centered-article.scss +++ b/site/gdocs/centered-article.scss @@ -15,11 +15,12 @@ } .centered-article-container { + // !important because we never want this to be overwritten .ref { - color: $vermillion; - text-decoration: none; + color: $vermillion !important; + text-decoration: none !important; &:visited { - color: $vermillion; + color: $vermillion !important; } } } From 0beb569666db3d6c82c755cb76141513ef198256 Mon Sep 17 00:00:00 2001 From: Ike Saunders Date: Tue, 26 Sep 2023 21:39:47 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=8E=89=20single-column=20footnote=20w?= =?UTF-8?q?hen=20only=20one=20footnote?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/gdocs/Footnotes.tsx | 12 ++++++++++-- site/gdocs/centered-article.scss | 3 +++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/site/gdocs/Footnotes.tsx b/site/gdocs/Footnotes.tsx index 05c15d4a697..990ca383fe4 100644 --- a/site/gdocs/Footnotes.tsx +++ b/site/gdocs/Footnotes.tsx @@ -1,6 +1,7 @@ import { ENDNOTES_ID, RefDictionary } from "@ourworldindata/utils" import React from "react" import ArticleBlock from "./ArticleBlock.js" +import cx from "classnames" export default function Footnotes({ definitions, @@ -10,12 +11,19 @@ export default function Footnotes({ if (!definitions) { return null } + + const definitionsArray = Object.values(definitions) return (

Endnotes

-
    - {Object.values(definitions) +
      + {definitionsArray .sort((a, b) => a.index - b.index) .map((ref) => { return ( diff --git a/site/gdocs/centered-article.scss b/site/gdocs/centered-article.scss index 2cd6acc1898..1a4d20b3e42 100644 --- a/site/gdocs/centered-article.scss +++ b/site/gdocs/centered-article.scss @@ -329,6 +329,9 @@ h3.article-block__heading.has-supertitle { } .footnote-list { column-count: 2; + &.footnote-list--single-column { + column-count: 1; + } column-span: none; column-gap: 48px; color: $blue-60; From d4ce583fc49718dbdf58a42afc49c21476fad006 Mon Sep 17 00:00:00 2001 From: Ike Saunders Date: Tue, 26 Sep 2023 22:04:21 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=E2=9C=A8=20left-align=20all=20gdocs=20topi?= =?UTF-8?q?c=20page=20headers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/gdocs/AllCharts.scss | 2 +- site/gdocs/centered-article.scss | 2 +- site/gdocs/topic-page.scss | 12 +++++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/site/gdocs/AllCharts.scss b/site/gdocs/AllCharts.scss index 33275ef188e..2cc769a98a5 100644 --- a/site/gdocs/AllCharts.scss +++ b/site/gdocs/AllCharts.scss @@ -1,6 +1,6 @@ .article-block__all-charts { h1.h1-semibold { - text-align: center; + margin-bottom: 40px; } figure[data-grapher-src] { diff --git a/site/gdocs/centered-article.scss b/site/gdocs/centered-article.scss index 1a4d20b3e42..ffe9ea1deeb 100644 --- a/site/gdocs/centered-article.scss +++ b/site/gdocs/centered-article.scss @@ -502,7 +502,7 @@ h3.article-block__heading.has-supertitle { .article-block__explorer { // width is necessary for containerNode.getBoundingClientRect() in Grapher.renderGrapherIntoContainer width: 100%; - margin: 24px 0 48px 0; + margin: 16px 0 48px 0; figure { margin: 0; diff --git a/site/gdocs/topic-page.scss b/site/gdocs/topic-page.scss index 405914ff0bb..519cadf3df6 100644 --- a/site/gdocs/topic-page.scss +++ b/site/gdocs/topic-page.scss @@ -173,12 +173,22 @@ } } +// small amount of extra padding to match figma designs which is 40px total for key-insights heading +.article-block__heading + .wp-block-owid-key-insights { + margin-top: 8px; +} + .article-block__gray-section { > h1 { - text-align: center; // Countering the gray-section padding to make this have 32px 16px margin-top: -16px; margin-bottom: 16px; + + // Special exception for the "Explore data on Blah" heading (which is a gdoc .article-block__heading) + // so that it's left-aligned like the rest of the topic page component headings + &[id^="explore"] { + grid-column-start: 2; + } } .article-block__text, From 02608f6f7118e67ee43325d9d3ce6d8f11cb03fe Mon Sep 17 00:00:00 2001 From: Ike Saunders Date: Wed, 27 Sep 2023 19:15:04 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=E2=9C=A8=20topic=20page=20styles=20only=20?= =?UTF-8?q?when=20inside=20topic-page=20container?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/gdocs/topic-page.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/gdocs/topic-page.scss b/site/gdocs/topic-page.scss index 519cadf3df6..4e5ffa41d05 100644 --- a/site/gdocs/topic-page.scss +++ b/site/gdocs/topic-page.scss @@ -178,7 +178,7 @@ margin-top: 8px; } -.article-block__gray-section { +.centered-article-container--topic-page .article-block__gray-section { > h1 { // Countering the gray-section padding to make this have 32px 16px margin-top: -16px;