Skip to content

Commit 1ff8eec

Browse files
committed
v3.1
1 parent 621d6e2 commit 1ff8eec

File tree

6 files changed

+107
-46
lines changed

6 files changed

+107
-46
lines changed

app/academy/layout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ const docsOptions: DocsLayoutProps = {
2424
icon: <ArrowUpRight />
2525
},
2626
{
27-
text: 'Integrations',
28-
url: '/integrations',
27+
text: 'Guides',
28+
url: '/guides',
2929
icon: <ArrowUpRight />
3030
},
3131
{
32-
text: 'Grants',
33-
url: '/grants',
32+
text: 'Integrations',
33+
url: '/integrations',
3434
icon: <ArrowUpRight />
3535
},
3636
],

app/api/search/route.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { getDocsPages } from '@/utils/docs-loader'
22
import { createSearchAPI } from 'fumadocs-core/search/server'
33
import { getCoursePages } from '@/utils/course-loader';
4+
import { getIntegrationPages } from '@/utils/integrations-loader';
45

56
export const { GET } = createSearchAPI('advanced', {
67
indexes: await Promise.all([
@@ -21,6 +22,15 @@ export const { GET } = createSearchAPI('advanced', {
2122
id: page.url,
2223
structuredData: loadedData.structuredData
2324
}
24-
})
25+
}),
26+
...getIntegrationPages().map(async (page) => {
27+
const loadedData = await page.data.load()
28+
return {
29+
title: page.data.title,
30+
url: page.url,
31+
id: page.url,
32+
structuredData: loadedData.structuredData
33+
}
34+
})
2535
])
2636
})

app/docs/layout.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ const docsOptions: DocsLayoutProps = {
2525
icon: <ArrowUpRight />
2626
},
2727
{
28-
text: 'Integrations',
29-
url: '/integrations',
28+
text: 'Guides',
29+
url: '/guides',
3030
icon: <ArrowUpRight />
3131
},
3232
{
33-
text: 'Grants',
34-
url: '/grants',
33+
text: 'Integrations',
34+
url: '/integrations',
3535
icon: <ArrowUpRight />
3636
},
3737
],

app/layout.config.tsx

