Skip to content
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
62 changes: 62 additions & 0 deletions components/Footer/footer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"socialLinks": [
{
"icon": "github",
"link": "https://github.com/nodejs/node",
"alt": "GitHub"
},
{
"icon": "discord",
"link": "https://discord.gg/nodejs",
"alt": "Discord"
},
{
"icon": "mastodon",
"link": "https://social.lfx.dev/@nodejs",
"alt": "Mastodon"
},
{
"icon": "bluesky",
"link": "https://bsky.app/profile/nodejs.org",
"alt": "Bluesky"
},
{
"icon": "twitter",
"link": "https://twitter.com/nodejs",
"alt": "Twitter"
},
{
"icon": "slack",
"link": "https://slack-invite.openjsf.org/",
"alt": "Slack"
},
{
"icon": "linkedin",
"link": "https://www.linkedin.com/company/node-js",
"alt": "LinkedIn"
}
],
"footerLinks": [
{ "link": "https://openjsf.org/", "text": "OpenJS Foundation" },
{ "link": "https://terms-of-use.openjsf.org/", "text": "Terms of Use" },
{ "link": "https://privacy-policy.openjsf.org/", "text": "Privacy Policy" },
{ "link": "https://bylaws.openjsf.org/", "text": "Bylaws" },
{
"link": "https://github.com/openjs-foundation/cross-project-council/blob/main/CODE_OF_CONDUCT.md",
"text": "Code of Conduct"
},
{
"link": "https://trademark-policy.openjsf.org/",
"text": "Trademark Policy"
},
{ "link": "https://trademark-list.openjsf.org/", "text": "Trademark List" },
{
"link": "https://www.linuxfoundation.org/cookies/",
"text": "Cookie Policy"
},
{
"link": "https://github.com/nodejs/node/security/policy",
"text": "Security Policy"
}
]
}
45 changes: 45 additions & 0 deletions components/Footer/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import Footer from '@node-core/ui-components/Containers/Footer';
import NavItem from '@node-core/ui-components/Containers/NavBar/NavItem';

import { socialLinks, footerLinks } from './footer.json';

// The Node.js Project is legally obligated to include the following text.
// It should not be modified unless explicitly requested by OpenJS staff.
const LegalSlot = (
<>
<p>
Copyright <a href="https://openjsf.org/">OpenJS Foundation</a> and Node.js
contributors. All rights reserved. The{' '}
<a href="https://openjsf.org/">OpenJS Foundation</a> has registered
trademarks and uses trademarks. For a list of trademarks of the{' '}
<a href="https://openjsf.org/">OpenJS Foundation</a>, please see our{' '}
<a href="https://trademark-policy.openjsf.org/">Trademark Policy</a> and{' '}
<a href="https://trademark-list.openjsf.org/">Trademark List</a>.
Trademarks and logos not indicated on the{' '}
<a href="https://trademark-list.openjsf.org/">
list of OpenJS Foundation trademarks
</a>{' '}
are trademarks™ or registered® trademarks of their respective holders. Use
of them does not imply any affiliation with or endorsement by them.
</p>

<p>
{footerLinks.map(({ link, text }) => (
<NavItem key={link} type="footer" href={link}>
{text}
</NavItem>
))}
</p>
</>
);

/**
* Footer component for MDX documentation pages
*/
export default ({ metadata }) => (
<Footer
pathname={metadata.path}
navigation={{ socialLinks }}
slots={{ legal: LegalSlot }}
/>
);
9 changes: 4 additions & 5 deletions components/Layout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { SpeedInsights } from '@vercel/speed-insights/react';
import NavBar from '../Navigation';
import MetaBar from '../Metabar';
import SideBar from '../Sidebar';

import Footer from '#theme/Footer';
import Footer from '../Footer';

/**
* @typedef {Object} Props
Expand All @@ -22,8 +21,8 @@ import Footer from '#theme/Footer';
*/
export default ({ metadata, headings, readingTime, children }) => (
<>
<Analytics />
<SpeedInsights />
<Analytics basePath="/learn/_vercel" />
<SpeedInsights basePath="/learn/_vercel" />
<NavBar />
<Article>
<SideBar metadata={metadata} />
Expand All @@ -40,6 +39,6 @@ export default ({ metadata, headings, readingTime, children }) => (
/>
</div>
</Article>
<Footer />
<Footer metadata={metadata} />
</>
);
6 changes: 6 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,11 @@
"destination": "/learn/$1",
"permanent": true
}
],
"rewrites": [
{
"source": "/learn/_vercel/(.*)",
"destination": "https://node-learn-pages.vercel.app/_vercel/$1"
}
]
}
Loading