You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
2.0 KiB
64 lines
2.0 KiB
5 years ago
|
import React, {Component} from "react";
|
||
5 years ago
|
import {
|
||
|
Collapse,
|
||
|
Navbar,
|
||
|
NavbarToggler,
|
||
|
Nav,
|
||
5 years ago
|
NavItem
|
||
5 years ago
|
} from 'reactstrap'
|
||
5 years ago
|
import {Link} from "react-router-dom";
|
||
5 years ago
|
|
||
|
import logo from '../../logos/logo-color.svg';
|
||
5 years ago
|
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
|
||
|
import {faRocket} from "@fortawesome/free-solid-svg-icons";
|
||
5 years ago
|
|
||
|
class Header extends Component {
|
||
|
|
||
|
constructor(props) {
|
||
|
super(props);
|
||
5 years ago
|
|
||
|
this.toggle = this.toggle.bind(this);
|
||
5 years ago
|
this.state = {
|
||
5 years ago
|
isOpen: false
|
||
|
};
|
||
|
}
|
||
|
|
||
|
toggle() {
|
||
|
this.setState({
|
||
|
isOpen: !this.state.isOpen
|
||
|
});
|
||
5 years ago
|
}
|
||
|
|
||
|
render(){
|
||
5 years ago
|
return (
|
||
|
<header>
|
||
|
<Navbar color="light" light expand="md">
|
||
5 years ago
|
<Link to="/" className="navbar-brand">
|
||
5 years ago
|
<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>
|
||
5 years ago
|
</Link>
|
||
5 years ago
|
<NavbarToggler onClick={this.toggle} />
|
||
|
<Collapse isOpen={this.state.isOpen} navbar>
|
||
|
<Nav className="ml-auto" navbar>
|
||
|
<NavItem>
|
||
5 years ago
|
<Link className="text-primary nav-link" to="/create-election/"><FontAwesomeIcon icon={faRocket} className="mr-2"/> Démarrer un vote</Link>
|
||
5 years ago
|
</NavItem>
|
||
|
</Nav>
|
||
|
</Collapse>
|
||
|
</Navbar>
|
||
|
</header>
|
||
|
);
|
||
5 years ago
|
}
|
||
|
}
|
||
|
export default Header;
|