43 | If this is a new page that you've added in Cosmic JS, make sure you add it to your
routes.js file!
44 | 45 |
46 | Take me home 47 |
├── CHECKS
├── .babelrc
├── .gitignore
├── public
├── img
│ ├── about-bg.jpg
│ ├── home-bg.jpg
│ ├── post-bg.jpg
│ ├── contact-bg.jpg
│ └── post-sample-image.jpg
├── fonts
│ ├── glyphicons-halflings-regular.eot
│ ├── glyphicons-halflings-regular.ttf
│ ├── glyphicons-halflings-regular.woff
│ └── glyphicons-halflings-regular.woff2
├── css
│ ├── cosmic-custom.css
│ ├── clean-blog.min.css
│ └── clean-blog.css
└── js
│ ├── clean-blog.min.js
│ ├── bootstrap.min.js
│ └── clean-blog.js
├── config.js
├── app-client.js
├── components
├── Partials
│ ├── BlogSingle.js
│ ├── WorkSingle.js
│ ├── Loading.js
│ ├── Header.js
│ ├── Nav.js
│ ├── BlogList.js
│ ├── WorkList.js
│ └── Footer.js
├── Pages
│ ├── NoMatch.js
│ ├── Default.js
│ ├── Blog.js
│ └── Work.js
└── App.js
├── stores
└── AppStore.js
├── dispatcher
└── AppDispatcher.js
├── webpack.config.js
├── routes.js
├── package.json
├── views
└── index.html
├── README.md
├── app-server.js
├── actions
└── actions.js
└── bucket.json
/CHECKS:
--------------------------------------------------------------------------------
1 | WAIT=30
2 | ATTEMPTS=10
3 | / DOCTYPE
4 |
5 |
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets":[
3 | "es2017", "react"
4 | ]
5 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .DS_Store
3 | npm-debug.log
4 | public/dist
5 | public/index.html
--------------------------------------------------------------------------------
/public/img/about-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/cosmicapp-react-universal-blog/master/public/img/about-bg.jpg
--------------------------------------------------------------------------------
/public/img/home-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/cosmicapp-react-universal-blog/master/public/img/home-bg.jpg
--------------------------------------------------------------------------------
/public/img/post-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/cosmicapp-react-universal-blog/master/public/img/post-bg.jpg
--------------------------------------------------------------------------------
/public/img/contact-bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/cosmicapp-react-universal-blog/master/public/img/contact-bg.jpg
--------------------------------------------------------------------------------
/public/img/post-sample-image.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/cosmicapp-react-universal-blog/master/public/img/post-sample-image.jpg
--------------------------------------------------------------------------------
/public/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/cosmicapp-react-universal-blog/master/public/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/public/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/cosmicapp-react-universal-blog/master/public/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/public/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/cosmicapp-react-universal-blog/master/public/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/public/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cosmicjs/cosmicapp-react-universal-blog/master/public/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/config.js:
--------------------------------------------------------------------------------
1 | // config.js
2 | export default {
3 | site: {
4 | title: 'React Universal Blog'
5 | },
6 | bucket: {
7 | slug: process.env.COSMIC_BUCKET || 'react-universal-blog',
8 | media_url: 'https://cosmicjs.com/uploads',
9 | read_key: process.env.COSMIC_READ_KEY || '',
10 | write_key: process.env.COSMIC_WRITE_KEY || ''
11 | },
12 | }
13 |
--------------------------------------------------------------------------------
/app-client.js:
--------------------------------------------------------------------------------
1 | // app-client.js
2 | import React from 'react'
3 | import { render } from 'react-dom'
4 | import { Router } from 'react-router'
5 | import createBrowserHistory from 'history/lib/createBrowserHistory'
6 | const history = createBrowserHistory()
7 |
8 | // Routes
9 | import routes from './routes'
10 |
11 | const Routes = (
12 |
routes.js file!
44 | Posted by Cosmic JS on { created }
49 |Posted by Cosmic JS on { created }
52 |This is the first post on your React Universal Blog. You can add as many of these as you like! Isn't that exciting?! This cat thinks so.
This is an interesting work item isn't it? Lumberg says, \"...yeah\".jpeg\")
This is some home page content...
", 240 | "metafields": [ 241 | { 242 | "edit": 1, 243 | "value": "45904530-8449-11e5-adfe-014902af5eff-space_11.jpg", 244 | "key": "hero", 245 | "title": "Hero", 246 | "type": "file", 247 | "children": false 248 | }, 249 | { 250 | "edit": 1, 251 | "value": "React Universal", 252 | "key": "headline", 253 | "title": "Headline", 254 | "type": "text", 255 | "children": false 256 | }, 257 | { 258 | "edit": 1, 259 | "value": "A Cosmic JS App Built with React", 260 | "key": "subheadline", 261 | "title": "Subheadline", 262 | "type": "text", 263 | "children": false 264 | } 265 | ], 266 | "type_slug": "page", 267 | "created": "2015-11-06T03:26:39.539Z", 268 | "user_id": "55767c3ffbcf5cbb13000001", 269 | "options": { 270 | "slug_field": 0, 271 | "content_editor": 1, 272 | "add_metafields": 1, 273 | "metafields_title": 1, 274 | "metafields_key": 1 275 | }, 276 | "order": 1, 277 | "modified": "2015-12-29T03:57:55.322Z" 278 | }, 279 | { 280 | "_id": "563c1def1ae7fe0f41000044", 281 | "bucket": "563c1dbe1ae7fe0f41000036", 282 | "slug": "work", 283 | "title": "Work", 284 | "content": "