-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
37 changed files
with
2,985 additions
and
306 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
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
<slot /> |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
import type { Props } from "@astrojs/starlight/props"; | ||
import { buttonVariants } from "@/registry/new-york/ui/button.directive"; | ||
import { cn } from "@/lib/utils"; | ||
import { PAGE_TITLE_ID } from "../../constants"; | ||
const { data } = Astro.props.entry; | ||
const { title = data.title, tagline, actions = [] } = data.hero || {}; | ||
--- | ||
|
||
<section | ||
class="mx-auto flex flex-col items-start gap-2 px-4 py-8 md:py-12 md:pb-8 lg:py-12 lg:pb-10" | ||
> | ||
<h1 | ||
id={PAGE_TITLE_ID} | ||
data-page-title | ||
set:html={title} | ||
class="text-3xl font-bold leading-tight tracking-tighter md:text-4xl lg:leading-[1.1]" | ||
/> | ||
{ | ||
tagline && ( | ||
<p | ||
class="max-w-2xl text-lg font-light text-foreground" | ||
set:html={tagline} | ||
/> | ||
) | ||
} | ||
{ | ||
actions.length > 0 && ( | ||
<div class="flex w-full items-center justify-start gap-2 py-2"> | ||
{actions.map(({ text, link, ...attrs }) => ( | ||
<a | ||
href={link} | ||
class={cn( | ||
buttonVariants({ | ||
variant: | ||
attrs.variant === "minimal" || attrs.variant === "primary" | ||
? "default" | ||
: "ghost", | ||
size: "sm", | ||
}) | ||
)} | ||
set:html={text} | ||
/> | ||
// <CallToAction {...attrs} set:html={text} /> | ||
))} | ||
</div> | ||
) | ||
} | ||
</section> |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
import "../../style/markdown.css"; | ||
--- | ||
|
||
<div class="sl-markdown-content pb-12 pt-8"><slot /></div> |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
import MobileMenuToggle from "@astrojs/starlight/components/MobileMenuToggle.astro"; | ||
import type { Props } from "@astrojs/starlight/props"; | ||
const { hasSidebar, labels } = Astro.props; | ||
--- | ||
|
||
<slot name="header" /> | ||
<main class="flex-1"> | ||
<div class="container relative"> | ||
{ | ||
hasSidebar ? ( | ||
<div class="border-b"> | ||
<div class="container flex-1 items-start md:grid md:grid-cols-[220px_minmax(0,1fr)] md:gap-6 lg:grid-cols-[240px_minmax(0,1fr)] lg:gap-10"> | ||
<aside | ||
class="fixed top-14 z-30 -ml-2 hidden h-[calc(100vh-3.5rem)] w-full shrink-0 md:sticky md:block" | ||
aria-label={labels["sidebarNav.accessibleLabel"]} | ||
> | ||
<div class="h-full py-6 pr-6 lg:py-8"> | ||
<MobileMenuToggle {...Astro.props} /> | ||
<slot name="sidebar" /> | ||
</div> | ||
</aside> | ||
<slot /> | ||
</div> | ||
</div> | ||
) : ( | ||
<slot /> | ||
) | ||
} | ||
</div> | ||
</main> |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
--- | ||
import { cn } from "@/lib/utils"; | ||
import { PAGE_TITLE_ID } from "../../constants"; | ||
import type { Props } from "@astrojs/starlight/props"; | ||
import { badgeVariants } from "@/registry/new-york/ui/badge.directive"; | ||
--- | ||
|
||
<div | ||
class="mb-4 flex items-center space-x-1 text-sm leading-none text-muted-foreground" | ||
> | ||
<div class="truncate">Docs</div> | ||
<!-- <ChevronRightIcon class="h-3.5 w-3.5" /> --> | ||
<div class="text-foreground">{Astro.props.entry.data.title}</div> | ||
</div> | ||
|
||
<div class="space-y-2"> | ||
<h1 class="scroll-m-20 text-3xl font-bold tracking-tight" id={PAGE_TITLE_ID}> | ||
{Astro.props.entry.data.title} | ||
</h1> | ||
{ | ||
Astro.props.entry.data.description && ( | ||
<p class="text-base text-muted-foreground"> | ||
<span style="text-wrap: balance; display: inline-block; vertical-align: top; text-decoration: inherit; max-width: 454px;"> | ||
{Astro.props.entry.data.description} | ||
</span> | ||
</p> | ||
) | ||
} | ||
</div> | ||
|
||
{ | ||
Astro.props.entry.data.links ? ( | ||
<div class="flex items-center space-x-2 pt-4"> | ||
{Astro.props.entry.data.links.doc && ( | ||
<a | ||
href={Astro.props.entry.data.links.doc} | ||
target="_blank" | ||
rel="noreferrer" | ||
class={cn(badgeVariants({ variant: "secondary" }), "gap-1")} | ||
> | ||
Docs | ||
{/* <ExternalLinkIcon class="h-3 w-3" /> */} | ||
</a> | ||
)} | ||
{Astro.props.entry.data.links.api && ( | ||
<a | ||
href={Astro.props.entry.data.links.api} | ||
target="_blank" | ||
rel="noreferrer" | ||
class={cn(badgeVariants({ variant: "secondary" }), "gap-1")} | ||
> | ||
API Reference | ||
{/* <ExternalLinkIcon class="h-3 w-3" /> */} | ||
</a> | ||
)} | ||
</div> | ||
) : null | ||
} |
Oops, something went wrong.