|
| 1 | +/** |
| 2 | + * Shared navigation configuration - Single Source of Truth |
| 3 | + * |
| 4 | + * This file defines navigation items in a simple format that can be used by: |
| 5 | + * - Mobile dropdown (navbar-dropdown.tsx) |
| 6 | + * - Desktop nav (via transformation to fumadocs format in layout.config.tsx) |
| 7 | + * |
| 8 | + * IMPORTANT: When adding/removing nav items, update this file ONLY. |
| 9 | + * Both mobile and desktop navigation will automatically sync. |
| 10 | + */ |
| 11 | + |
| 12 | +export interface NavItem { |
| 13 | + text: string; |
| 14 | + href: string; |
| 15 | + external?: boolean; |
| 16 | +} |
| 17 | + |
| 18 | +export interface NavSection { |
| 19 | + title: string; |
| 20 | + href: string; |
| 21 | + items: NavItem[]; |
| 22 | +} |
| 23 | + |
| 24 | +/** |
| 25 | + * Navigation sections with dropdown menus |
| 26 | + * These appear as expandable sections in mobile and dropdown menus on desktop |
| 27 | + */ |
| 28 | +export const menuSections: NavSection[] = [ |
| 29 | + { |
| 30 | + title: 'Academy', |
| 31 | + href: '/academy', |
| 32 | + items: [ |
| 33 | + { text: 'Avalanche L1 Academy', href: '/academy?path=avalanche-l1' }, |
| 34 | + { text: 'Entrepreneur Academy', href: '/academy?path=entrepreneur' }, |
| 35 | + { text: 'Blockchain Academy', href: '/academy?path=blockchain' }, |
| 36 | + ], |
| 37 | + }, |
| 38 | + { |
| 39 | + title: 'Documentation', |
| 40 | + href: '/docs/primary-network', |
| 41 | + items: [ |
| 42 | + { text: 'Primary Network', href: '/docs/primary-network' }, |
| 43 | + { text: 'Node RPCs', href: '/docs/rpcs/c-chain' }, |
| 44 | + { text: 'Data APIs', href: '/docs/api-reference/data-api' }, |
| 45 | + { text: 'ACPs', href: '/docs/acps' }, |
| 46 | + { text: 'Developer Tools', href: '/docs/tooling' }, |
| 47 | + ], |
| 48 | + }, |
| 49 | + { |
| 50 | + title: 'Console', |
| 51 | + href: '/console', |
| 52 | + items: [ |
| 53 | + { text: 'Console', href: '/console' }, |
| 54 | + { text: 'Interchain Messaging Tools', href: '/console/icm/setup' }, |
| 55 | + { text: 'Interchain Token Transfer Tools', href: '/console/ictt/setup' }, |
| 56 | + { text: 'Testnet Faucet', href: '/console/primary-network/faucet' }, |
| 57 | + ], |
| 58 | + }, |
| 59 | + { |
| 60 | + title: 'Events', |
| 61 | + href: '/hackathons', |
| 62 | + items: [ |
| 63 | + { text: 'Hackathons', href: '/hackathons' }, |
| 64 | + { text: 'Avalanche Calendar', href: 'https://lu.ma/calendar/cal-Igl2DB6quhzn7Z4', external: true }, |
| 65 | + { text: 'Community Driven Events', href: 'https://lu.ma/Team1?utm_source=builder_hub', external: true }, |
| 66 | + { text: 'Campus Connect', href: '/university' }, |
| 67 | + ], |
| 68 | + }, |
| 69 | + { |
| 70 | + title: 'Grants', |
| 71 | + href: '/grants', |
| 72 | + items: [ |
| 73 | + { text: 'Codebase', href: '/codebase' }, |
| 74 | + { text: 'InfraBUIDL', href: '/grants/infrabuidl' }, |
| 75 | + { text: 'InfraBUIDL (AI)', href: '/grants/infrabuidlai' }, |
| 76 | + { text: 'Retro9000', href: 'https://retro9000.avax.network', external: true }, |
| 77 | + { text: 'Blizzard Fund', href: 'https://www.blizzard.fund/', external: true }, |
| 78 | + ], |
| 79 | + }, |
| 80 | + { |
| 81 | + title: 'Blog', |
| 82 | + href: '/guides', |
| 83 | + items: [ |
| 84 | + { text: 'Latest Articles', href: '/guides' }, |
| 85 | + { text: 'Browse All Posts', href: '/guides' }, |
| 86 | + ], |
| 87 | + }, |
| 88 | + { |
| 89 | + title: 'Stats', |
| 90 | + href: '/stats/overview', |
| 91 | + items: [ |
| 92 | + { text: 'Playground', href: '/stats/playground' }, |
| 93 | + { text: 'Avalanche L1s', href: '/stats/overview' }, |
| 94 | + { text: 'C-Chain', href: '/stats/l1/c-chain' }, |
| 95 | + { text: 'Primary Network Validators', href: '/stats/validators' }, |
| 96 | + ], |
| 97 | + }, |
| 98 | + { |
| 99 | + title: 'Integrations', |
| 100 | + href: '/integrations', |
| 101 | + items: [ |
| 102 | + { text: 'Wallet SDKs', href: '/integrations#Wallet%20SDKs' }, |
| 103 | + { text: 'Block Explorers', href: '/integrations#Block%20Explorers' }, |
| 104 | + { text: 'Blockchain-as-a-Service', href: '/integrations#Blockchain%20as%20a%20Service' }, |
| 105 | + { text: 'Data Feeds', href: '/integrations#Data%20Feeds' }, |
| 106 | + { text: 'Indexers', href: '/integrations#Indexers' }, |
| 107 | + { text: 'Browse All Integrations', href: '/integrations' }, |
| 108 | + ], |
| 109 | + }, |
| 110 | +]; |
| 111 | + |
| 112 | +/** |
| 113 | + * Single navigation items (no dropdown) |
| 114 | + * These appear as simple links in both mobile and desktop navigation |
| 115 | + */ |
| 116 | +export const singleItems: NavItem[] = [ |
| 117 | + { text: 'Explorer', href: '/explorer' }, |
| 118 | +]; |
0 commit comments