diff --git a/source/server.js b/source/server.js
index 0cc62915b..db37b3657 100644
--- a/source/server.js
+++ b/source/server.js
@@ -15,12 +15,12 @@ const rewrite = basename => ({
app.get('/', function(req, res) {
res.send(`
`)
+ intégration du simulateur sur site tiers [iframe fr]publicodes<`)
})
app.use(
history({
- rewrites: ['infrance', 'mon-entreprise'].map(rewrite)
+ rewrites: ['infrance', 'mon-entreprise', 'publicodes'].map(rewrite)
})
)
diff --git a/source/sites/publi.codes/App.js b/source/sites/publi.codes/App.js
new file mode 100644
index 000000000..65ce5ecea
--- /dev/null
+++ b/source/sites/publi.codes/App.js
@@ -0,0 +1,55 @@
+import React, { useState, useEffect } from 'react'
+
+let Landing = () => {
+ useEffect(() => {
+ var css = document.createElement('style')
+ css.type = 'text/css'
+ css.innerHTML = `
+ #js {
+ animation: appear 0.5s;
+ opacity: 1;
+ }
+ #loading {
+ display: none !important;
+ }`
+ document.body.appendChild(css)
+ })
+ return (
+
+
+
+
+ publi
+
+
+ codes
+
+
+
+ Un lagage de calcul ouvert, lisible en français, contributif, pour
+ encoder les sujets de société.
+
+
+
+ La sécurité sociale et les impôts -{' '}
+ mon-entreprise.fr
+
+
+
+ L'impact climatique de nos gestes du quotidien - futur.eco-{' '}
+ mon-entreprise.fr
+
+
+ )
+}
+
+let ExportedApp = Landing
+
+// Remove loader
+
+if (process.env.NODE_ENV !== 'production') {
+ const { hot } = require('react-hot-loader')
+ ExportedApp = hot(module)(Landing)
+}
+
+export default ExportedApp
diff --git a/source/sites/publi.codes/entry.js b/source/sites/publi.codes/entry.js
new file mode 100644
index 000000000..6e1454f15
--- /dev/null
+++ b/source/sites/publi.codes/entry.js
@@ -0,0 +1,8 @@
+import 'core-js/stable'
+import React from 'react'
+import { render } from 'react-dom'
+import 'regenerator-runtime/runtime'
+import App from './App'
+
+let anchor = document.querySelector('#js')
+render(, anchor)
diff --git a/source/webpack.common.js b/source/webpack.common.js
index 488ad9fa8..bae66df62 100644
--- a/source/webpack.common.js
+++ b/source/webpack.common.js
@@ -22,7 +22,8 @@ module.exports.default = {
'mon-entreprise': './source/sites/mon-entreprise.fr/entry.fr.js',
infrance: './source/sites/mon-entreprise.fr/entry.en.js',
'simulateur-iframe-integration':
- './source/sites/mon-entreprise.fr/iframe-integration-script.js'
+ './source/sites/mon-entreprise.fr/iframe-integration-script.js',
+ publicodes: './source/sites/publi.codes/entry.js'
},
output: {
path: path.resolve('./dist/')
@@ -151,5 +152,17 @@ module.exports.HTMLPlugins = ({ injectTrackingScript = false } = {}) => [
filename: 'mon-entreprise.html',
shareImage: 'https://mon-entreprise.fr/images/logo-share.png',
logo: 'images/logo.svg'
+ }),
+ new HTMLPlugin({
+ template: 'index.html',
+ inject: false,
+ // mon-entreprise.fr :
+ chunks: ['publicodes'],
+ title: 'publicodes - langage et plateforme de pulication de calculs',
+ description:
+ 'Un langage de calcul ouvert, lisible en français, contributif pour encoder et publier les sujets de société.',
+ filename: 'publicodes.html',
+ shareImage: 'https://mon-entreprise.fr/images/logo-share.png',
+ logo: 'https://mon-entreprise.fr/images/illustration.svg'
})
]