mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-04 12:47:14 +02:00
chore(v2): temporarily add available urls to footer (#1022)
* chore(v2): temporarily add available urls to footer * use react-router Link * nits
This commit is contained in:
parent
f62029c30e
commit
c277f46a60
3 changed files with 33 additions and 4 deletions
|
@ -1,8 +1,9 @@
|
|||
import React from 'react';
|
||||
import {Link} from 'react-router-dom';
|
||||
|
||||
import styles from './styles.css';
|
||||
|
||||
function Footer() {
|
||||
function Footer(props) {
|
||||
return (
|
||||
<footer className={styles.footer}>
|
||||
<section className={styles.footerRow}>
|
||||
|
@ -66,6 +67,32 @@ function Footer() {
|
|||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/* This is for v2 development only to know which are the available routes */}
|
||||
<div className={styles.footerColumn}>
|
||||
<h3 className={styles.footerColumnTitle}>Pages</h3>
|
||||
<ul className={styles.footerList}>
|
||||
{props.pagesMetadatas.map(metadata => (
|
||||
<li key={metadata.permalink} className={styles.footerListItem}>
|
||||
<Link className={styles.footerLink} to={metadata.permalink}>
|
||||
{metadata.permalink}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
<div className={styles.footerColumn}>
|
||||
<h3 className={styles.footerColumnTitle}>Docs</h3>
|
||||
<ul className={styles.footerList}>
|
||||
{Object.values(props.docsMetadatas).map(metadata => (
|
||||
<li key={metadata.permalink} className={styles.footerListItem}>
|
||||
<Link className={styles.footerLink} to={metadata.permalink}>
|
||||
{metadata.permalink}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
{/* Remove above when launching v2 */}
|
||||
</section>
|
||||
<section className={styles.copyright}>
|
||||
<span>Copyright © {new Date().getFullYear()} Facebook Inc.</span>
|
||||
|
|
|
@ -8,9 +8,11 @@ export default class Home extends React.Component {
|
|||
<div>
|
||||
<Helmet>
|
||||
<title>Todo App</title>
|
||||
<link rel="stylesheet" type="text/css" href="/css/basic.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/css/todo.css" />
|
||||
</Helmet>
|
||||
<Todo />
|
||||
<div className="homeContainer">
|
||||
<Todo />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ button {
|
|||
font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
body {
|
||||
.todoContainer {
|
||||
font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
line-height: 1.4em;
|
||||
background: #f5f5f5;
|
Loading…
Add table
Reference in a new issue