11import { createFileRoute , Link } from "@tanstack/react-router" ;
22import { HomeLayout } from "fumadocs-ui/layouts/home" ;
3- import { baseOptions } from "@/lib/layout.shared" ;
3+ import { baseOptions , navbarLinks } from "@/lib/layout.shared" ;
44import {
55 GitBranch ,
66 Container ,
@@ -11,17 +11,7 @@ import {
1111 BookOpen ,
1212 Users ,
1313 Heart ,
14- Book ,
15- Settings ,
1614} from "lucide-react" ;
17- import {
18- NavbarMenu ,
19- NavbarMenuContent ,
20- NavbarMenuLink ,
21- NavbarMenuTrigger ,
22- } from "fumadocs-ui/layouts/home/navbar" ;
23- import { GithubInfo } from "fumadocs-ui/components/github-info" ;
24- import useSWR from "swr" ;
2515
2616export const Route = createFileRoute ( "/" ) ( {
2717 component : Home ,
@@ -70,89 +60,8 @@ function SmallFeature({
7060}
7161
7262function Home ( ) {
73- const { data, isLoading } = useSWR (
74- "https://api.github.com/repos/OrcaCD/orca-cd/releases/latest" ,
75- // oxlint-disable-next-line promise/prefer-await-to-then
76- ( ...args ) => fetch ( ...args ) . then ( ( res ) => res . json ( ) ) ,
77- ) ;
78-
7963 return (
80- < HomeLayout
81- { ...baseOptions ( ) }
82- links = { [
83- {
84- type : "menu" ,
85- on : "menu" ,
86- text : "Documentation" ,
87- items : [
88- {
89- text : "Introduction" ,
90- url : "/docs" ,
91- icon : < Book /> ,
92- } ,
93- {
94- text : "Installation" ,
95- url : "/docs/setup/installation" ,
96- icon : < Rocket /> ,
97- } ,
98- {
99- text : "Environment Variables" ,
100- url : "/docs/configuration/env-variables" ,
101- icon : < Settings /> ,
102- } ,
103- ] ,
104- } ,
105- {
106- type : "custom" ,
107- on : "nav" ,
108- children : (
109- < NavbarMenu >
110- < NavbarMenuTrigger > Docs</ NavbarMenuTrigger >
111- < NavbarMenuContent >
112- < NavbarMenuLink href = "/docs" >
113- < Book className = "bg-fd-primary text-fd-primary-foreground p-1 mb-2 rounded-md" />
114- < p className = "font-medium" > Introduction</ p >
115- < p className = "text-fd-muted-foreground text-sm" > Welcome to OrcaCD</ p >
116- </ NavbarMenuLink >
117- < NavbarMenuLink href = "/docs/setup/installation" >
118- < Rocket className = "bg-fd-primary text-fd-primary-foreground p-1 mb-2 rounded-md" />
119- < p className = "font-medium" > Installation</ p >
120- < p className = "text-fd-muted-foreground text-sm" >
121- Get OrcaCD running quickly with Docker installation.
122- </ p >
123- </ NavbarMenuLink >
124- < NavbarMenuLink href = "/docs/configuration/env-variables" >
125- < Settings className = "bg-fd-primary text-fd-primary-foreground p-1 mb-2 rounded-md" />
126- < p className = "font-medium" > Environment Variables</ p >
127- < p className = "text-fd-muted-foreground text-sm" >
128- Complete reference for all OrcaCD configuration options.
129- </ p >
130- </ NavbarMenuLink >
131- </ NavbarMenuContent >
132- </ NavbarMenu >
133- ) ,
134- } ,
135- {
136- type : "custom" ,
137- secondary : true ,
138- children : (
139- < a
140- href = "https://github.com/OrcaCD/orca-cd/releases"
141- target = "_blank"
142- rel = "noopener noreferrer"
143- className = "inline-flex items-center rounded-md border border-fd-border bg-fd-card px-1 py-0.5 text-sm text-fd-muted-foreground transition-colors hover:bg-fd-accent"
144- >
145- { isLoading ? "..." : ( data . tag_name ?? "No release yet" ) }
146- </ a >
147- ) ,
148- } ,
149- {
150- type : "custom" ,
151- secondary : true ,
152- children : < GithubInfo owner = "OrcaCD" repo = "orca-cd" className = "flex-row" /> ,
153- } ,
154- ] }
155- >
64+ < HomeLayout { ...baseOptions ( ) } links = { navbarLinks } >
15665 < section className = "relative overflow-hidden border-b border-fd-border" >
15766 < div className = "absolute inset-0 bg-[radial-gradient(ellipse_at_top,var(--color-fd-primary)/0.08,transparent_60%)]" />
15867 < div className = "relative mx-auto max-w-5xl px-6 py-24 text-center md:py-36" >
0 commit comments