Skip to content

Commit

Permalink
fix(source-modal): fix small design inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Nov 8, 2023
1 parent 3fabc98 commit da7f1e6
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ export const IndicatorKeyData = (props: IndicatorKeyDataProps) => {
</a>
) : (
processingLevelPhrase
)}
)}{" "}
by Our World in Data
</div>
</div>
)}
Expand Down
11 changes: 11 additions & 0 deletions packages/@ourworldindata/components/src/styles/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -339,3 +339,14 @@ body {
.body-3-medium-italic-underlined {
@include body-3-medium-italic-underlined;
}

@mixin label-2-medium {
font-family: $sans-serif-font-stack;
font-size: 0.8125rem;
font-weight: 500;
letter-spacing: 0.01em;
}

.label-2-medium {
@include label-2-medium;
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
--indicator-key-data-title: #{$light-text};
--indicator-key-data-border: #{$border};

@include label-2-medium;
margin-top: 16px;
}

Expand Down
6 changes: 3 additions & 3 deletions packages/@ourworldindata/utils/src/metadataHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ export const getPhraseForProcessingLevel = (
): string => {
switch (processingLevel) {
case "major":
return "with major adaptations by Our World In Data"
return "with major adaptations"
case "minor":
return "with minor processing by Our World In Data"
return "with minor processing"
default:
return "processed by Our World In Data"
return "processed"
}
}

Expand Down
4 changes: 2 additions & 2 deletions site/DataPageV2Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ export const DataPageV2Content = ({
)
const lastUpdated = dayjs(datapageData.lastUpdated, ["YYYY", "YYYY-MM-DD"])
const yearOfUpdate = lastUpdated.year()
const citationShort = `${attributionPotentiallyShortened}${processingLevelPhrase} (${yearOfUpdate})`
const citationLonger = `${attributionUnshortened}${processingLevelPhrase} (${yearOfUpdate})`
const citationShort = `${attributionPotentiallyShortened}${processingLevelPhrase} by Our World in Data (${yearOfUpdate})`
const citationLonger = `${attributionUnshortened}${processingLevelPhrase} by Our World in Data (${yearOfUpdate})`
const originsLong = uniq(
datapageData.origins.map(
(o) => `${o.producer}, ${o.title ?? o.titleSnapshot}`
Expand Down

0 comments on commit da7f1e6

Please sign in to comment.