Skip to content

Commit

Permalink
Rework Navigation Into Sidebar (ensdomains#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemans authored Sep 24, 2024
1 parent 1697be5 commit b7960cb
Show file tree
Hide file tree
Showing 17 changed files with 736 additions and 336 deletions.
8 changes: 6 additions & 2 deletions app/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
--shiki-token-link: #0969da;
}

/* @font-face {
@font-face {
font-family: 'Satoshi';
font-style: normal;
font-weight: normal;
Expand All @@ -43,7 +43,7 @@
font-family: 'Satoshi';
font-display: swap;
src: url('/fonts/sans-serif/Satoshi-Variable.ttf') format('truetype');
} */
}

@font-face {
font-family: 'Inter';
Expand Down Expand Up @@ -119,6 +119,10 @@ html.dark {
color-scheme: dark;
}

.scrollbar {
scrollbar-gutter: stable;
}

.scrollbar::-webkit-scrollbar {
@apply bg-transparent w-2;
}
Expand Down
6 changes: 5 additions & 1 deletion app/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ export default function RootLayout(properties) {
const { children } = properties;

return (
<html lang="en" suppressHydrationWarning className="not-system">
<html
lang="en"
suppressHydrationWarning
className="not-system scrollbar"
>
<head>
<link rel="icon" href="/favicon.ico" sizes="any" />
<script
Expand Down
1 change: 1 addition & 0 deletions app/local/config/navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export type SectionData = {
icon: ReactNode;
activePattern?: RegExp;
links: routeGroup[];
expanded?: boolean;
};

export const isSectionData = (element: any): element is SectionData => {
Expand Down
88 changes: 35 additions & 53 deletions app/local/config/navigation/protocol.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/* eslint-disable sonarjs/no-duplicate-string */
import { SectionData } from '../navigation';

export const showWIP = false;

export const navigation: SectionData[] = [
{
name: 'Intro',
Expand Down Expand Up @@ -339,21 +341,38 @@ export const navigation: SectionData[] = [
links: [
{
title: '',
links: [{ title: '👋 Welcome', href: '/dao' }],
links: [{ title: 'Welcome', href: '/dao' }],
},
{
title: '🧑‍🎓 The interesting bits',
title: 'The interesting bits',
links: [
{
title: '📜 Constitution',
title: 'Constitution',
href: '/dao/constitution',
},
{ title: '🏛️ Foundation', href: '/dao/foundation' },
{ title: '🔷 Token', href: '/dao/token' },
{ title: 'Foundation', href: '/dao/foundation' },
{ title: 'Token & Airdrop', href: '/dao/token' },
],
},
{
title: 'Good to know',
links: [
{
title: 'Submit Proposal',
href: '/dao/proposals/submit',
},
{
title: 'DAO Stewards',
href: '/dao/stewards',
},
{
title: 'Working Group Rules',
href: '/dao/wg/rules',
},
],
},
{
title: '🔗 Links',
title: 'Links',
links: [
{
title: 'Discourse',
Expand All @@ -377,42 +396,8 @@ export const navigation: SectionData[] = [
},
],
},
// {
// title: 'Governance Process',
// links: [
// {
// title: 'Governance Process',
// href: '/dao/governance/process',
// },
// {
// title: 'Moderator Checklist',
// href: '/dao/governance/moderator',
// },
// ],
// },
{
title: '🧠 Good to know',
links: [
{
title: 'Submit Proposal',
href: '/dao/proposals/submit',
},
{
title: 'DAO Stewards',
href: '/dao/stewards',
},
// {
// title: 'Voting Procedure',
// href: '/dao/proposals/voting',
// },
{
title: 'Working Group Rules',
href: '/dao/wg/rules',
},
],
},
{
title: '📖 Proposals Term 5',
title: 'Proposals Term 5',
links: [
{
// eslint-disable-next-line prettier/prettier
Expand Down Expand Up @@ -490,7 +475,7 @@ export const navigation: SectionData[] = [
],
},
{
title: '📙 Proposals Term 4',
title: 'Proposals Term 4',
links: [
{
title: '4.10 - [Social] Transfer ENS Root Key Ownership to the ENS DAO',
Expand Down Expand Up @@ -535,7 +520,7 @@ export const navigation: SectionData[] = [
],
},
{
title: '📙 Proposals Term 3',
title: 'Proposals Term 3',
links: [
{
title: '3.7 - [Social] Approval of ENS Name Normalization Standard (ENSIP-15)',
Expand Down Expand Up @@ -576,7 +561,7 @@ export const navigation: SectionData[] = [
],
},
{
title: '📙 Proposals Term 2',
title: 'Proposals Term 2',
links: [
{
title: '2.2.5 - [Social] Selection of an ENS endowment fund manager',
Expand Down Expand Up @@ -605,7 +590,7 @@ export const navigation: SectionData[] = [
],
},
{
title: '📗 Proposals Term 1',
title: 'Proposals Term 1',
links: [
{
title: '1.9 - [Executable] Fund the Protocol Guild pilot with 200,000 $ENS',
Expand Down Expand Up @@ -662,7 +647,7 @@ export const navigation: SectionData[] = [
],
},
{
title: '📘 Proposals Term 0',
title: 'Proposals Term 0',
links: [
{
title: '0.4 - [Social] Proposal: Creation of Foundational Working Groups and Working Group Rules',
Expand Down Expand Up @@ -692,17 +677,14 @@ export const navigation: SectionData[] = [
links: [
{
title: '',
links: [{ title: 'Welcome', href: '/ensip', icon: '👋' }],
links: [
{ title: 'What is an ENSIP?', href: '/ensip', icon: '👋' },
],
},
{
title: 'Improvement Proposals (ENSIPs)',
title: 'Proposals',
icon: '📖',
links: [
{
title: 'Explained',
href: '/ensip',
icon: '🧑‍🏫',
},
{ title: '1 - ENS', href: '/ensip/1' },
{ title: '2 - Hash Registrar', href: '/ensip/2' },
{
Expand Down
7 changes: 7 additions & 0 deletions app/local/content/demos/LiveDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ETHRegistryDemo } from './ethregistry/ETHRegistryDemo';
import { ETHRegistryRenewDemo } from './ethregistryrenew/ETHRegistryRenewDemo';
import { ListNamesDemo } from './listnames/ListNamesDemo';
import { NameLookupDemo } from './namelookup/NameLookup';
import { ResolverPlaygroundDemo } from './resolverplayground';
import { ResolverTestDemo } from './resolvertest';
import { ReverseSetNameForDemo } from './reverse-set-name-for/ReverseSetNameForDemo';
import { SendTransactionDemo } from './send-transaction/SendTransaction';
Expand Down Expand Up @@ -56,6 +57,12 @@ const demos = {
chains: new Set([mainnet.id, sepolia.id, holesky.id]),
component: ListNamesDemo,
},
resolverdemo: {
title: 'Resolver Playground',
wallet: true,
chains: new Set([mainnet.id, sepolia.id, holesky.id]),
component: ResolverPlaygroundDemo,
},
};

export const LiveDemo: FC<{ id?: string }> = ({ id }) => {
Expand Down
2 changes: 1 addition & 1 deletion app/local/content/demos/border/ChainSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const ChainSwitcher: FC<{ available?: Set<number> }> = ({
chainId: Number.parseInt(event.target.value, 10) as any,
});
}}
className="chainselector border-ens-light-border bg-ens-light-background-primary dark:border-ens-dark-border dark:bg-ens-dark-background-primary h-full rounded-xl px-2"
className="chainselector h-full rounded-xl border-ens-light-border bg-ens-light-background-primary px-2 dark:border-ens-dark-border dark:bg-ens-dark-background-primary"
>
{(
[
Expand Down
Loading

0 comments on commit b7960cb

Please sign in to comment.