Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# node / npm
node_modules
*.log

# phenomic build
dist

# development
/.chrome
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Chrome",
"type": "chrome",
"request": "launch",
"url": "http://localhost:3333",
"webRoot": "${workspaceRoot}/src",
"userDataDir": "${workspaceRoot}/.chrome",
"sourceMapPathOverrides": {
"webpack:///./src/*": "${webRoot}/*"
}
}
]
}
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Place your settings in this file to overwrite default and user settings.
{
"editor.tabSize": 2,
"search.exclude": {
"**/node_modules": true,
"**/.chrome": true,
"**/build": true,
}
}
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Immigration FAQ

## Install dependencies

```sh
yarn install
```

## Run development server

```sh
yarn start
```

## Build for production

```sh
yarn build
```
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

8 changes: 8 additions & 0 deletions content/404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: PageError
route: 404.html
---
<!---
Content here not used, see ``src/layouts/PageError``
Please edit PageError layout instead.
-->
5 changes: 5 additions & 0 deletions content/faq/also.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Also!
---

Lorem ipsum dolør sit amet, consectetur adipiscing elit. Quisque consequat dui molestie, convallis enim tempus, tempor diam. Maecenas non semper risus. Integer congue mauris sed arcu molestie sodales. Suspendisse non dui quis diam venenatis bibendum in eu ex. Donec eget blandit eros, eget efficitur magna. Aliquam porta nec lorem porta pretium. Integer sit amet rhoncus arcu. Suspendisse ultricies risus eu velit pharetra bibendum. Donec suscipit iaculis rhoncus. Praesent sed elementum mauris, eget mollis odio.
55 changes: 55 additions & 0 deletions content/faq/what-is-pergant.md

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions content/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Immigration FAQ
layout: Homepage
---

1 change: 0 additions & 1 deletion index.md

This file was deleted.

128 changes: 128 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"private": true,
"name": "immigration-faq",
"homepage": "https://immigration-faq.democratizr.com/",
"twitter": "",
"repository": "https://github.com/democratizr/immigration-faq.git",
"scripts": {
"lint": "eslint --ignore-path .gitignore --fix .",
"start": "phenomic start",
"build": "phenomic build",
"serve": "npm run build; http-server dist",
"pretest": "npm run lint",
"test": "npm run build"
},
"phenomic": {
"assets": false,
"CNAME": true
},
"#babel": "webpack-(development|production) are useful for webpack 2, otherwise use development|production",
"babel": {
"env": {
"test": {
"presets": [
"babel-preset-env",
"babel-preset-stage-2",
"babel-preset-react"
]
},
"development": {
"presets": [
"babel-preset-env",
"babel-preset-stage-2",
"babel-preset-react"
],
"plugins": [
"babel-plugin-transform-react-jsx-source",
"babel-plugin-transform-react-jsx-self",
"react-hot-loader/babel"
]
},
"production": {
"presets": [
"babel-preset-react-optimize",
"babel-preset-env",
"babel-preset-stage-2",
"babel-preset-react"
]
},
"webpack-development": {
"presets": [
[
"babel-preset-env",
{
"modules": false
}
],
"babel-preset-stage-2",
"babel-preset-react"
],
"plugins": [
"babel-plugin-transform-react-jsx-source",
"babel-plugin-transform-react-jsx-self",
"react-hot-loader/babel"
]
},
"webpack-production": {
"presets": [
"babel-preset-react-optimize",
[
"babel-preset-env",
{
"modules": false
}
],
"babel-preset-stage-2",
"babel-preset-react"
]
}
}
},
"eslintConfig": {
"root": true,
"extends": "./node_modules/phenomic/lib/eslint-config-recommended/index.js"
},
"stylelint": {
"extends": "./node_modules/phenomic/lib/stylelint-config-recommended/index.js"
},
"devDependencies": {
"babel-cli": "^6.14.0",
"babel-core": "^6.14.0",
"babel-eslint": "^7.0.0",
"babel-loader": "^7.0.0-beta.1",
"babel-plugin-transform-react-jsx-self": "^6.11.0",
"babel-plugin-transform-react-jsx-source": "^6.9.0",
"babel-preset-env": "^1.3.2",
"babel-preset-react": "^6.23.0",
"babel-preset-react-optimize": "^1.0.1",
"babel-preset-stage-2": "^6.22.0",
"classnames": "^2.2.5",
"css-loader": "^0.28.0",
"eslint": "^3.7.1",
"eslint-loader": "^1.7.1",
"eslint-plugin-react": "^6.4.0",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.10.1",
"glamor": "^2.20.25",
"glamorous": "^3.19.0",
"history": "^2.0.0",
"http-server": "^0.10.0",
"npm-run-all": "^1.7.0",
"phenomic": "^0.21.1",
"raw-loader": "^0.5.1",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"react-helmet": "^3.0.0",
"react-hot-loader": "^3.0.0-beta",
"react-redux": "^4.0.0",
"react-router": "^2.3.0",
"react-svg-inline": "^1.1.0",
"react-topbar-progress-indicator": "^1.0.0",
"redux": "^3.0.0",
"style-loader": "^0.13.0",
"stylelint": "^7.2.0",
"warning": "^3.0.0",
"webpack": "^2.3.0",
"whatwg-fetch": "^0.11.0"
}
}
33 changes: 33 additions & 0 deletions scripts/phenomic.browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Hot loading HRM Patch
import "react-hot-loader/patch"
// fetch polyfill
import "whatwg-fetch"
import phenomicClient from "phenomic/lib/client"

