From ec7726d709981854a3d5423267feaeafcf0c0287 Mon Sep 17 00:00:00 2001 From: mama Date: Fri, 19 May 2017 11:25:13 +0200 Subject: [PATCH] =?UTF-8?q?SEO=20:=20Ajout=20d'un=20titre=20et=20descripti?= =?UTF-8?q?on=20html=20sur=20les=20pages=20/simu=20et=20/r=C3=A8gle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 3 +-- package.json | 1 + source/components/Simulateur.js | 11 +++++++++-- source/components/rule/Rule.js | 6 ++++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index da1e042b7..c4fd8a24c 100644 --- a/index.html +++ b/index.html @@ -5,9 +5,8 @@ - - Simulateur d'embauche + diff --git a/package.json b/package.json index 14e7fc6d6..6ef27934f 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "ramda": "^0.23.0", "react": "^15.5.4", "react-dom": "^15.5.4", + "react-helmet": "^5.1.3", "react-redux": "^5.0.5", "react-router-dom": "^4.1.1", "reduce-reducers": "^0.1.2", diff --git a/source/components/Simulateur.js b/source/components/Simulateur.js index d8f3757bf..809dec225 100644 --- a/source/components/Simulateur.js +++ b/source/components/Simulateur.js @@ -12,6 +12,7 @@ import 'Components/Simulateur.css' import classNames from 'classnames' import {capitalise0} from '../utils' import Satisfaction from 'Components/Satisfaction' +import Helmet from 'react-helmet' let situationSelector = formValueSelector('conversation') @@ -60,12 +61,18 @@ export default class extends React.Component { reinitalise = () => { this.props.resetForm(this.name) this.props.startConversation(this.name) - } + }, + title = sim('titre') || capitalise0(this.rule['titre'] || this.rule['nom']) return (
-

{sim('titre') || capitalise0(this.rule['titre'] || this.rule['nom'])}

+ + {title} + {sim('sous-titre') && + } + +

{title}

{sim('sous-titre') &&
{sim('sous-titre')}
} diff --git a/source/components/rule/Rule.js b/source/components/rule/Rule.js index 7e31e394e..370c325f9 100644 --- a/source/components/rule/Rule.js +++ b/source/components/rule/Rule.js @@ -13,6 +13,8 @@ import {capitalise0} from '../../utils' import References from './References' import Algorithm from './Algorithm' import Examples from './Examples' +import Helmet from 'react-helmet' + // situationGate function useful for testing : let testingSituationGate = v => // eslint-disable-line no-unused-vars @@ -66,6 +68,10 @@ export default class Rule extends Component { return (
+ + {capitalise0(name)} + +

{type} {capitalise0(name)}