11import type { Metadata } from "next" ;
22
3+ import { cn } from "@/utils/cn" ;
34import { globals } from "@/globals" ;
45import { notFound } from "next/navigation" ;
56import { getGeneralDocument } from "@/utils/docs" ;
67
7- import MDX from "@/components/mdx" ;
88import Article from "@/components/docs/doc-article" ;
99import Container from "@/components/container" ;
1010
1111import Header from "@/components/header" ;
1212import Footer from "@/components/footer" ;
1313
14+ import { GitHub } from "@/components/ui/svgs" ;
15+ import { ArrowUpRightIcon } from "lucide-react" ;
16+
17+ import MDX from "@/components/mdx" ;
18+ import GetStartedLink from "@/components/home/get-started-link" ;
19+ import InstallCommands from "@/components/home/install-commands" ;
20+
21+ import { buttonVariants } from "@/components/ui/button" ;
22+ import { ExternalLink } from "@/components/ui/external-link" ;
23+
1424export async function generateMetadata ( ) : Promise < Metadata > {
1525 const websiteUrl = "https://code-blocks.pheralb.dev" ;
1626 const data = getGeneralDocument ( "home" ) ;
@@ -37,9 +47,52 @@ const Home = () => {
3747 < main className = "pb-4" >
3848 < Container >
3949 < Header layout = "app" />
40- < Article className = "pb-8" >
41- < MDX code = { document . mdx } />
42- </ Article >
50+ < div
51+ className = { cn (
52+ "not-prose" ,
53+ "flex flex-col space-y-6 pt-10 md:pt-12" ,
54+ "animate-in fill-mode-backwards fade-in slide-in-from-bottom-2 duration-500" ,
55+ ) }
56+ >
57+ < div className = "flex flex-col items-start justify-center space-y-2 md:items-center" >
58+ < h1 className = "text-3xl font-semibold tracking-tight text-balance md:text-4xl lg:text-5xl" >
59+ Build beautiful code blocks
60+ </ h1 >
61+ < p className = "font-medium text-neutral-500 dark:text-neutral-400" >
62+ Ready to use UI components and utilities to show your snippets
63+ beautifully.
64+ </ p >
65+ </ div >
66+ < div
67+ className = { cn (
68+ "flex flex-row items-center justify-center space-x-2" ,
69+ ) }
70+ >
71+ < GetStartedLink />
72+ < ExternalLink
73+ title = "GitHub"
74+ href = { globals . githubUrl }
75+ className = { buttonVariants ( {
76+ size : "default" ,
77+ variant : "outline" ,
78+ className : "w-full no-underline md:w-40" ,
79+ } ) }
80+ >
81+ < div className = "flex items-center space-x-2" >
82+ < GitHub height = { 14 } />
83+ < span > GitHub</ span >
84+ </ div >
85+ < ArrowUpRightIcon size = { 12 } />
86+ </ ExternalLink >
87+ </ div >
88+ < InstallCommands />
89+ </ div >
90+ < div className = "animate-in fill-mode-backwards fade-in slide-in-from-bottom-4 duration-500 delay-100" >
91+ < div className = "my-8 h-px bg-neutral-200 dark:bg-neutral-800" />
92+ < Article className = "prose-h2:border-0 prose-h2:pb-0 prose-h2:text-2xl pb-8" >
93+ < MDX code = { document . mdx } />
94+ </ Article >
95+ </ div >
4396 </ Container >
4497 < Footer />
4598 </ main >
0 commit comments