Add some header and footer content with scss

pull/4/head
Clement G 5 years ago committed by guhur
parent 0fc6221390
commit 6c068dbcd6

@ -14,21 +14,21 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link rel="apple-touch-icon" sizes="57x57" href="%PUBLIC_URL%/favion/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="%PUBLIC_URL%/favion/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="%PUBLIC_URL%/favion/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="%PUBLIC_URL%/favion/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="%PUBLIC_URL%/favion/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="%PUBLIC_URL%/favion/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="%PUBLIC_URL%/favion/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="%PUBLIC_URL%/favion/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="%PUBLIC_URL%/favion/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="%PUBLIC_URL%/favion/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/favion/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="%PUBLIC_URL%/favion/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favion/favicon-16x16.png">
<link rel="apple-touch-icon" sizes="57x57" href="%PUBLIC_URL%/favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="%PUBLIC_URL%/favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="%PUBLIC_URL%/favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="%PUBLIC_URL%/favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="%PUBLIC_URL%/favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="%PUBLIC_URL%/favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="%PUBLIC_URL%/favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="%PUBLIC_URL%/favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="%PUBLIC_URL%/favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="%PUBLIC_URL%/favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="%PUBLIC_URL%/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="%PUBLIC_URL%/favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="%PUBLIC_URL%/favicon/favicon-16x16.png">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="%PUBLIC_URL%/favion/ms-icon-144x144.png">
<meta name="msapplication-TileImage" content="%PUBLIC_URL%/favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<title>Mieux Voter</title>
</head>

@ -11,7 +11,7 @@ function App() {
<Router>
<div>
<Header />
<Routes />
<Routes />
<Footer />
</div>
</Router>

@ -8,14 +8,15 @@ import Result from "./components/views/Result";
import UnknownView from "./components/views/UnknownView";
function Routes() {
return (
<Switch>
<Route exact path="/" component={Home} />
<Route path="/create-ballot" component={CreateBallot} />
<Route path="/vote" component={Vote} />
<Route path="/result" component={Result} />
<Route component={UnknownView} />
</Switch>
return (<main>
<Switch>
<Route exact path="/" component={Home} />
<Route path="/create-ballot" component={CreateBallot} />
<Route path="/vote" component={Vote} />
<Route path="/result" component={Result} />
<Route component={UnknownView} />
</Switch>
</main>
);
}

@ -10,9 +10,14 @@ class Footer extends Component {
render(){
return(
<div >
<h1>FOOTER</h1>
</div>
<footer className="text-center">
<a href="https://github.com/MieuxVoter">Code source</a>
<span className="m-2">-</span>
<a href="https://mieuxvoter.fr/">Qui sommes nous ?</a>
<div className="mt-2">
MieuxVoter &copy;
</div>
</footer>
)
}
}

@ -1,19 +1,63 @@
import React, {Component} from "react";
import {
Collapse,
Navbar,
NavbarToggler,
NavbarBrand,
Nav,
NavItem,
NavLink,
} from 'reactstrap';
import logo from '../../logos/logo-color.svg';
class Header extends Component {
constructor(props) {
super(props);
this.toggle = this.toggle.bind(this);
this.state = {
}
isOpen: false
};
}
toggle() {
this.setState({
isOpen: !this.state.isOpen
});
}
render(){
return(
<div >
<h1>HEADER</h1>
</div>
)
return (
<header>
<Navbar color="light" light expand="md">
<NavbarBrand href="/">
<div className="d-flex flex-row">
<div className="align-self-center">
<img src={logo} alt="logo" height="32"/>
</div>
<div className="align-self-center ml-2">
<div className="logo-text">
<h1>Plateforme de vote
<small>Jugement Majoritaire</small>
</h1>
</div>
</div>
</div>
</NavbarBrand>
<NavbarToggler onClick={this.toggle} />
<Collapse isOpen={this.state.isOpen} navbar>
<Nav className="ml-auto" navbar>
<NavItem>
<NavLink href="/create-ballot/">Démarrer un vote</NavLink>
</NavItem>
</Nav>
</Collapse>
</Navbar>
</header>
);
}
}
export default Header;

@ -1,6 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './scss/custom-bootstrap.scss';
import './scss/App.scss';
import App from './App';
import * as serviceWorker from './serviceWorker';

@ -0,0 +1,25 @@
.logo-text > h1{
font-size:16px;
font-weight:bold;
margin:0;
line-height:1;
}
.logo-text > h1 > small{
display:block;
letter-spacing: 0.09em;
}
main{
padding:80px 0;
min-height:500px;
}
header{
position:fixed;
width:100%;
}
footer{
padding:25px;
}

@ -1,5 +1,24 @@
// Override default variables before the import
$body-bg: #2943a0;
$mv-color: #2943a0;
$body-bg: #000000;
// Import Bootstrap and its default variables
@import '~bootstrap/scss/bootstrap.scss';
@import '~bootstrap/scss/bootstrap.scss';
main{
background-color:$mv-color;
}
footer {
background-color:$body-bg;
color:#999;
}
footer a{
color:#999;
}
footer a:hover{
color:#fff;
}

Loading…
Cancel
Save