Skip to content

Commit 169049b

Browse files
authored
Base layout design updates (#605)
* updates base page layout to match updated designs * adds changeset
1 parent c4eea64 commit 169049b

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.changeset/slow-cycles-search.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@primer/gatsby-theme-doctocat': patch
3+
---
4+
5+
Updates the base layout with latest designs.

theme/src/components/heading.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,25 @@ function MarkdownHeading({children, ...props}) {
5959

6060
const StyledH1 = styled(StyledHeading).attrs({as: 'h1'})`
6161
padding-bottom: ${themeGet('space.2')};
62-
font-size: ${themeGet('fontSizes.5')};
62+
font-size: ${themeGet('fontSizes.7')};
6363
border-bottom: 1px solid ${themeGet('colors.border.default')};
6464
`
6565

6666
const StyledH2 = styled(StyledHeading).attrs({as: 'h2'})`
6767
padding-bottom: ${themeGet('space.2')};
6868
font-size: ${themeGet('fontSizes.4')};
6969
border-bottom: 1px solid ${themeGet('colors.border.default')};
70+
font-weight: ${themeGet('fontWeights.semibold')};
7071
`
7172

7273
const StyledH3 = styled(StyledHeading).attrs({as: 'h3'})`
7374
font-size: ${themeGet('fontSizes.3')};
75+
font-weight: ${themeGet('fontWeights.semibold')};
7476
`
7577

7678
const StyledH4 = styled(StyledHeading).attrs({as: 'h4'})`
7779
font-size: ${themeGet('fontSizes.2')};
80+
font-weight: ${themeGet('fontWeights.semibold')};
7881
`
7982

8083
const StyledH5 = styled(StyledHeading).attrs({as: 'h5'})`

theme/src/components/layout.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ function Layout({children, pageContext, path}) {
9191
sx={{
9292
width: 220,
9393
flex: '0 0 auto',
94-
marginLeft: 6,
94+
marginLeft: [null, 7, 8, 9],
9595
display: ['none', null, 'block'],
9696
position: 'sticky',
9797
top: HEADER_HEIGHT + 48,
9898
maxHeight: `calc(100vh - ${HEADER_HEIGHT}px - 48px)`
9999
}}
100100
css={{gridArea: 'table-of-contents', overflow: 'auto'}}
101101
>
102-
<Heading as="h3" sx={{fontSize: 2, display: 'inline-block', fontWeight: 'bold', pl: 3}} id="toc-heading">
102+
<Heading as="h3" sx={{fontSize: 1, display: 'inline-block', fontWeight: 'bold', pl: 3}} id="toc-heading">
103103
On this page
104104
</Heading>
105105
<TableOfContents aria-labelledby="toc-heading" items={pageContext.tableOfContents.items} />
@@ -117,7 +117,9 @@ function Layout({children, pageContext, path}) {
117117
: null}
118118
</Breadcrumbs>
119119
<Box sx={{alignItems: 'center', display: 'flex'}}>
120-
<Heading as="h1">{title}</Heading>{' '}
120+
<Heading as="h1" sx={{fontSize: 7}}>
121+
{title}
122+
</Heading>
121123
</Box>
122124
{description ? <Box sx={{fontSize: 3, mb: 3}}>{description}</Box> : null}
123125
<Box

0 commit comments

Comments
 (0)