diff --git a/site/gdocs/components/ResearchAndWriting.tsx b/site/gdocs/components/ResearchAndWriting.tsx index b486ec95df2..75fafb0a9e6 100644 --- a/site/gdocs/components/ResearchAndWriting.tsx +++ b/site/gdocs/components/ResearchAndWriting.tsx @@ -4,11 +4,13 @@ import { EnrichedBlockResearchAndWriting, EnrichedBlockResearchAndWritingLink, RESEARCH_AND_WRITING_ID, + slugify, } from "@ourworldindata/utils" import { useLinkedDocument } from "../utils.js" import { formatAuthors } from "../../clientFormatting.js" import Image from "./Image.js" import { DocumentContext } from "../OwidGdoc.js" +import { RESEARCH_AND_WRITING_DEFAULT_HEADING } from "@ourworldindata/types" type ResearchAndWritingProps = { className?: string @@ -89,15 +91,18 @@ function ResearchAndWritingLinkContainer( } export function ResearchAndWriting(props: ResearchAndWritingProps) { - const { primary, secondary, more, rows, className } = props + const { heading, primary, secondary, more, rows, className } = props + + const slug = heading ? slugify(heading) : RESEARCH_AND_WRITING_ID + return (

- Research & Writing - + {heading || RESEARCH_AND_WRITING_DEFAULT_HEADING} +

diff --git a/site/gdocs/pages/Author.scss b/site/gdocs/pages/Author.scss index 0055214532a..4673ad6afe8 100644 --- a/site/gdocs/pages/Author.scss +++ b/site/gdocs/pages/Author.scss @@ -51,3 +51,7 @@ margin-right: 8px; } } + +.author-work { + background-color: $blue-5; +} diff --git a/site/gdocs/pages/Author.tsx b/site/gdocs/pages/Author.tsx index aa87342109d..4509220f255 100644 --- a/site/gdocs/pages/Author.tsx +++ b/site/gdocs/pages/Author.tsx @@ -1,5 +1,6 @@ import React from "react" import { + OwidEnrichedGdocBlock, OwidGdocAuthorContent, OwidGdocAuthorInterface, } from "@ourworldindata/types" @@ -55,10 +56,19 @@ const AuthorHeader = (gdoc: OwidGdocAuthorInterface) => { ) } +export const AuthorWork = ({ blocks }: { blocks: OwidEnrichedGdocBlock[] }) => { + return ( +
+ +
+ ) +} + export const Author = (gdoc: OwidGdocAuthorInterface): JSX.Element => { return (
+
) }