-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f784043
commit bb65305
Showing
33 changed files
with
721 additions
and
449 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
/// <reference types="astro/client" /> | ||
|
||
// Unfortunately, some packages don't have types available. | ||
|
||
declare module "quicklink" | ||
|
||
declare namespace astroHTML.JSX { | ||
interface HTMLAttributes { | ||
/** | ||
* The HTMLElement property inert is a boolean value that, when present, makes the browser "ignore" user input events for the element, including focus events | ||
* and events from assistive technologies. The browser may also ignore page search and text selection in the element. This can be useful when building UIs | ||
* such as modals where you would want to "trap" the focus inside the modal when it's visible. | ||
* @see https://github.com/WICG/inert | ||
*/ | ||
inert?: boolean | string | undefined | null | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
--- | ||
import { MarkdownHeader } from "$data/shared" | ||
import type { MarkdownHeading } from "$data/shared" | ||
export interface Props { | ||
headers: MarkdownHeader[] | ||
headers: MarkdownHeading[] | ||
maxDepth: number | ||
} | ||
const { headers, maxDepth } = Astro.props as Props | ||
const { headers, maxDepth } = Astro.props | ||
const filteredHeaders = headers.filter((header) => header.depth > 1 && header.depth < maxDepth + 1) | ||
--- | ||
|
||
<span class="font-semibold mb-2">On this page</span> | ||
<nav class="toc"> | ||
<ol> | ||
{filteredHeaders.map((header) => ( | ||
<li class={`toc-depth-${header.depth}`}> | ||
<a href={`#${header.slug}`}>{header.text}</a> | ||
</li> | ||
))} | ||
{ | ||
filteredHeaders.map((header) => ( | ||
<li class={`toc-depth-${header.depth}`}> | ||
<a href={`#${header.slug}`}>{header.text}</a> | ||
</li> | ||
)) | ||
} | ||
</ol> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.