-
Contribuer
Tout le développement se fait de façon transparente et contributive
diff --git a/source/components/pages/Header.css b/source/components/pages/Header.css
index 7231ca171..64c747d53 100644
--- a/source/components/pages/Header.css
+++ b/source/components/pages/Header.css
@@ -1,82 +1,65 @@
-
-@media screen and (max-width:860px) {
- nav:not(.bm-item-list) > a {
- display: none;
- }
- nav > a {
- display: block;
- }
+#header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 1em;
+ border-bottom: 1px solid #ebebeb;
}
-@media screen and (min-width:860px) {
- nav > div {
- display: none;
- }
+
+#header h1 {
+ font-size: calc(1vw + 150%);
+ font-weight: 600;
+}
+
+#header #marianne {
+ width: calc(3vw + 5em);
+}
+#menuButton {
+ font-size: 300%;
+ color: #3c4963;
+ margin: 0 0.4em;
+}
+nav {
+ font-size: 150%;
+}
+
+nav > a {
+ color: #3c4963;
+}
+@media screen and (max-width: 860px) {
nav {
+ display: none;
+ }
+ nav.visible {
+ display: block;
position: absolute;
- right: 1em;
- top: 4.5em;
- font-size: 90%;
+ width: 100%;
+ background: white;
+ left: 0;
+ top: 4.8em;
+ bottom: 0;
}
- nav > a {
- display: inline;
- margin: .6em;
+ nav.visible #links {
+ margin: 6em 1em;
}
- nav > a > i {
- margin: 0 .3em;
- font-size: 120% !important;
+ nav.visible a {
+ font-size: 200%;
+ color: #3c4963;
+ display: block;
+ margin: 1.2em;
}
}
+@media screen and (min-width: 860px) {
+ #menuButton {
+ display: none;
+ }
+ nav {
+ margin-right: 2em;
+ }
-/* Position and sizing of burger button */
-.bm-burger-button {
- position: fixed;
- width: 4em;
- height: 3em;
- right: 2em;
- top: 3em;
-}
-
-/* Color/shape of burger icon bars */
-.bm-burger-bars {
- background: #373a47;
-}
-
-/* Position and sizing of clickable cross button */
-.bm-cross-button {
- height: 24px;
- width: 24px;
- display: none;
-}
-
-/* Color/shape of close button cross */
-.bm-cross {
- background: #bdc3c7;
-}
-
-/* General sidebar styles */
-.bm-menu {
- background: white;
- padding: 3em 0.6em;
- font-size: 200%;
-}
-
-/* Morph shape necessary with bubble or elastic */
-.bm-morph-shape {
- fill: #373a47;
-}
-
-/* Wrapper for item list */
-.bm-item-list {
- padding: 0.8em;
- height: auto !important;
-}
-
-.bm-item-list a {
- margin-bottom: 0.6em;
-}
-
-/* Styling of overlay */
-.bm-overlay {
- background: rgba(0, 0, 0, 0.3);
+ nav a {
+ margin: 0.8em;
+ font-size: 85%;
+ }
}
diff --git a/source/components/pages/Header.js b/source/components/pages/Header.js
index a7491c939..ca39464ad 100644
--- a/source/components/pages/Header.js
+++ b/source/components/pages/Header.js
@@ -1,10 +1,20 @@
import React, { Component } from 'react'
-import { slide as Menu } from 'react-burger-menu'
import 'Components/pages/Header.css'
import { Link } from 'react-router-dom'
export default class Header extends Component {
+ state = {
+ mobileNavVisible: false
+ }
+ togglemobileNavVisible = () =>
+ this.setState({ mobileNavVisible: !this.state.mobileNavVisible })
+
render() {
+ let displayHeader = !['/simu/', '/regle/'].find(
+ t => window.location.href.toString().includes(t)
+ )
+ if (!displayHeader) return null
+
return (
)
}
}
-let Links = () => <>
-
-
-
-
- Intégrer le module
-
-
- Contribuer
-
-
- Toutes nos règles
-
-
- À propos
-
->
+let Links = ({toggle}) => (
+
+
+ Intégrer le module
+
+
+ Contribuer
+
+
+ Toutes nos règles
+
+
+ À propos
+
+
+)
diff --git a/source/components/pages/Home.js b/source/components/pages/Home.js
index 7b69859cd..ffb0fbfe2 100644
--- a/source/components/pages/Home.js
+++ b/source/components/pages/Home.js
@@ -3,7 +3,6 @@ import './Pages.css'
import './Home.css'
import ReactPiwik from 'Components/Tracker' //TODO réintégrer Piwik
import TargetSelection from '../TargetSelection'
-import Header from './Header'
export default class Home extends Component {
@@ -12,10 +11,6 @@ export default class Home extends Component {
return (
-
-
Simulateurs d'embauche
-
LE SLOGAN ICI
-
diff --git a/source/components/pages/Integration.css b/source/components/pages/Integration.css
index 4abd9cec9..cb0c300a7 100644
--- a/source/components/pages/Integration.css
+++ b/source/components/pages/Integration.css
@@ -1,10 +1,8 @@
#integration p {
margin-top: 3em;
vertical-align: top;
- position: relative;
}
#integration code {
- position: relative;
display: inline-block;
font-size: 80%;
width: 90%;
diff --git a/source/components/pages/Integration.js b/source/components/pages/Integration.js
index 3c3635f9d..30d10c3d2 100644
--- a/source/components/pages/Integration.js
+++ b/source/components/pages/Integration.js
@@ -1,13 +1,11 @@
import React, { Component } from 'react'
import './Integration.css'
import './Pages.css'
-import Header from './Header'
export default class MyComponent extends Component {
render() {
return (
-
Intégrez le module Web
Intégrez le module en ajoutant une ligne à votre page Web :
diff --git a/source/components/pages/Pages.css b/source/components/pages/Pages.css
index 59bdbdf81..21d509a81 100644
--- a/source/components/pages/Pages.css
+++ b/source/components/pages/Pages.css
@@ -1,7 +1,7 @@
.page {
max-width: 45em;
- margin: 2em auto;
+ margin: 1em auto;
padding: 0 2em;
font-size: 130%;
}
@@ -11,7 +11,7 @@
}
.page h1 {
- margin: 5em 0 1em;
+ margin: 1em 0 1em;
color: #3C4963;
font-size: 220%;
}
diff --git a/source/components/pages/RulesList.js b/source/components/pages/RulesList.js
index af6b7ec2c..ac7e755ea 100644
--- a/source/components/pages/RulesList.js
+++ b/source/components/pages/RulesList.js
@@ -4,13 +4,11 @@ import { Link } from "react-router-dom"
import './RulesList.css'
import './Pages.css'
import {capitalise0} from '../../utils'
-import Header from './Header'
export default class RulesList extends Component {
render() {
return (
-
Les règles aujourd'hui implémentées
{rules.map(rule => (
diff --git a/source/containers/Layout.css b/source/containers/Layout.css
index ab59e9b2f..a21fb7e46 100644
--- a/source/containers/Layout.css
+++ b/source/containers/Layout.css
@@ -13,20 +13,6 @@ body {
}
-#header h1 {
- margin-top: 3em;
- text-align: center;
- font-size: 300%
-}
-
-#header #marianne {
- position: absolute;
- left: 2em;
- top: 2em;
- width: 8em;
-}
-
-
#content {
margin-top: 1.5em;
}
@@ -38,7 +24,6 @@ a {
h1 {
margin: 0 .1em;
- font-size: 250%;
font-weight: 400;
}
diff --git a/source/containers/Layout.js b/source/containers/Layout.js
index 3672bca15..e0c5cc996 100644
--- a/source/containers/Layout.js
+++ b/source/containers/Layout.js
@@ -16,6 +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'
const piwik = new ReactPiwik({
url: 'stats.data.gouv.fr',
@@ -31,19 +32,22 @@ export default class Layout extends Component {
return (
-
-
-
-
-
-
-
-
-
-
-
-
-
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
)
}