Skip to content

Commit 0854746

Browse files
committed
feat: add legal text + fix analytics
1 parent a7352ee commit 0854746

2 files changed

Lines changed: 102 additions & 5 deletions

File tree

components/Footer/index.jsx

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
import Footer from '@node-core/ui-components/Containers/Footer';
2+
import NavItem from '@node-core/ui-components/Containers/NavBar/NavItem';
3+
4+
const SOCIAL_LINKS = [
5+
{ icon: 'github', link: 'https://github.com/nodejs/node', alt: 'GitHub' },
6+
{ icon: 'discord', link: 'https://discord.gg/nodejs', alt: 'Discord' },
7+
{ icon: 'mastodon', link: 'https://social.lfx.dev/@nodejs', alt: 'Mastodon' },
8+
{
9+
icon: 'bluesky',
10+
link: 'https://bsky.app/profile/nodejs.org',
11+
alt: 'Bluesky',
12+
},
13+
{ icon: 'twitter', link: 'https://twitter.com/nodejs', alt: 'Twitter' },
14+
{ icon: 'slack', link: 'https://slack-invite.openjsf.org/', alt: 'Slack' },
15+
{
16+
icon: 'linkedin',
17+
link: 'https://www.linkedin.com/company/node-js',
18+
alt: 'LinkedIn',
19+
},
20+
];
21+
22+
const FOOTER_LINKS = [
23+
{
24+
link: 'https://openjsf.org/',
25+
text: 'OpenJS Foundation',
26+
},
27+
{
28+
link: 'https://terms-of-use.openjsf.org/',
29+
text: 'Terms of Use',
30+
},
31+
{
32+
link: 'https://privacy-policy.openjsf.org/',
33+
text: 'Privacy Policy',
34+
},
35+
{
36+
link: 'https://bylaws.openjsf.org/',
37+
text: 'Bylaws',
38+
},
39+
{
40+
link: 'https://github.com/openjs-foundation/cross-project-council/blob/main/CODE_OF_CONDUCT.md',
41+
text: 'Code of Conduct',
42+
},
43+
{
44+
link: 'https://trademark-policy.openjsf.org/',
45+
text: 'Trademark Policy',
46+
},
47+
{
48+
link: 'https://trademark-list.openjsf.org/',
49+
text: 'Trademark List',
50+
},
51+
{
52+
link: 'https://www.linuxfoundation.org/cookies/',
53+
text: 'Cookie Policy',
54+
},
55+
{
56+
link: 'https://github.com/nodejs/node/security/policy',
57+
text: 'Security Policy',
58+
},
59+
];
60+
61+
// The Node.js Project is legally obligated to include the following text.
62+
// It should not be modified unless explicitly requested by OpenJS staff.
63+
const LegalSlot = (
64+
<>
65+
<p>
66+
Copyright <a href="https://openjsf.org/">OpenJS Foundation</a> and Node.js
67+
contributors. All rights reserved. The{' '}
68+
<a href="https://openjsf.org/">OpenJS Foundation</a> has registered
69+
trademarks and uses trademarks. For a list of trademarks of the{' '}
70+
<a href="https://openjsf.org/">OpenJS Foundation</a>, please see our{' '}
71+
<a href="https://trademark-policy.openjsf.org/">Trademark Policy</a> and{' '}
72+
<a href="https://trademark-list.openjsf.org/">Trademark List</a>.
73+
Trademarks and logos not indicated on the{' '}
74+
<a href="https://trademark-list.openjsf.org/">
75+
list of OpenJS Foundation trademarks
76+
</a>{' '}
77+
are trademarks™ or registered® trademarks of their respective holders. Use
78+
of them does not imply any affiliation with or endorsement by them.
79+
</p>
80+
81+
{FOOTER_LINKS.map(({ link, text }) => (
82+
<NavItem key={link} type="footer" href={link}>
83+
{text}
84+
</NavItem>
85+
))}
86+
</>
87+
);
88+
89+
/**
90+
* Footer component for MDX documentation pages
91+
*/
92+
export default ({ metadata }) => (
93+
<Footer
94+
pathname={metadata.path}
95+
navigation={{ socialLinks: SOCIAL_LINKS }}
96+
slots={{ legal: LegalSlot }}
97+
/>
98+
);

components/Layout/index.jsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import { SpeedInsights } from '@vercel/speed-insights/react';
66
import NavBar from '../Navigation';
77
import MetaBar from '../Metabar';
88
import SideBar from '../Sidebar';
9-
10-
import Footer from '#theme/Footer';
9+
import Footer from '../Footer';
1110

1211
/**
1312
* @typedef {Object} Props
@@ -22,8 +21,8 @@ import Footer from '#theme/Footer';
2221
*/
2322
export default ({ metadata, headings, readingTime, children }) => (
2423
<>
25-
<Analytics />
26-
<SpeedInsights />
24+
<Analytics basePath="https://node-learn-pages.vercel.app/" />
25+
<SpeedInsights basePath="https://node-learn-pages.vercel.app/" />
2726
<NavBar />
2827
<Article>
2928
<SideBar metadata={metadata} />
@@ -40,6 +39,6 @@ export default ({ metadata, headings, readingTime, children }) => (
4039
/>
4140
</div>
4241
</Article>
43-
<Footer />
42+
<Footer metadata={metadata} />
4443
</>
4544
);

0 commit comments

Comments
 (0)