Skip to content

Commit 6d92d6d

Browse files
committed
Move footer to homepage only
1 parent 5c18f45 commit 6d92d6d

File tree

3 files changed

+35
-9
lines changed

3 files changed

+35
-9
lines changed

docusaurus.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ export default {
9797
},
9898
],
9999
},
100-
footer: {
101-
copyright: `Copyright © ${new Date().getFullYear()} React Navigation. Built with <a target="_blank" rel="noreferrer noopener" href="https://docusaurus.io/">Docusaurus</a>, <a target="_blank" rel="noreferrer noopener" href="https://pages.github.com/">GitHub Pages</a>, and <a target="_blank" rel="noreferrer noopener" href="https://www.netlify.com/">Netlify</a>.`,
102-
},
103100
},
104101
plugins: [
105102
'./src/plugins/react-navigation-versions.mjs',

src/pages/home/Footer.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import React from 'react';
2+
3+
const links = [
4+
{ title: 'Docusaurus', href: 'https://docusaurus.io/' },
5+
{ title: 'GitHub Pages', href: 'https://pages.github.com/' },
6+
{ title: 'Netlify', href: 'https://www.netlify.com/' },
7+
];
8+
9+
export default function Footer() {
10+
return (
11+
<footer class="footer">
12+
<div class="container container-fluid">
13+
<div class="footer__bottom text--center">
14+
<div class="footer__copyright">
15+
Copyright © 2024 React Navigation. Built with{' '}
16+
{links.map((link, index) => (
17+
<React.Fragment key={link.href}>
18+
{index > 0 && ', '}
19+
<a target="_blank" rel="noreferrer noopener" href={link.href}>
20+
{link.title}
21+
</a>
22+
</React.Fragment>
23+
))}
24+
.
25+
</div>
26+
</div>
27+
</div>
28+
</footer>
29+
);
30+
}

src/pages/index.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
import React from 'react';
2-
import Layout from '@theme/Layout';
3-
import Link from '@docusaurus/Link';
41
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
5-
import useBaseUrl from '@docusaurus/useBaseUrl';
6-
import sponsors from '../data/sponsors';
2+
import Layout from '@theme/Layout';
3+
import React from 'react';
74

8-
import Splash from './home/Splash';
95
import Features from './home/Features';
6+
import Footer from './home/Footer';
7+
import Splash from './home/Splash';
108
import Sponsors from './home/Sponsors';
119

1210
const features = [
@@ -52,6 +50,7 @@ function Home() {
5250
<Splash />
5351
<Features />
5452
<Sponsors />
53+
<Footer />
5554
</Layout>
5655
);
5756
}

0 commit comments

Comments
 (0)