From b0be2bcdbe04dd7047c32be1054801a9c16abb3b Mon Sep 17 00:00:00 2001 From: mama Date: Fri, 13 Oct 2017 18:18:49 +0200 Subject: [PATCH 1/2] =?UTF-8?q?Ajout=20du=20lien=20sur=20l'accueil=20vers?= =?UTF-8?q?=20la=20liste=20des=20r=C3=A8gles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le but est de préparer le SEO du site. Le contenu, de plus en plus conséquent, est totalement inexploité aujourd'hui. --- source/components/HomeEmbauche.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/components/HomeEmbauche.js b/source/components/HomeEmbauche.js index 4e76518f3..b5d23e35c 100644 --- a/source/components/HomeEmbauche.js +++ b/source/components/HomeEmbauche.js @@ -1,5 +1,6 @@ import React, { Component } from 'react' import './HomeEmbauche.css' +import {Link} from 'react-router-dom' export default class HomeEmbauche extends Component { render() { @@ -9,7 +10,7 @@ export default class HomeEmbauche extends Component {
Secrétariat général pour la modernisation de l'action publique
-
From d74095483381d82d86627adffe39cbb9cc9cfd72 Mon Sep 17 00:00:00 2001 From: mama Date: Fri, 13 Oct 2017 18:32:18 +0200 Subject: [PATCH 2/2] =?UTF-8?q?Ajout=20de=20la=20page=20base=20de=20r?= =?UTF-8?q?=C3=A8gles?= 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

+
    + {rules.map(rule => ( +
  • + {capitalise0(rule.name)} +
  • + ))} +
+
+ ) + } +} 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 (
- - + + +