-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4a11b6c
Showing
8 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.DS_Store | ||
npm-debug.log | ||
node_modules | ||
.gatsby-context.js | ||
public | ||
_sample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
siteTitle="VS insoumis" | ||
siteDescription="Le comparateur des Insoumis" | ||
linkPrefix = "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import React from "react"; | ||
import { prefixLink } from "gatsby-helpers"; | ||
import Helmet from "react-helmet"; | ||
|
||
const BUILD_TIME = new Date().getTime(); | ||
|
||
const HTML = ({ body }) => { | ||
const head = Helmet.rewind(); | ||
|
||
let css; | ||
if (process.env.NODE_ENV === "production") { | ||
css = <style dangerouslySetInnerHTML={{ __html: require("!raw!./public/styles.css") }} />; | ||
} | ||
|
||
return ( | ||
<html lang="fr"> | ||
<head> | ||
<meta charSet="utf-8" /> | ||
<meta httpEquiv="x-ua-compatible" content="IE=edge,chrome=1" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
|
||
{head.title.toComponent()} | ||
{head.meta.toComponent()} | ||
{css} | ||
</head> | ||
<body> | ||
<div id="react-mount" dangerouslySetInnerHTML={{ __html: body }} /> | ||
<script src={prefixLink(`/bundle.js?t=${BUILD_TIME}`)} /> | ||
</body> | ||
</html> | ||
); | ||
} | ||
|
||
HTML.propTypes = { | ||
body: React.PropTypes.string, | ||
}; | ||
|
||
export default HTML; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"name": "vs-insoumis", | ||
"private": true, | ||
"dependencies": { | ||
"react": "^15.4.2", | ||
"react-helmet": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"babel-eslint": "^7.1.1", | ||
"eslint": "^3.14.1", | ||
"eslint-plugin-react": "^6.9.0", | ||
"gatsby": "^0.12.38" | ||
}, | ||
"scripts": { | ||
"start": "gatsby develop", | ||
"build": "gatsby build", | ||
"build:serve": "gatsby serve-build", | ||
"deploy": "gatsby build --prefix-links && gh-pages -d public" | ||
}, | ||
"eslintConfig": { | ||
"parser": "babel-eslint", | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"es6": true | ||
}, | ||
"extends": ["eslint:recommended", "plugin:react/recommended"], | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"experimentalObjectRestSpread": true, | ||
"jsx": true | ||
}, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"react" | ||
], | ||
"rules": { | ||
"indent": ["error", 2], | ||
"linebreak-style": ["error", "unix"], | ||
"quotes": ["error", "single"], | ||
"semi": ["error", "always"], | ||
"no-console": "warn" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
path: /404.html | ||
--- | ||
# 404 NOT FOUND | ||
|
||
Oops, voilà qui est étrange ! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
|
||
const Template = ({ children }) => ( | ||
<div> | ||
<header>La France Insoumise VS</header> | ||
<nav>Liens</nav> | ||
<div>{children}</div> | ||
</div> | ||
); | ||
|
||
export default Template; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from 'react'; | ||
|
||
const Index = () => ( | ||
<div>Index</div> | ||
); | ||
|
||
export default Index; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import React from 'react'; | ||
|
||
const Markdown = ({ route }) => | ||
<div dangerouslySetInnerHTML={{ __html: route.page.data.body }} />; | ||
|
||
export default Markdown; |