Lines changed: 70 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,13 @@ import { type BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
33
import { AvalancheLogo } from '@/components/navigation/avalanche-logo';
44
import { AlbumIcon, Sprout, Layers, MonitorCheck, Mail, Webhook } from 'lucide-react';
55
import Image from 'next/image';
6-
import Preview from '@/public/9000-logo.png';
6+
import Preview9000 from '@/public/9000-logo.png';
77

88
export const linkItems: LinkItemType[] = [
99
{
1010
icon: <AlbumIcon />,
11-
text: 'Academy',
12-
url: '/academy',
13-
active: 'nested-url',
14-
},
15-
{
16-
icon: <AlbumIcon />,
17-
text: 'Grants',
18-
url: '/grants',
11+
text: 'Guides',
12+
url: '/guide',
1913
active: 'nested-url',
2014
},
2115
{
@@ -24,12 +18,6 @@ export const linkItems: LinkItemType[] = [
2418
url: '/integrations',
2519
active: 'nested-url',
2620
},
27-
{
28-
icon: <AlbumIcon />,
29-
text: 'Guides',
30-
url: '/guide',
31-
active: 'nested-url',
32-
},
3321
];
3422

3523
export const baseOptions: BaseLayoutProps = {
@@ -53,8 +41,73 @@ export const baseOptions: BaseLayoutProps = {
5341
banner: (
5442
<div className="-mx-3 -mt-3">
5543
<Image
56-
src={Preview}
57-
alt="Perview"
44+
src={Preview9000}
45+
alt="Preview"
46+
className="rounded-t-lg object-cover"
47+
style={{
48+
maskImage:
49+
'linear-gradient(to bottom,white 60%,transparent)',
50+
}}
51+
/>
52+
</div>
53+
),
54+
className: 'md:row-span-2',
55+
},
56+
icon: <Sprout />,
57+
text: 'Avalanche Protocol',
58+
description: 'Learn about the Avalanche Protocol',
59+
url: '/docs/protocol',
60+
},
61+
{
62+
icon: <Layers />,
63+
text: 'Avalanche L1s',
64+
description: "Build your own sovereign Layer 1 blockchain using Avalanche's battle-tested infrastructure and tooling.",
65+
url: '/docs/avalanche-l1s',
66+
menu: {
67+
className: 'lg:col-start-2',
68+
},
69+
},
70+
{
71+
icon: <MonitorCheck />,
72+
text: 'Nodes & Validators',
73+
description: 'Learn about hardware requirements, staking mechanisms, rewards, and best practices for securing and maintaining validator infra for Avalanche ecosystem.',
74+
url: '/docs/nodes',
75+
menu: {
76+
className: 'lg:col-start-2',
77+
},
78+
},
79+
{
80+
icon: <Mail />,
81+
text: 'Interoperability',
82+
description: "Explore Avalanche's native cross-chain protocols that enable seamless asset and data transfer across different Avalanche L1s.",
83+
url: '/docs/cross-chain',
84+
menu: {
85+
className: 'lg:col-start-3 lg:row-start-1',
86+
},
87+
},
88+
{
89+
icon: <Webhook />,
90+
text: 'API Docs',
91+
description: "Comprehensive API documentation for interacting with the Primary Network and various Avalanche L1s.",
92+
url: '/docs/api-reference',
93+
menu: {
94+
className: 'lg:col-start-3',
95+
},
96+
},
97+
],
98+
},
99+
{
100+
type: 'menu',
101+
text: 'Academy',
102+
url: '/academy',
103+
items: [
104+
{
105+
menu: {
106+
banner: (
107+
<div className="-mx-3 -mt-3">
108+
<Image
109+
src={Preview9000}
110+
alt="Preview"
58111
className="rounded-t-lg object-cover"
59112
style={{
60113
maskImage:

components/quizzes/quiz.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ const Quiz: React.FC<QuizProps> = ({ quizId }) => {
127127
}
128128

129129
return (
130-
<div className="bg-gray-50 dark:bg-black flex items-center justify-center p-4">
131-
<div className="w-full max-w-2xl bg-white dark:bg-black shadow-lg rounded-lg overflow-hidden">
130+
<div className="dark:bg-black flex items-center justify-center p-4">
131+
<div className="w-full max-w-2xl bg-white dark:bg-neutral-950 shadow-lg rounded-lg overflow-hidden">
132132
<div className="text-center p-4">
133133
<div className="mx-auto flex items-center justify-center mb-4 overflow-hidden">
134134
<Image
@@ -191,7 +191,7 @@ const Quiz: React.FC<QuizProps> = ({ quizId }) => {
191191
{!isAnswerChecked ? (
192192
<button
193193
className={cn(
194-
buttonVariants({ variant: 'default'}),
194+
buttonVariants({ variant: 'default' }),
195195
)}
196196
onClick={checkAnswer}
197197
disabled={selectedAnswers.length === 0}

components/ui/button.tsx

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,35 @@
11
import * as React from "react"
22
import { Slot } from "@radix-ui/react-slot"
33
import { cva, type VariantProps } from "class-variance-authority"
4-
54
import { cn } from "@/lib/utils"
65

76
const buttonVariants = cva(
8-
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
7+
'inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-fd-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fd-ring disabled:pointer-events-none disabled:opacity-50',
98
{
109
variants: {
1110
variant: {
12-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
13-
destructive:
14-
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
11+
default:
12+
'bg-fd-background bg-gradient-to-b from-fd-primary to-fd-primary/60 text-fd-primary-foreground shadow-inner shadow-fd-background/20 hover:bg-fd-primary/90',
1513
outline:
16-
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
14+
'border bg-gradient-to-t from-fd-primary/10 shadow-inner shadow-fd-primary/10 hover:bg-fd-accent/50 hover:text-fd-accent-foreground',
1715
secondary:
18-
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
19-
ghost: "hover:bg-accent hover:text-accent-foreground",
20-
link: "text-primary underline-offset-4 hover:underline",
16+
'border bg-fd-secondary text-fd-secondary-foreground hover:bg-fd-accent hover:text-fd-accent-foreground',
17+
ghost: 'hover:bg-fd-accent hover:text-fd-accent-foreground',
18+
link: 'text-fd-primary underline-offset-4 hover:underline',
2119
},
2220
size: {
23-
default: "h-10 px-4 py-2",
24-
sm: "h-9 rounded-md px-3",
25-
lg: "h-11 rounded-md px-8",
26-
icon: "h-10 w-10",
21+
default: 'h-10 px-4 py-2',
22+
sm: 'h-9 rounded-md px-3',
23+
lg: 'h-11 px-6',
24+
xs: 'px-1.5 py-0.5 text-xs',
2725
},
2826
},
2927
defaultVariants: {
30-
variant: "default",
31-
size: "default",
28+
variant: 'default',
29+
size: 'default',
3230
},
33-
}
34-
)
31+
},
32+
);
3533

3634
export interface ButtonProps
3735
extends React.ButtonHTMLAttributes<HTMLButtonElement>,

0 commit comments

Comments
 (0)