Skip to content

Commit 8646b73

Browse files
committed
fix type errors, only add padding to direct steps list items
1 parent 867ab38 commit 8646b73

File tree

2 files changed

+32
-24
lines changed

2 files changed

+32
-24
lines changed

src/pages/changelog-next/[...slug].astro

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro";
2+
import StarlightPage, {
3+
type StarlightPageProps,
4+
} from "@astrojs/starlight/components/StarlightPage.astro";
35
import type { GetStaticPaths } from "astro";
46
import { getCollection } from "astro:content";
57
import Header from "~/components/changelog-next/Header.astro";
@@ -24,17 +26,19 @@ export const getStaticPaths = (async () => {
2426
const { note } = Astro.props;
2527
2628
const { Content, headings } = await note.render();
27-
---
2829
29-
<StarlightPage
30-
frontmatter={{
30+
const props = {
31+
frontmatter: {
3132
title: note.data.title,
3233
template: "splash",
33-
}}
34-
headings={headings}
35-
hideTitle={true}
36-
hideBreadcrumbs={true}
37-
>
34+
},
35+
headings,
36+
hideTitle: true,
37+
hideBreadcrumbs: true,
38+
} as StarlightPageProps;
39+
---
40+
41+
<StarlightPage {...props}>
3842
<Header />
3943
<div class="w-full max-w-[50rem] justify-self-center">
4044
<div class="!mt-0 mb-10">

src/pages/changelog-next/index.astro

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
2-
import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro";
2+
import StarlightPage, {
3+
type StarlightPageProps,
4+
} from "@astrojs/starlight/components/StarlightPage.astro";
35
import { getCollection } from "astro:content";
46
57
import Header from "~/components/changelog-next/Header.astro";
@@ -11,17 +13,19 @@ import { format } from "date-fns";
1113
const notes = await getCollection("changelogs-next");
1214
1315
notes.sort((a, b) => b.data.date.getTime() - a.data.date.getTime());
14-
---
1516
16-
<StarlightPage
17-
frontmatter={{
17+
const props = {
18+
frontmatter: {
1819
title: "Changelogs",
1920
tableOfContents: false,
2021
template: "splash",
21-
}}
22-
hideTitle={true}
23-
hideBreadcrumbs={true}
24-
>
22+
},
23+
hideTitle: true,
24+
hideBreadcrumbs: true,
25+
} as StarlightPageProps;
26+
---
27+
28+
<StarlightPage {...props}>
2529
<Header entries={notes} />
2630
<div
2731
class="w-full max-w-[50rem] justify-self-center px-4 md:grid md:grid-cols-[15%_auto]"
@@ -158,15 +162,15 @@ notes.sort((a, b) => b.data.date.getTime() - a.data.date.getTime());
158162
.sl-steps {
159163
--bullet-size: 24px !important;
160164

161-
li {
165+
& > li {
162166
padding-inline-start: calc(var(--bullet-size) + 2.5rem) !important;
163-
}
164167

165-
& > li::before {
166-
content: "•" !important;
167-
font-size: calc(var(--bullet-size) * 2) !important;
168-
line-height: calc(var(--bullet-size) / 1.5) !important;
169-
color: var(--orange-accent-200) !important;
168+
&::before {
169+
content: "•" !important;
170+
font-size: calc(var(--bullet-size) * 2) !important;
171+
line-height: calc(var(--bullet-size) / 1.5) !important;
172+
color: var(--orange-accent-200) !important;
173+
}
170174
}
171175
}
172176
}

0 commit comments

Comments
 (0)