Ajout d'un bas de page À propos

pull/166/head
mama 2018-02-05 13:29:59 +01:00
parent bdf7a4646e
commit a4005dd982
3 changed files with 37 additions and 2 deletions

View File

@ -94,3 +94,20 @@ nav a {
right: 0.3em;
font-size: 150%;
}
#footer {
position: fixed;
right: 1em;
bottom: 1em;
}
#footer a {
font-size: 95%;
color: rgb(75, 75, 102);
}
#footer a:hover {
color: black;
}
#footer i {
margin: 0.1em;
}

View File

@ -10,7 +10,7 @@ import { withRouter } from 'react-router'
iframe: state.iframe,
textColourOnWhite: state.themeColours.textColourOnWhite
}))
export default class Header extends Component {
export class Header extends Component {
state = {
mobileNavVisible: false
}
@ -89,3 +89,20 @@ let Links = ({ toggle }) => (
</Link>
</div>
)
@withRouter
export class Footer extends Component {
render() {
let appMode = ['/simu', '/regle'].find(t =>
this.props.location.pathname.includes(t)
)
if (!appMode) return null
return (
<div id="footer">
<Link to="/à-propos">
À propos <i className="fa fa-question-circle" aria-hidden="true" />
</Link>
</div>
)
}
}

View File

@ -16,7 +16,7 @@ import Integration from 'Components/pages/Integration'
import About from 'Components/pages/About'
import ReactPiwik from 'Components/Tracker'
import createHistory from 'history/createBrowserHistory'
import Header from 'Components/pages/Header'
import { Header, Footer } from 'Components/pages/Header'
import { getIframeOption } from '../utils'
const piwik = new ReactPiwik({
@ -59,6 +59,7 @@ export default class Layout extends Component {
<Redirect from="/couleur.html" to="/" />
<Route component={Route404} />
</Switch>
<Footer />
</>
</Router>
)