Skip to content

Commit d42f956

Browse files
authored
Merge branch 'master' into 1934-cli-docs-consolidation-and-update-for-e-upgrade
Signed-off-by: Owen <owenwahlgren@gmail.com>
2 parents 8566ea6 + 15f6ea2 commit d42f956

File tree

19 files changed

+688
-452
lines changed

19 files changed

+688
-452
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,5 @@ dist
131131
.yarn/install-state.gz
132132
.pnp.*
133133

134-
yarn.lock
134+
yarn.lock
135+
package-lock.json

app/(home)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Layout } from 'fumadocs-ui/layout';
1+
import { Layout, DocsLayout } from 'fumadocs-ui/layout';
22
import type { ReactNode } from 'react';
33
import { Footer } from '@/components/footer';
44
import { homebaseOptions } from '@/app/layout.config';

app/(home)/page.client.tsx

Lines changed: 1 addition & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
'use client';
2+
import { TerminalIcon } from 'lucide-react';
23
import React, {
34
useEffect,
45
useState,
56
Fragment,
67
type ReactElement,
78
} from 'react';
8-
import { IndentDecrease, Layers, MailIcon, MonitorCheck, Settings, SproutIcon, SquareGanttChart, TerminalIcon, Webhook, HomeIcon, FolderCode, BadgeDollarSign, CpuIcon, Files, Folder, Globe, Link, SquareIcon, ArrowLeftRight, Coins, SquareCode, SquareStackIcon, Triangle, ChevronDownIcon, Pyramid } from 'lucide-react';
9-
import { RootToggle } from 'fumadocs-ui/components/layout/root-toggle';
10-
import { Menu, Transition } from '@headlessui/react'
119

1210

1311
export function DeployBlockchainAnimation(): React.ReactElement {
@@ -97,156 +95,4 @@ export function DeployBlockchainAnimation(): React.ReactElement {
9795
</pre>
9896
</div>
9997
);
100-
}
101-
102-
103-
export function HamburgerMenu(): React.ReactElement {
104-
105-
return (
106-
<RootToggle
107-
options={[
108-
{
109-
title: 'Home',
110-
description: '',
111-
icon: <></>,
112-
url: '/',
113-
114-
},
115-
{
116-
title: 'Avalanche Protocol',
117-
description: 'Learn about Avalanche',
118-
icon: <SproutIcon />,
119-
url: '/learn',
120-
},
121-
{
122-
title: 'Smart Contracts',
123-
description: 'Build Apps on Avalanche',
124-
icon: <SquareGanttChart />,
125-
url: '/dapps',
126-
},
127-
{
128-
title: 'Avalanche L1s',
129-
description: 'Build Your L1 Blockchain',
130-
icon: <Layers />,
131-
url: '/avalanche-l1s',
132-
},
133-
{
134-
title: 'EVM Customization',
135-
description: 'Customize the Ethereum VM',
136-
icon: <Pyramid />,
137-
url: '/evm-l1s',
138-
},
139-
{
140-
title: 'Custom Virtual Machines',
141-
description: 'Customize Your Execution Layer',
142-
icon: <IndentDecrease />,
143-
url: '/virtual-machines',
144-
},
145-
{
146-
title: 'Nodes & Validators',
147-
description: 'Participate in the Network',
148-
icon: <MonitorCheck />,
149-
url: '/nodes',
150-
},
151-
{
152-
title: 'Interoperability',
153-
description: 'AWM and Teleporter',
154-
icon: <MailIcon />,
155-
url: '/cross-chain',
156-
},
157-
{
158-
title: 'Tooling',
159-
description: 'CLI, Scripts, and More',
160-
icon: <Settings />,
161-
url: '/tooling',
162-
},
163-
{
164-
title: 'API Docs',
165-
description: 'Avalanche API References',
166-
icon: <Webhook />,
167-
url: '/api-reference',
168-
}
169-
]}
170-
/>
171-
)
172-
}
173-
174-
interface Option {
175-
title: string
176-
description: string
177-
icon: React.ReactNode
178-
url: string
179-
}
180-
181-
interface AcademyDropdownProps {
182-
width?: string
183-
}
184-
185-
const options: Option[] = [
186-
{
187-
title: 'Academy',
188-
description: '',
189-
icon: <></>,
190-
url: '/',
191-
},
192-
{
193-
title: 'Blockchain Fundamentals',
194-
description: 'Understand fundamental blockchain concepts.',
195-
icon: <SquareIcon className="w-5 h-5" />,
196-
url: 'https://academy.avax.network/course/blockchain-fundamentals',
197-
},
198-
{
199-
title: 'Avalanche Fundamentals',
200-
description: 'Overview of Avalanche Consensus, L1s, and VMs.',
201-
icon: <Triangle className="w-5 h-5" />,
202-
url: 'https://academy.avax.network/course/avalanche-fundamentals',
203-
},
204-
{
205-
title: "Multi-Chain Architecture",
206-
description: 'Deploy your own blockchain with multi-chain architecture.',
207-
icon: <SquareStackIcon className="w-5 h-5" />,
208-
url: 'https://academy.avax.network/course/multi-chain-architecture',
209-
},
210-
{
211-
title: "Interchain Messaging",
212-
description: 'Build cross-chain dApps on Avalanche.',
213-
icon: <MailIcon className="w-5 h-5" />,
214-
url: 'https://academy.avax.network/course/interchain-messaging',
215-
},
216-
{
217-
title: "Interchain Token Transfer",
218-
description: 'Transfer assets between Avalanche blockchains.',
219-
icon: <ArrowLeftRight className="w-5 h-5" />,
220-
url: 'https://academy.avax.network/course/interchain-token-transfer',
221-
},
222-
{
223-
title: "Customizing the EVM",
224-
description: 'Add custom precompiles to the EVM.',
225-
icon: <SquareCode className="w-5 h-5" />,
226-
url: 'https://academy.avax.network/course/customizing-evm',
227-
},
228-
{
229-
title: "Layer 1 Tokenomics",
230-
description: 'Design tokenomics for your Avalanche L1.',
231-
icon: <Coins className="w-5 h-5" />,
232-
url: 'https://academy.avax.network/course/l1-tokenomics',
233-
},
234-
{
235-
title: "AvaCloud APIs",
236-
description: 'Use AvaCloud APIs to build web apps.',
237-
icon: <Webhook className="w-5 h-5" />,
238-
url: 'https://academy.avax.network/course/avacloudapis',
239-
},
240-
{
241-
title: "HyperSDK",
242-
description: 'Build high-performance blockchains with HyperSDK.',
243-
icon: <TerminalIcon className="w-5 h-5" />,
244-
url: 'https://academy.avax.network/course/hypersdk',
245-
}
246-
]
247-
248-
export function AcademyDropdown({ width = 'w-72' }: AcademyDropdownProps) {
249-
return (
250-
<RootToggle options={options} />
251-
)
25298
}

