Ajout du titre de la page règle

pull/1/head
Mael Thomas 2016-12-16 17:28:42 +01:00
parent 147ab63fdd
commit 18a7e3205d
6 changed files with 30 additions and 4 deletions

View File

@ -59,6 +59,7 @@
"yaml-loader": "^0.2.0"
},
"scripts": {
"start": "node source/server.js"
"start": "node source/server.js",
"compile": "NODE_ENV='production' webpack --config source/webpack.config.js --optimize-minimize --optimize-dedupe --optimize-occurrence-order"
}
}

View File

@ -1,4 +1,4 @@
- Cotisation: Indemnité de Fin de Contrat
- Cotisation: Indemnité de fin de contrat
attributs:
type: indemnité
alias: Prime de précarité

View File

@ -1,3 +1,11 @@
#variable {
font-size: 150%;
}
#variable h1 {
padding: 0 3em;
}
#variable pre {
padding: 1em 2em;
}

View File

@ -5,10 +5,14 @@ import JSONTree from 'react-json-tree'
export default class Rule extends Component {
render() {
let json = findRuleByName(this.props.params.name)[2]
let {
name
} = this.props.params,
json = findRuleByName(name)[2]
return (
<div id="variable">
<h1>{name}</h1>
<pre>
<code className="yaml">
<JSONTree getItemString={() => ''} theme={theme} hideRoot="true" shouldExpandNode={() => true} data={json} />

View File

@ -2,6 +2,11 @@ body {
font-family: 'Open Sans';
}
#site-logo {
position: fixed;
left: 1em;
top: 1.5em;
}
#warning {
padding: .2em 0;

View File

@ -1,10 +1,18 @@
import React, { Component } from 'react'
import './Layout.css'
import {Link} from 'react-router'
export default class Layout extends Component {
render() {
return (<div>
<div id="header"></div>
<div id="header">
{
this.props.location.pathname != '/' &&
<Link to="/">
<img id="site-logo" src={require('../images/logo.png')} style={{width: '100px'}} />
</Link>
}
</div>
{this.props.children}
<div id="warning">
Attention ! Tout le contenu de ce site est hautement expérimental.