Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove broken links on homepage, navbar, and footer #96

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = [
},
],
},
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I launched our project on BOS Gateway last year and was collaborating with other chains through the platform. I’m a bit surprised to hear it’s suddenly being removed. Based on what criteria is it being removed, and why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple things happening here:

  • All the BOS tech still works, but we've stopped using the "BOS" branding. The idea of BOS is the same as the idea of Chain Abstraction, and since that's the term the industry is more accustomed to, that's what we're using instead.
  • We didn't see many people using near.org as a directory of reusable components or to find other BOS gateways. But people do like to see what applications are built on NEAR (whether BOS gateways or other apps), so that's what we want to highlight.

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