Skip to content

Commit d4bd575

Browse files
committed
add back in component layout
1 parent 008b746 commit d4bd575

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

src/@primer/gatsby-theme-doctocat/components/hero.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ export default function Hero() {
1010
<Container>
1111
<Note>
1212
<Text sx={{display: 'block'}}>
13-
New look, same Primer!{' '}
13+
🎉 👀 New look, same Primer!{' '}
1414
<Link href="https://primer-docs-preview.github.com" target="_blank">
1515
Preview the new docs experience here
1616
</Link>{' '}
17-
and let us know what you think 👀 🎉
17+
and let us know what you think.
1818
</Text>
1919
</Note>
2020
<Box

src/components/base-layout.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Head from '@primer/gatsby-theme-doctocat/src/components/head'
44
import Header from '@primer/gatsby-theme-doctocat/src/components/header'
55
import Sidebar from '@primer/gatsby-theme-doctocat/src/components/sidebar'
66
import {Note} from '@primer/gatsby-theme-doctocat'
7+
import {LinkExternalIcon} from '@primer/octicons-react'
78

89
export function BaseLayout({title, description, children, showSidebar = true}) {
910
return (
@@ -20,11 +21,11 @@ export function BaseLayout({title, description, children, showSidebar = true}) {
2021
<Box sx={{maxWidth: 1200, width: '100%', pt: [4, 5, 6, 7], px: [4, 5, 6, 7], pb: 0, mx: 'auto'}}>
2122
<Note>
2223
<Text sx={{display: 'block'}}>
23-
New look, same Primer!{' '}
24+
🎉 👀 New look, same Primer!{' '}
2425
<Link href="https://primer-docs-preview.github.com" target="_blank">
2526
Preview the new docs experience here
2627
</Link>{' '}
27-
and let us know what you think 👀 🎉
28+
and let us know what you think.
2829
</Text>
2930
</Note>
3031
</Box>

src/layouts/component-layout.tsx

+15-9
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {ComponentPageNav} from '../components/component-page-nav'
99
import navItems from '@primer/gatsby-theme-doctocat/src/nav.yml'
1010

1111
type NavItemData = {
12-
title: string,
13-
url?: string,
12+
title: string
13+
url?: string
1414
children?: NavItemData[]
1515
}
1616

@@ -45,17 +45,23 @@ export default function ComponentLayout({pageContext, children, path}) {
4545

4646
return (
4747
<BaseLayout title={title} description={description}>
48-
<Box sx={{maxWidth: 1200, width: '100%', p: [4, 5, 6, 7], mx: 'auto'}}>
48+
<Box sx={{maxWidth: 1200, width: '100%', pb: [4, 5, 6, 7], px: [4, 5, 6, 7], pt: [2, 3, 4, 5], mx: 'auto'}}>
4949
{breadcrumbData.length > 1 ? (
5050
<Breadcrumbs sx={{mb: 4}}>
51-
{breadcrumbData.map(item => item.url ? (
52-
<Breadcrumbs.Item key={item.url} href={withPrefix(item.url)} selected={path === item.url}>
53-
{item.title}
54-
</Breadcrumbs.Item>
55-
): null).filter(item => item)}
51+
{breadcrumbData
52+
.map(item =>
53+
item.url ? (
54+
<Breadcrumbs.Item key={item.url} href={withPrefix(item.url)} selected={path === item.url}>
55+
{item.title}
56+
</Breadcrumbs.Item>
57+
) : null,
58+
)
59+
.filter(item => item)}
5660
</Breadcrumbs>
5761
) : null}
58-
<Heading as="h1" sx={{fontSize: 7}}>{title}</Heading>
62+
<Heading as="h1" sx={{fontSize: 7}}>
63+
{title}
64+
</Heading>
5965
{description ? (
6066
<Text as="p" sx={{fontSize: 3, m: 0, mb: 3, maxWidth: '60ch'}}>
6167
{description}

0 commit comments

Comments
 (0)