Skip to content

Commit

Permalink
Switch hero image order with description and reduce h2 spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
rezrah committed Dec 16, 2023
1 parent c00addb commit 6f21970
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/nasty-bikes-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/doctocat-nextjs': patch
---

Switch hero image order with description and reduce `h2` block start margin
10 changes: 5 additions & 5 deletions packages/theme/components/layout/root-layout/Theme.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,16 @@ export function Theme({children, pageOpts}: NextraThemeLayoutProps) {
{frontMatter.title}
</Heading>
)}
{frontMatter.image && (
<Box paddingBlockEnd={16}>
<Hero.Image src={frontMatter.image} alt={frontMatter['image-alt']} />
</Box>
)}
{frontMatter.description && (
<Text as="p" variant="muted" size="300">
{frontMatter.description}
</Text>
)}
{frontMatter.image && (
<Box paddingBlockStart={16}>
<Hero.Image src={frontMatter.image} alt={frontMatter['image-alt']} />
</Box>
)}
{frontMatter['action-1-text'] && (
<Box paddingBlockStart={16}>
<ButtonGroup>
Expand Down
7 changes: 2 additions & 5 deletions packages/theme/css/prose.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,12 @@
letter-spacing: var(--brand-heading-letterSpacing-300);
}

.Prose :is(h1, h2, h3) {
--spacing: var(--base-size-64);
}

.Prose :is(h1) {
--spacing: var(--base-size-64);
margin-block-end: var(--spacing);
}

.Prose :is(h1, h2, h3) + * {
.Prose :is(h2, h3) + * {
--spacing: var(--base-size-40);
}

Expand Down

0 comments on commit 6f21970

Please sign in to comment.