Skip to content

Commit

Permalink
Merge pull request #97 from near/develop
Browse files Browse the repository at this point in the history
Deploy prod
  • Loading branch information
ewiner authored Oct 30, 2024
2 parents c820648 + 7574791 commit 1a3b684
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 335 deletions.
31 changes: 5 additions & 26 deletions src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ const sections = [
title: 'Docs',
url: 'https://docs.near.org/',
},
{
title: 'Sandbox',
url: 'https://dev.near.org/sandbox',
},
{
title: 'Tools',
url: 'https://docs.near.org/tools/welcome',
Expand All @@ -66,30 +62,17 @@ const sections = [
},
],
},
{
title: 'Discover',
links: [
{
title: 'Applications',
url: 'https://dev.near.org/applications',
},
{
title: 'Components',
url: 'https://dev.near.org/components',
},
{
title: 'Gateways',
url: 'https://dev.near.org/gateways',
},
],
},
{
title: 'Ecosystem',
links: [
{
title: 'Overview',
url: '/ecosystem',
},
{
title: 'Applications',
url: 'https://dev.near.org/applications',
},
{
title: 'News',
url: 'https://dev.near.org/nearweekapp.near/widget/nearweek.com',
Expand Down Expand Up @@ -127,10 +110,6 @@ const sections = [
title: 'Brand Toolkit',
url: 'https://near.org/brand',
},
{
title: 'Privacy',
url: 'https://dev.near.org/privacy',
},
{
title: 'Terms of Use',
url: 'https://dev.near.org/terms',
Expand Down Expand Up @@ -192,7 +171,7 @@ export const Footer = () => {
</Text>

<ul>
{section.links.map((link) => (
{(section.links || []).map((link) => (
<li key={link.title}>
<Link href={link.url} target={link.url.indexOf('http') === 0 ? '_blank' : undefined}>
{link.title}
Expand Down
26 changes: 3 additions & 23 deletions src/components/navigation/categories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,30 +84,10 @@ export const navigationCategories = [
},

{
title: 'Discover',
title: 'Applications',
visible: 'all',
sections: [
{
title: null,
links: [
{
title: 'Applications',
url: 'https://dev.near.org/applications',
icon: 'ph-app-window ph-bold',
},
{
title: 'Components',
url: 'https://dev.near.org/components',
icon: 'ph-git-fork ph-bold',
},
{
title: 'Gateways',
url: 'https://dev.near.org/gateways',
icon: 'ph-compass ph-bold',
},
],
},
],
url: 'https://dev.near.org/applications',
sections: [],
},

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@
border-radius: 100px;
transition: all 200ms;

a {
color: var(--sand12);
}

a:visited {
color: var(--sand12);
}

&:hover,
&:focus-visible,
&[data-state='open'] {
Expand Down
50 changes: 26 additions & 24 deletions src/components/navigation/desktop/MainNavigationMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,33 +37,35 @@ export const MainNavigationMenu = () => {
onMouseEnter={recordMouseEnter}
onClick={navTriggerClick}
>
{category.title}
{category.url ? <Link href={category.url}>{category.title}</Link> : category.title}
</NavigationMenu.Trigger>

<NavigationMenu.Content className={s.navContent}>
<div className={s.container}>
{category.sections.map((section) => (
<div className={s.section} key={section.title}>
{section.title && <span className={s.sectionTitle}>{section.title}</span>}
{category.sections ? (
<NavigationMenu.Content className={s.navContent}>
<div className={s.container}>
{category.sections.map((section) => (
<div className={s.section} key={section.title}>
{section.title && <span className={s.sectionTitle}>{section.title}</span>}

{section.links.map((link) => (
<div className={s.subSection} key={link.title}>
<i className={`${s.icon} ${link.icon}`} />
<NavigationMenu.Link asChild>
<Link
className={s.navLink}
href={link.url}
target={link.url.indexOf('http') === 0 ? '_blank' : undefined}
>
{link.title}
</Link>
</NavigationMenu.Link>
</div>
))}
</div>
))}
</div>
</NavigationMenu.Content>
{section.links.map((link) => (
<div className={s.subSection} key={link.title}>
<i className={`${s.icon} ${link.icon}`} />
<NavigationMenu.Link asChild>
<Link
className={s.navLink}
href={link.url}
target={link.url.indexOf('http') === 0 ? '_blank' : undefined}
>
{link.title}
</Link>
</NavigationMenu.Link>
</div>
))}
</div>
))}
</div>
</NavigationMenu.Content>
) : null}
</NavigationMenu.Item>
))}
</NavigationMenu.List>
Expand Down
66 changes: 36 additions & 30 deletions src/components/navigation/mobile/AccordionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,44 @@ export const AccordionMenu = (props: Props) => {
<Accordion.Root type="multiple">
{navigationCategories
.filter((category) => category.visible === 'all' || category.visible === 'mobile')
.map((category) => (
<Accordion.Item value={category.title} key={category.title}>
<Accordion.Header className={s.accordionHeader}>
<Accordion.Trigger className={s.accordionTrigger}>
{category.title}
<i className="ph-bold ph-caret-down" />
</Accordion.Trigger>
</Accordion.Header>
.map((category) =>
category.url ? (
<Link key={category.title} className={s.nearAiLink} href={category.url} onClick={props.onCloseMenu}>
{category.title}
</Link>
) : (
<Accordion.Item value={category.title} key={category.title}>
<Accordion.Header className={s.accordionHeader}>
<Accordion.Trigger className={s.accordionTrigger}>
{category.title}
<i className="ph-bold ph-caret-down" />
</Accordion.Trigger>
</Accordion.Header>

<Accordion.Content className={s.accordionContent}>
{category.sections.map((section) => (
<div className={s.section} key={section.title}>
{section.title && <span className={s.sectionTitle}>{section.title}</span>}
<Accordion.Content className={s.accordionContent}>
{category.sections.map((section) => (
<div className={s.section} key={section.title}>
{section.title && <span className={s.sectionTitle}>{section.title}</span>}

{section.links.map((link) => (
<div className={s.subSection} key={link.title}>
<i className={`${s.icon} ${link.icon}`} />
<Link
href={link.url}
target={link.url.indexOf('http') === 0 ? '_blank' : undefined}
key={link.title}
onClick={props.onCloseMenu}
>
{link.title}
</Link>
</div>
))}
</div>
))}
</Accordion.Content>
</Accordion.Item>
))}
{section.links.map((link) => (
<div className={s.subSection} key={link.title}>
<i className={`${s.icon} ${link.icon}`} />
<Link
href={link.url}
target={link.url.indexOf('http') === 0 ? '_blank' : undefined}
key={link.title}
onClick={props.onCloseMenu}
>
{link.title}
</Link>
</div>
))}
</div>
))}
</Accordion.Content>
</Accordion.Item>
),
)}
</Accordion.Root>
</div>
);
Expand Down
Loading

0 comments on commit 1a3b684

Please sign in to comment.