app/(home)/page.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { LucideIcon } from 'lucide-react';
33
import {
44
CpuIcon,
55
BadgeDollarSign,
6-
Globe, MailIcon, SproutIcon, SquareGanttChart, IndentDecrease, Layers, MonitorCheck, Settings, Terminal, Cable, Webhook, ArrowUpRight, Command
6+
Globe, MailIcon, SproutIcon, SquareGanttChart, IndentDecrease, Layers, MonitorCheck, Settings, Terminal, Cable, Webhook, ArrowUpRight, Command,
77
} from 'lucide-react';
88
import Link from 'next/link';
99
import type { HTMLAttributes, ReactNode } from 'react';
@@ -12,6 +12,7 @@ import { CodeBlock } from '@/components/code-block';
1212
import { File, Files, Folder } from 'fumadocs-ui/components/files';
1313
import { DeployBlockchainAnimation } from './page.client';
1414

15+
1516
const badgeVariants = cva(
1617
'mb-2 inline-flex size-7 items-center justify-center rounded-full bg-fd-primary font-medium text-fd-primary-foreground',
1718
);
@@ -268,4 +269,11 @@ function Feature({
268269
{props.children}
269270
</div>
270271
);
271-
}
272+
}
273+
274+
interface Option {
275+
title: string
276+
description: string
277+
icon: React.ReactNode
278+
url: string
279+
}

