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:
Endilie Yacop Sucipto 2018-10-08 18:10:12 +08:00 committed by GitHub
parent f62029c30e
commit c277f46a60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 4 deletions

View file

@ -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>

View file

@ -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>
);
}

View file

@ -21,7 +21,7 @@ button {
font-smoothing: antialiased;
}
body {
.todoContainer {
font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif;
line-height: 1.4em;
background: #f5f5f5;