Rétablissement de la page de sélection de couleur d'intégration
parent
deb54c86c1
commit
f857e369c1
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="initial-scale=1">
|
||||
<title>Embauche.beta - Choix de la couleur</title>
|
||||
<link href='https://fonts.googleapis.com/css?family=Open+Sans:200,300,400,500,600,700' rel='stylesheet' type='text/css'>
|
||||
|
||||
</head>
|
||||
<style>
|
||||
body {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
.slider-picker {
|
||||
margin: 3em auto 4em;
|
||||
}
|
||||
|
||||
.indication {
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<body>
|
||||
<div id="coulorChooser"></div>
|
||||
<script src="dist/colour-chooser.js"></script>
|
||||
<!-- #1F4382 - #3570B8 - #4A89DC - #4A9DED-->
|
||||
<script src="https://use.fontawesome.com/1da10bbdec.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -25,6 +25,7 @@
|
|||
"ramda": "^0.25.0",
|
||||
"react": "^16.2.0",
|
||||
"react-addons-css-transition-group": "^15.6.2",
|
||||
"react-color": "^2.13.8",
|
||||
"react-dom": "^16.2.0",
|
||||
"react-helmet": "^5.2.0",
|
||||
"react-redux": "^5.0.6",
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
import React, { Component } from 'react'
|
||||
|
||||
import { Provider } from 'react-redux'
|
||||
import DevTools from '../DevTools'
|
||||
import Layout from './Layout'
|
||||
|
||||
export default class App extends Component {
|
||||
|
|
|
@ -49,6 +49,7 @@ export default class Layout extends Component {
|
|||
<Redirect from="/simu/" to="/" />
|
||||
<Redirect from="/simulateur" to="/" />
|
||||
<Redirect from="/iframe.html" to="/" />
|
||||
<Redirect from="/couleur.html" to="/" />
|
||||
<Route component={Route404} />
|
||||
</Switch>
|
||||
</>
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
import 'core-js/fn/promise'
|
||||
|
||||
import React from 'react'
|
||||
import { render } from 'react-dom'
|
||||
import { connect, Provider } from 'react-redux'
|
||||
import { createStore } from 'redux'
|
||||
import reducers from './reducers'
|
||||
import { changeThemeColour } from './actions'
|
||||
import Layout from './containers/Layout'
|
||||
import { SliderPicker } from 'react-color'
|
||||
|
||||
let store = createStore(reducers)
|
||||
|
||||
@connect(
|
||||
state => ({ couleur: state.themeColours.colour }),
|
||||
dispatch => ({
|
||||
changeColour: colour => dispatch(changeThemeColour(colour))
|
||||
})
|
||||
)
|
||||
class MyComponent extends React.Component {
|
||||
changeColour = ({ hex }) => this.props.changeColour(hex)
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<p className="indication">
|
||||
Visualisez sur cette page l'apparence du module pour différentes
|
||||
couleurs principales.
|
||||
</p>
|
||||
<SliderPicker
|
||||
color={this.props.couleur}
|
||||
onChangeComplete={this.changeColour}
|
||||
/>
|
||||
<p className="indication">
|
||||
La couleur sélectionnée, à déclarer comme attribut "data-couleur" du
|
||||
script sur votre page est : <b>{this.props.couleur}</b>
|
||||
</p>
|
||||
<Layout />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
render(
|
||||
<Provider store={store}>
|
||||
<MyComponent />
|
||||
</Provider>,
|
||||
document.querySelector('#coulorChooser')
|
||||
)
|
|
@ -14,11 +14,8 @@ module.exports = {
|
|||
'react-hot-loader/patch',
|
||||
'./source/entry.js'
|
||||
],
|
||||
simulateur: './source/entry-iframe.js'
|
||||
// 'colour-chooser': [
|
||||
// 'babel-polyfill',
|
||||
// './source/entry-colour-chooser.js'
|
||||
// ]
|
||||
simulateur: './source/entry-iframe.js',
|
||||
'colour-chooser': ['@babel/polyfill', './source/entry-colour-chooser.js']
|
||||
},
|
||||
output: {
|
||||
path: path.resolve('./dist/'),
|
||||
|
|
Loading…
Reference in New Issue