Skip to content

Commit

Permalink
added favicons, refactored routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramsay Lanier committed Jan 25, 2016
1 parent a155afb commit fdb7bc5
Show file tree
Hide file tree
Showing 7 changed files with 87 additions and 52 deletions.
4 changes: 3 additions & 1 deletion app/components/head/head.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ class Head extends React.Component{
title="WordExpress"
titleTemplate="WordExpress - %s"
meta={[
{"name": "description", "content": "WordExpress application"},
{"name": "description", "content": "Replacing PHP with Javascript in WordPress development"},
{"property": "og:title", "content": "WordExpress"},
{"property": "og:type", "content": "website"},
{"property": "og:description", "content": "Replacing PHP with Javascript in WordPress development"},
{"property": "og:image", "content": "http://wordexpress.s3.amazonaws.com/wp-content/uploads/2016/01/24195552/logowithtype.png"}
]}
link={[
Expand Down
Binary file added app/favicon.ico
Binary file not shown.
33 changes: 31 additions & 2 deletions app/index.tpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,41 @@
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>WordExpress - WordPress With Javascript</title>
<meta name="description" content="just another react + webpack boilerplate">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>WordExpress</title>
<meta property="og:title" content="WordExpress">
<meta property="og:type" content="website">
<meta property="og:url" content="http://wordexpress.io">
<meta property="og:description" content="Replacing PHP with Javascript in WordPress development">
<meta property="og:image" content="http://wordexpress.s3.amazonaws.com/wp-content/uploads/2016/01/25030548/logowithtype.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="1200">

<link rel="apple-touch-icon-precomposed" sizes="57x57" href="http://s3.amazonaws.com/wordexpress/favicons/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://s3.amazonaws.com/wordexpress/favicons/apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://s3.amazonaws.com/wordexpress/favicons/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://s3.amazonaws.com/wordexpress/favicons/apple-touch-icon-144x144.png" />
<link rel="apple-touch-icon-precomposed" sizes="60x60" href="http://s3.amazonaws.com/wordexpress/favicons/apple-touch-icon-60x60.png" />
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="http://s3.amazonaws.com/wordexpress/favicons/apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="http://s3.amazonaws.com/wordexpress/favicons/apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="http://s3.amazonaws.com/wordexpress/favicons/apple-touch-icon-152x152.png" />
<link rel="icon" type="image/png" href="http://s3.amazonaws.com/wordexpress/favicons/favicon-196x196.png" sizes="196x196" />
<link rel="icon" type="image/png" href="vfavicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/png" href="vfavicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="http://s3.amazonaws.com/wordexpress/favicons/favicon-16x16.png" sizes="16x16" />
<link rel="icon" type="image/png" href="http://s3.amazonaws.com/wordexpress/favicons/favicon-128.png" sizes="128x128" />
<meta name="application-name" content="&nbsp;"/>
<meta name="msapplication-TileColor" content="#FFFFFF" />
<meta name="msapplication-TileImage" content="http://s3.amazonaws.com/wordexpress/favicons/mstile-144x144.png" />
<meta name="msapplication-square70x70logo" content="http://s3.amazonaws.com/wordexpress/favicons/mstile-70x70.png" />
<meta name="msapplication-square150x150logo" content="http://s3.amazonaws.com/wordexpress/favicons/mstile-150x150.png" />
<meta name="msapplication-wide310x150logo" content="http://s3.amazonaws.com/wordexpress/favicons/mstile-310x150.png" />
<meta name="msapplication-square310x310logo" content="http://s3.amazonaws.com/wordexpress/favicons/mstile-310x310.png" />

<script src="https://use.typekit.net/kqa7eaw.js"></script>
<script>try{Typekit.load({ async: true });}catch(e){}</script>

</head>
<body>
<div id="root"></div>
Expand Down
51 changes: 7 additions & 44 deletions app/main.js
Original file line number Diff line number Diff line change
@@ -1,49 +1,12 @@
import 'babel-polyfill';

import '../scripts/scrollToPlugin.js';
import { browserHistory } from 'react-router';
import React from 'react';
import Relay from 'react-relay';
import { render } from 'react-dom';

import { RelayRouter } from 'react-router-relay';
import createBrowserHistory from 'history/lib/createBrowserHistory'
import { browserHistory, IndexRoute, Route } from 'react-router';

import Head from './components/head/head';
import App from './App.js';
import LandingPage from './components/pages/LandingPage.js';
import WordpressPage from './components/pages/WordpressPage.js';
import PostSingle from './components/posts/PostSingle.js';
import '../scripts/scrollToPlugin.js';

const AppQueries = {
viewer: () => Relay.QL`
query {
viewer
}
`,
};

render((
<RelayRouter history={browserHistory}>
<Route
path="/" component={App}
queries={AppQueries}
>
<IndexRoute
component={LandingPage}
queries={AppQueries}
/>
import routes from './routes';

<Route
path=":page"
component={WordpressPage}
queries={AppQueries}
/>
<Route
path="post/:post"
component={PostSingle}
queries={AppQueries}
/>
</Route>
</RelayRouter>
), document.getElementById('root'))
render(
<RelayRouter history={browserHistory} routes={routes} />,
document.getElementById('root')
)
41 changes: 41 additions & 0 deletions app/routes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from 'react';
import Relay from 'react-relay';
import { IndexRoute, Route } from 'react-router';

import App from './App.js';
import LandingPage from './components/pages/LandingPage.js';
import WordpressPage from './components/pages/WordpressPage.js';
import PostSingle from './components/posts/PostSingle.js';

const AppQueries = {
viewer: () => Relay.QL`
query {
viewer
}
`,
};

let routes = (
<Route
path="/" component={App}
queries={AppQueries}
>
<IndexRoute
component={LandingPage}
queries={AppQueries}
/>

<Route
path=":page"
component={WordpressPage}
queries={AppQueries}
/>
<Route
path="post/:post"
component={PostSingle}
queries={AppQueries}
/>
</Route>
);

export default routes;
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"test": "",
"start": "NODE_ENV=production node ./dist/server.js",
"startdev": "NODE_ENV=dev babel-node --debug ./server.js",
"startdevprod": "NODE_ENV=production babel-node --debug ./server.js",
"build-server": "babel -d ./dist ./server.js ./webpack.config.js",
"build-schema": "babel -d ./dist/data ./data",
"build-settings": "cp -R ./settings ./dist/",
Expand All @@ -39,16 +40,18 @@
"babel-polyfill": "^6.3.14",
"browser-sync": "^2.11.1",
"dotenv": "^1.2.0",
"ejs": "^2.4.1",
"engine.io-client": "^1.6.7",
"express-expose": "^0.3.4",
"express-graphql": "^0.4.5",
"extract-text-webpack-plugin": "^0.8.2",
"graphiql": "^0.4.5",
"graphql": "^0.4.14",
"hapi": "^11.1.4",
"history": "^1.17.0",
"htmlparser2": "^3.9.0",
"install": "^0.4.1",
"isomorphic-relay": "^0.4.2",
"isomorphic-relay-router": "^0.5.1",
"lodash": "^3.10.1",
"mysql": "^2.10.0",
"npm": "^3.5.3",
Expand All @@ -57,11 +60,8 @@
"react-css-modules": "^3.6.4",
"react-dom": "^0.14.5",
"react-helmet": "^2.3.1",
"react-redux": "^4.0.6",
"react-router": "^2.0.0-rc4",
"react-router-relay": "^0.9.0",
"redux": "^3.0.5",
"redux-simple-router": "^1.0.2",
"relay-local-schema": "^0.3.1",
"sequelize": "^3.15.1"
},
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if (isDeveloping) {
schema: Schema,
})
));
app.get('*', function response(req, res) {
app.get('*', function response(req, res, next) {
res.sendFile(path.join(__dirname, '/index.html'));
});
}
Expand Down

0 comments on commit fdb7bc5

Please sign in to comment.