import metadata from "../src/metadata.js"
import routes from "../src/routes.js"
import store from "../src/store.js"

phenomicClient({ metadata, routes, store })

// md files processed via phenomic-loader to JSON & generate collection
let mdContext = require.context("../content", true, /\.(md|markdown)$/)
mdContext.keys().forEach(mdContext)

// hot loading
if (module.hot) {

// hot load md
module.hot.accept(mdContext.id, () => {
mdContext = require.context("../content", true, /\.(md|markdown)$/)
const mdHotUpdater = require("phenomic/lib/client/hot-md").default
const requireUpdate = mdHotUpdater(mdContext, window.__COLLECTION__, store)
mdContext.keys().forEach(requireUpdate)
})

// hot load app
module.hot.accept(
[ "../src/metadata.js", "../src/routes.js", "../src/store.js" ],
() => phenomicClient({ metadata, routes, store })
)
}
8 changes: 8 additions & 0 deletions scripts/phenomic.node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import phenomicStatic from "phenomic/lib/static"

import metadata from "../src/metadata.js"
import routes from "../src/routes.js"
import store from "../src/store.js"

export default (options) =>
phenomicStatic({ ...options, metadata, routes, store })
84 changes: 84 additions & 0 deletions src/AppContainer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import glamorous, { ThemeProvider } from 'glamorous';
import PropTypes from 'prop-types';
import React from 'react';

import DefaultHeadMeta from './components/DefaultHeadMeta';
import theme from './config/theme';


const appStyles = `
html { box-sizing: border-box; }

*,
*::before,
*::after {
box-sizing: inherit;
}

html,
body {
margin: 0;
padding: 0;
}

html {
min-height: 100%;
}

body {
color: ${theme.colors.body.color};
background-color: ${theme.colors.body.backgroundColor};
line-height: 1.5rem;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}


a {
font-weight: bold;
text-decoration: none;
color: ${theme.colors.navigation.color};
}

a:hover {
text-decoration: underline;
}

img {
max-width: 100%;
}
`;

const GlobalStyles = () => (
<style dangerouslySetInnerHTML={{ __html: appStyles }} />
);

const Container = glamorous.div({
minHeight: '100vh',
display: 'flex',
flexDirection: 'column',
});

const Content = glamorous.div({
flex: '1 1 auto',
display: 'flex',
alignItems: 'stretch',
flexDirection: 'column',
});

const AppContainer = (props) => (
<ThemeProvider theme={theme}>
<Container>
<GlobalStyles />
<DefaultHeadMeta />
<Content>
{props.children}
</Content>
</Container>
</ThemeProvider>
);

AppContainer.propTypes = {
children: PropTypes.node,
};

export default AppContainer;
13 changes: 13 additions & 0 deletions src/components/ContentWrapper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import glamorous from 'glamorous';


const ContentWrapper = glamorous.div((props, theme) => ({
display: 'flex',
flexDirection: 'column',
alignSelf: 'center',
width: '100%',
maxWidth: theme.layout.maxWidth,
padding: '1rem 0.75rem',
}));

export default ContentWrapper;
Loading