-
Notifications
You must be signed in to change notification settings - Fork 7
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
a88f6e0
commit e0d6429
Showing
14 changed files
with
236 additions
and
55 deletions.
There are no files selected for viewing
Binary file not shown.
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,37 +1,50 @@ | ||
import { Layout } from "fumadocs-ui/layout"; | ||
import Link from "next/link"; | ||
|
||
import { siteConfig } from "~/app/source"; | ||
import { buttonVariants } from "~/components/button"; | ||
|
||
export default function IndexPage() { | ||
return ( | ||
<section className="container flex flex-col justify-center overflow-hidden items-center min-h-[calc(100vh-4rem)] gap-6 pb-8 pt-6 md:py-10"> | ||
<div className="max-w-5xl space-y-8"> | ||
<h1 | ||
className="font-cal text-balance animate-fade-up bg-gradient-to-br from-foreground/80 to-muted-foreground bg-clip-text text-center text-5xl/[3rem] font-bold text-transparent opacity-0 drop-shadow-sm md:text-7xl/[5rem]" | ||
style={{ animationDelay: "0.20s", animationFillMode: "forwards" }} | ||
> | ||
Acme Corp Lib | ||
</h1> | ||
<p | ||
className="animate-fade-up text-balance text-center text-muted-foreground/80 opacity-0 md:text-xl" | ||
style={{ animationDelay: "0.30s", animationFillMode: "forwards" }} | ||
> | ||
The perfect starter template for your next TypeScript library. | ||
Batteries included powered by PNPM Workspaces, Turborepo, tsup & | ||
Changesets. | ||
</p> | ||
<div | ||
className="flex justify-center gap-4 animate-fade-up opacity-0" | ||
style={{ animationDelay: "0.40s", animationFillMode: "forwards" }} | ||
> | ||
<Link href="/docs">Documentation</Link> | ||
<Link | ||
target="_blank" | ||
rel="noreferrer" | ||
href="https://github.com/juliusmarminge/acme-corp-lib" | ||
<Layout | ||
nav={{ | ||
title: siteConfig.name, | ||
githubUrl: siteConfig.links.github, | ||
}} | ||
links={[{ text: "Docs", url: siteConfig.links.docs }]} | ||
> | ||
<section className="container flex flex-col justify-center items-center gap-6 pb-8 pt-6 md:py-10"> | ||
<div className="max-w-5xl space-y-8"> | ||
<h1 | ||
className="font-cal text-balance animate-fade-up bg-gradient-to-br from-foreground/80 to-muted-foreground bg-clip-text text-center text-5xl/[3rem] font-bold text-transparent opacity-0 drop-shadow-sm md:text-7xl/[5rem]" | ||
style={{ animationDelay: "0.20s", animationFillMode: "forwards" }} | ||
> | ||
{siteConfig.name} | ||
</h1> | ||
<p | ||
className="animate-fade-up text-balance text-center text-muted-foreground/80 opacity-0 md:text-xl" | ||
style={{ animationDelay: "0.30s", animationFillMode: "forwards" }} | ||
> | ||
{siteConfig.description} | ||
</p> | ||
<div | ||
className="flex justify-center gap-4 animate-fade-up opacity-0" | ||
style={{ animationDelay: "0.40s", animationFillMode: "forwards" }} | ||
> | ||
GitHub | ||
</Link> | ||
<Link className={buttonVariants({})} href={siteConfig.links.docs}> | ||
Documentation | ||
</Link> | ||
<Link | ||
target="_blank" | ||
rel="noreferrer" | ||
className={buttonVariants({})} | ||
href={siteConfig.links.github} | ||
> | ||
GitHub | ||
</Link> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
</section> | ||
</Layout> | ||
); | ||
} |
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,51 @@ | ||
import { type VariantProps, cva } from "class-variance-authority"; | ||
import * as React from "react"; | ||
|
||
import { twMerge } from "tailwind-merge"; | ||
|
||
const buttonVariants = cva( | ||
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background", | ||
{ | ||
variants: { | ||
variant: { | ||
default: "bg-primary text-primary-foreground hover:bg-primary/90", | ||
destructive: | ||
"bg-destructive text-destructive-foreground hover:bg-destructive/90", | ||
outline: | ||
"border border-input hover:bg-accent hover:text-accent-foreground", | ||
secondary: | ||
"bg-secondary text-secondary-foreground hover:bg-secondary/80", | ||
ghost: "hover:bg-accent hover:text-accent-foreground", | ||
link: "underline-offset-4 hover:underline text-primary", | ||
}, | ||
size: { | ||
default: "h-10 py-2 px-4", | ||
sm: "h-9 px-3 rounded-md", | ||
lg: "h-11 px-8 rounded-md", | ||
}, | ||
}, | ||
defaultVariants: { | ||
variant: "default", | ||
size: "default", | ||
}, | ||
}, | ||
); | ||
|
||
export interface ButtonProps | ||
extends React.ButtonHTMLAttributes<HTMLButtonElement>, | ||
VariantProps<typeof buttonVariants> {} | ||
|
||
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>( | ||
({ className, variant, size, ...props }, ref) => { | ||
return ( | ||
<button | ||
className={twMerge(buttonVariants({ variant, size, className }))} | ||
ref={ref} | ||
{...props} | ||
/> | ||
); | ||
}, | ||
); | ||
Button.displayName = "Button"; | ||
|
||
export { Button, buttonVariants }; |
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,9 +1,55 @@ | ||
import { Heading } from "fumadocs-ui/components/heading"; | ||
import defaultComponents from "fumadocs-ui/mdx"; | ||
|
||
import type { MDXComponents } from "mdx/types"; | ||
import { twMerge } from "tailwind-merge"; | ||
|
||
export function useMDXComponents(components: MDXComponents): MDXComponents { | ||
return { | ||
...defaultComponents, | ||
...components, | ||
|
||
h1: (props) => ( | ||
<Heading | ||
as="h1" | ||
{...props} | ||
className={twMerge(props.className, "font-cal")} | ||
/> | ||
), | ||
h2: (props) => ( | ||
<Heading | ||
as="h2" | ||
{...props} | ||
className={twMerge(props.className, "font-cal")} | ||
/> | ||
), | ||
h3: (props) => ( | ||
<Heading | ||
as="h3" | ||
{...props} | ||
className={twMerge(props.className, "font-cal")} | ||
/> | ||
), | ||
h4: (props) => ( | ||
<Heading | ||
as="h4" | ||
{...props} | ||
className={twMerge(props.className, "font-cal")} | ||
/> | ||
), | ||
h5: (props) => ( | ||
<Heading | ||
as="h5" | ||
{...props} | ||
className={twMerge(props.className, "font-cal")} | ||
/> | ||
), | ||
h6: (props) => ( | ||
<Heading | ||
as="h6" | ||
{...props} | ||
className={twMerge(props.className, "font-cal")} | ||
/> | ||
), | ||
}; | ||
} |
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.