app/global.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,8 @@ h2.text-sm.font-medium {
7979
.hover\:bg-accent:hover {
8080
--tw-bg-opacity: 1;
8181
background-color: hsl(212.99deg 45.23% 89.66%);
82+
}
83+
84+
nav a:not(:first-child) {
85+
display: none;
8286
}

app/integrations/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { Layout } from 'fumadocs-ui/layout';
22
import type { ReactNode } from 'react';
33
import { Footer } from '@/components/footer';
4-
import { baseOptions } from '@/app/layout.config';
4+
import { integrationPageOptions } from '@/app/layout.config';
55

66
export default function HomeLayout({
77
children,
88
}: {
99
children: ReactNode;
1010
}): React.ReactElement {
11-
return <Layout {...baseOptions}>
11+
return <Layout {...integrationPageOptions}>
1212
{children}
1313
<Footer />
1414
</Layout>;

app/layout.client.tsx

Lines changed: 10 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,17 @@
11
'use client';
22
import type { ReactNode } from 'react';
3-
import { AcademyDropdown, HamburgerMenu } from './(home)/page.client';
3+
import { AvalancheLogo } from '@/components/navigation/avalanche-logo';
44

5-
const svgCode = `<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
6-
width="100%" viewBox="0 0 220 190" enable-background="new 0 0 220 190" xml:space="preserve">
7-
<path fill="#010000" opacity="0" stroke="none"
8-
d="
9-
M106.000000,191.000000
10-
C70.687920,191.000000 35.875835,191.000000 1.031875,191.000000
11-
C1.031875,127.726570 1.031875,64.453117 1.031875,1.089830
12-
C74.228607,1.089830 147.457367,1.089830 220.843063,1.089830
13-
C220.843063,64.333038 220.843063,127.666473 220.843063,191.000000
14-
C182.786728,191.000000 144.643356,191.000000 106.000000,191.000000
15-
M108.753487,23.066143
16-
C106.781303,24.703455 104.299789,26.001934 102.939713,28.046438
17-
C99.810646,32.750118 97.235901,37.821735 94.420807,42.735210
18-
C71.899803,82.043488 49.344860,121.332367 26.880989,160.673264
19-
C23.042721,167.395203 25.895014,172.155457 33.583733,172.183975
20-
C48.081749,172.237732 62.580860,172.111847 77.077980,172.237946
21-
C83.770172,172.296158 88.432472,169.499405 91.727638,163.708237
22-
C107.212326,136.494400 122.784348,109.330147 138.378067,82.178566
23-
C141.392197,76.930382 141.523560,71.750351 138.545532,66.532860
24-
C131.114777,53.514198 123.769547,40.442513 116.039948,27.602837
25-
C114.786873,25.521351 111.741776,24.518684 108.753487,23.066143
26-
M189.977249,151.515366
27-
C182.832336,139.327515 175.755188,127.099236 168.514145,114.968781
28-
C164.857819,108.843597 159.019684,108.509308 155.552734,114.306282
29-
C146.170135,129.994598 136.920776,145.764069 127.775551,161.592056
30-
C124.725456,166.870987 127.530586,172.066513 133.547867,172.121841
31-
C152.337845,172.294647 171.131317,172.293900 189.921402,172.129471
32-
C196.006195,172.076218 198.644424,167.142075 195.809311,161.653442
33-
C194.133530,158.409164 192.156281,155.320618 189.977249,151.515366
34-
z"/>
35-
<path fill="#FD3648" opacity="1.000000" stroke="none"
36-
d="
37-
M109.139252,23.041748
38-
C111.741776,24.518684 114.786873,25.521351 116.039948,27.602837
39-
C123.769547,40.442513 131.114777,53.514198 138.545532,66.532860
40-
C141.523560,71.750351 141.392197,76.930382 138.378067,82.178566
41-
C122.784348,109.330147 107.212326,136.494400 91.727638,163.708237
42-
C88.432472,169.499405 83.770172,172.296158 77.077980,172.237946
43-
C62.580860,172.111847 48.081749,172.237732 33.583733,172.183975
44-
C25.895014,172.155457 23.042721,167.395203 26.880989,160.673264
45-
C49.344860,121.332367 71.899803,82.043488 94.420807,42.735210
46-
C97.235901,37.821735 99.810646,32.750118 102.939713,28.046438
47-
C104.299789,26.001934 106.781303,24.703455 109.139252,23.041748
48-
z"/>
49-
<path fill="#FC3648" opacity="1.000000" stroke="none"
50-
d="
51-
M190.145935,151.838699
52-
C192.156281,155.320618 194.133530,158.409164 195.809311,161.653442
53-
C198.644424,167.142075 196.006195,172.076218 189.921402,172.129471
54-
C171.131317,172.293900 152.337845,172.294647 133.547867,172.121841
55-
C127.530586,172.066513 124.725456,166.870987 127.775551,161.592056
56-
C136.920776,145.764069 146.170135,129.994598 155.552734,114.306282
57-
C159.019684,108.509308 164.857819,108.843597 168.514145,114.968781
58-
C175.755188,127.099236 182.832336,139.327515 190.145935,151.838699
59-
z"/>
60-
</svg>`
61-
export function HomeTitle(): React.ReactElement {
62-
return (
63-
<>
64-
<img width="80" height="80" src={`data:image/svg+xml;utf8,${encodeURIComponent(svgCode)}`} className="size-7" alt="logo" />
65-
<span style={{fontSize: "large"}}>Developer Hub</span>
66-
<div className="flex items-center pl-4 space-x-4">
67-
<HamburgerMenu />
68-
<AcademyDropdown />
69-
</div>
70-
</>
71-
);
72-
}
735

74-
export function Title(): React.ReactElement {
75-
return (
76-
<>
77-
<img width="80" height="80" src={`data:image/svg+xml;utf8,${encodeURIComponent(svgCode)}`} className="size-7" alt="logo" />
78-
<span style={{fontSize: "large"}}>Developer Hub</span>
79-
</>
80-
);
81-
}
6+
7+
export function NavbarTitle(): React.ReactElement {
8+
return (
9+
<div className='flex gap-2.5 shrink-0'>
10+
<AvalancheLogo />
11+
<span style={{ fontSize: "large" }}>Developer Hub</span>
12+
</div>
13+
);
14+
}
8215

8316
export function Body({
8417
children,

0 commit comments

Comments
 (0)