Skip to content

Commit 3b682ed

Browse files
committed
Add docs, formatting fix, fix error in id attribute for BaseLayout
1 parent 7a1ae5e commit 3b682ed

8 files changed

Lines changed: 23 additions & 8 deletions

File tree

‎src/components/Layout/Container/index.astro‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
---
2+
/**
3+
* Wrapper for the site header and main content in BaseLayout
4+
*/
25
export interface Props {
36
id?: string
47
}
@@ -10,7 +13,7 @@ const { id } = Astro.props
1013
class="flex flex-col min-h-screen relative transition-transform duration-300 ease-[cubic-bezier(0.25,0.46,0.45,0.94)]"
1114
role="document"
1215
style="padding-top: env(titlebar-area-height, 0);"
13-
{id}
16+
id={id}
1417
>
1518
<slot />
1619
</div>

‎src/components/Layout/Content/index.astro‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
---
2+
/**
3+
* Wrapper for main content in BaseLayout
4+
*/
5+
---
6+
17
<main
28
id="main"
3-
class="flex flex-col flex-[0_1_auto] mx-auto max-w-[75rem] w-[90%]"
9+
class="flex flex-col flex-[0_1_auto] mx-auto max-w-300 w-[90%]"
410
role="main"
511
tabindex="-1"
612
>

‎src/components/Layout/Markdown/Footer/index.astro‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ export interface Props {
66
const { section } = Astro.props
77
---
88

9-
<footer class="mt-16 pt-8 border-t border-[var(--color-border)] text-sm text-[var(--color-text-muted)]">
9+
<footer class="mt-16 pt-8 border-t border-border text-sm text-text-muted">
1010
<p class="markdown-content__section">
1111
{/* Article section/category */}
12-
Filed under: <a href={`/sections/${section}`} class="text-[var(--color-primary)] no-underline hover:underline focus:underline">{section}</a>
12+
Filed under: <a href={`/sections/${section}`} class="text-primary no-underline hover:underline focus:underline">{section}</a>
1313
</p>
1414
</footer>

‎src/components/Layout/Markdown/Lead/index.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface Props {
1616
const { modifiedDate, publishDate, author, readingTime, tags } = Astro.props
1717
---
1818

19-
<div class="flex flex-wrap gap-2 items-center text-sm text-[var(--color-text-muted)] mt-4 pt-4 border-t border-[var(--color-border)]">
19+
<div class="flex flex-wrap gap-2 items-center text-sm text-text-muted mt-4 pt-4 border-border">
2020
{publishDate && <PublishDate publishDate={publishDate} />}
2121
{modifiedDate && modifiedDate !== publishDate && <ModifiedDate modifiedDate={modifiedDate} />}
2222
{author && <Author author={author} />}

‎src/components/Layout/Markdown/Subtitle/index.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ export interface Props {
66
const { subtitle } = Astro.props
77
---
88

9-
<p class="text-lg text-[var(--color-text-muted)] leading-relaxed" itemprop="description">
9+
<p class="text-lg text-text-muted)] leading-relaxed" itemprop="description">
1010
{subtitle}
1111
</p>

‎src/components/Layout/Skip/index.astro‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
---
2+
/**
3+
* Wrapper for "skip to main content" anchor for accessibility in BaseLayout
4+
*/
5+
---
6+
17
<a
28
href="#main"
39
class="sr-only focus:not-sr-only focus:absolute focus:top-0 focus:left-1/2 focus:-translate-x-1/2 focus:px-6 focus:py-4 focus:outline-none focus:z-50 focus:bg-blue-600 focus:text-white focus:rounded"

‎src/components/PwaTitleBar/index.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
---
77

88
<div
9-
class="fixed top-0 left-0 right-0 overflow-hidden z-[9999] bg-[var(--color-bg-offset)]"
9+
class="fixed top-0 left-0 right-0 overflow-hidden z-9999 bg-bg-offset"
1010
style="height: env(titlebar-area-height, 0);"
1111
>
1212
<div

‎src/layouts/BaseLayout.astro‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const {
8585
<PwaTitleBar />
8686
{/* Site header and main content */}
8787
<Container id="main-content">
88-
<ThemePicker />
88+
<ThemePicker />
8989
<Header path={path} />
9090
<Breadcrumbs path={path} pageTitle={pageTitle} />
9191
{/* Main page content */}

0 commit comments

Comments
 (0)