From d74095483381d82d86627adffe39cbb9cc9cfd72 Mon Sep 17 00:00:00 2001 From: mama Date: Fri, 13 Oct 2017 18:32:18 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20la=20page=20base=20de=20r=C3=A8gle?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/RulesList.css | 4 +++ source/components/RulesList.js | 22 ++++++++++++++ source/containers/Layout.js | 54 +++++++++++++++++---------------- 3 files changed, 54 insertions(+), 26 deletions(-) create mode 100644 source/components/RulesList.css create mode 100644 source/components/RulesList.js diff --git a/source/components/RulesList.css b/source/components/RulesList.css new file mode 100644 index 000000000..ac54b3c4a --- /dev/null +++ b/source/components/RulesList.css @@ -0,0 +1,4 @@ +#RulesList ul { + margin: 0 auto; + max-width: 860px; +} diff --git a/source/components/RulesList.js b/source/components/RulesList.js new file mode 100644 index 000000000..e25ca3157 --- /dev/null +++ b/source/components/RulesList.js @@ -0,0 +1,22 @@ +import React, { Component } from "react" +import { rules, encodeRuleName, nameLeaf } from "Engine/rules.js" +import { Link } from "react-router-dom" +import './RulesList.css' +import {capitalise0} from '../utils' + +export default class RulesList extends Component { + render() { + return ( +
+

Notre base de règles

+ +
+ ) + } +} diff --git a/source/containers/Layout.js b/source/containers/Layout.js index 423974def..b281a938e 100644 --- a/source/containers/Layout.js +++ b/source/containers/Layout.js @@ -1,44 +1,45 @@ -import React, { Component } from 'react' -import './Layout.css' -import './reset.css' -import {Link, Route, Router, Switch} from 'react-router-dom' -import HomeEmbauche from 'Components/HomeEmbauche' -import HomeSyso from 'Components/HomeSyso' -import Rule from 'Components/rule/Rule' -import Route404 from 'Components/Route404' -import Contact from 'Components/Contact' -import Simulateur from 'Components/Simulateur' -import Results from 'Components/Results' - -import ReactPiwik from 'react-piwik'; -import createHistory from 'history/createBrowserHistory' +import React, { Component } from "react" +import "./Layout.css" +import "./reset.css" +import { Link, Route, Router, Switch } from "react-router-dom" +import HomeEmbauche from "Components/HomeEmbauche" +import HomeSyso from "Components/HomeSyso" +import Rule from "Components/rule/Rule" +import Route404 from "Components/Route404" +import Contact from "Components/Contact" +import Simulateur from "Components/Simulateur" +import Results from "Components/Results" +import RulesList from "Components/RulesList" +import ReactPiwik from "react-piwik" +import createHistory from "history/createBrowserHistory" const piwik = new ReactPiwik({ - url: 'stats.data.gouv.fr', - siteId: 39, - trackErrors: true, -}); + url: "stats.data.gouv.fr", + siteId: 39, + trackErrors: true +}) export default class Layout extends Component { - history = createHistory(); + history = createHistory() render() { - let displayWarning = ['/simu/', '/regle/'].find(t => window.location.href.toString().indexOf(t) > -1) + let displayWarning = ["/simu/", "/regle/", "/regles"].find( + t => window.location.href.toString().indexOf(t) > -1 + ) // track the initial pageview - ReactPiwik.push(['trackPageView']) + ReactPiwik.push(["trackPageView"]) return (
- - + + +