forked from freeCodeCamp/freeCodeCamp
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Berkeley Martinez
authored and
Berkeley Martinez
committed
Jun 18, 2015
1 parent
bfddc03
commit a8540be
Showing
42 changed files
with
299 additions
and
244 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,3 @@ | ||
This is the entry point for the client | ||
Code that should only run on the client should be put here. | ||
NOTE(berks): For react specific stuff this should be the entry point |
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,20 @@ | ||
import BrowserHistory from 'react-router/lib/BrowserHistory'; | ||
import debugFactory from 'debug'; | ||
import { Cat } from 'thundercats'; | ||
|
||
import AppFactory from '../common/app/appFactory'; | ||
|
||
const debug = debugFactory('fcc:client'); | ||
const DOMContianer = document.getElemenetById('#fCC'); | ||
const fcc = new Cat(); | ||
|
||
// returns an observable | ||
fcc.render(AppFactory(BrowserHistory), DOMContianer) | ||
.subscribe( | ||
function() { | ||
debug('react rendered'); | ||
}, | ||
function(err) { | ||
debug('an error has occured', err.stack); | ||
} | ||
); |
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,25 @@ | ||
import React, { PropTypes } from 'react'; | ||
|
||
import Nav from './components/Nav'; | ||
import Footer from './components/Footer'; | ||
|
||
export default class extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
} | ||
|
||
static displayName = 'FreeCodeCamp' | ||
static propTypes = { | ||
children: PropTypes.node | ||
} | ||
|
||
render() { | ||
return ( | ||
<div> | ||
<Nav /> | ||
{ this.props.children } | ||
<Footer /> | ||
</div> | ||
); | ||
} | ||
} |
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,18 @@ | ||
import React from 'react'; | ||
import { Router, Route } from 'react-router'; | ||
|
||
// components | ||
import App from './App.jsx'; | ||
import Jobs from './screens/App/screens/Jobs'; | ||
|
||
module.exports = function appFactory(history) { | ||
return ( | ||
<Router history={ history }> | ||
<Route handler={ App }> | ||
<Route | ||
component={ Jobs } | ||
path='/jobs' /> | ||
</Route> | ||
</Router> | ||
); | ||
}; |
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,50 @@ | ||
import React from 'react'; | ||
import { Col, Row, Grid } from 'react-bootstrap'; | ||
|
||
import links from './links.json'; | ||
|
||
export default class extends React.Component { | ||
static displayName = 'Footer' | ||
renderLinks(mobile) { | ||
return links.map(link => { | ||
return ( | ||
<a | ||
className={ link.className} | ||
href={ link.href } | ||
target={ link.target }> | ||
{ this.renderContent(mobile, link.content) } | ||
</a> | ||
); | ||
}); | ||
} | ||
|
||
renderContent(mobile, content) { | ||
if (mobile) { | ||
return ( | ||
<span className='sr-only'> | ||
content; | ||
</span> | ||
); | ||
} | ||
return content; | ||
} | ||
|
||
render() { | ||
return ( | ||
<Grid className='fcc-footer'> | ||
<Row> | ||
<Col | ||
className='hidden-xs hidden-sm' | ||
xs={ 12 }> | ||
{ this.renderLinks() } | ||
</Col> | ||
<Col | ||
className='visible-xs visible-sm' | ||
xs={ 12 }> | ||
{ this.renderLinks(true) } | ||
</Col> | ||
</Row> | ||
</Grid> | ||
); | ||
} | ||
} |
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 @@ | ||
export { default as Footer } from './Footer.jsx'; |
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,44 @@ | ||
[ | ||
{ | ||
"className": "ion-speakerphone", | ||
"content": " Blog ", | ||
"href": "http://blog.freecodecamp.com", | ||
"target": "_blank" | ||
}, | ||
{ | ||
"className": "ion-social-twitch-outline", | ||
"content": " Twitch ", | ||
"href": "http://www.twitch.tv/freecodecamp", | ||
"target": "_blank" | ||
}, | ||
{ | ||
"className": "ion-social-github", | ||
"content": " Github ", | ||
"href": "http://github.com/freecodecamp", | ||
"target": "_blank" | ||
}, | ||
{ | ||
"className": "ion-social-twitter", | ||
"content": " Twitter ", | ||
"href": "http://twitter.com/freecodecamp", | ||
"target": "_blank" | ||
}, | ||
{ | ||
"className": "ion-social-facebook", | ||
"content": " Facebook ", | ||
"href": "http://facebook.com/freecodecamp", | ||
"target": "_blank" | ||
}, | ||
{ | ||
"className": "ion-information-circled", | ||
"content": " About ", | ||
"href": "/learn-to-code", | ||
"target": "_self" | ||
}, | ||
{ | ||
"className": "ion-locked", | ||
"content": " Privacy ", | ||
"href": "/privacy'", | ||
"target": "_self" | ||
} | ||
] |
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
File renamed without changes.
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 @@ | ||
export { default as Nav } from './Nav.jsx'; |
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 @@ | ||
things like NavBar and Footer go here |
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 @@ | ||
in case we ever want an admin panel |
File renamed without changes.
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 @@ | ||
This folder contains things relative to the bonfires screens |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 @@ | ||
export default { | ||
path: 'bonfires/(:bonfireName)', | ||
getComponents(cb) { | ||
// TODO(berks): add bonfire component | ||
} | ||
}; |
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 @@ | ||
future home of FAVS app |
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 @@ | ||
This folder contains everything relative to Jobs board |
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,15 @@ | ||
import { Actions } from 'thundercats'; | ||
|
||
export default class JobsActions extends Actions { | ||
constructor() { | ||
super(); | ||
} | ||
static displayName = 'JobsActions' | ||
|
||
getJob(id) { | ||
return { id }; | ||
} | ||
getJobs(params) { | ||
return { params }; | ||
} | ||
} |
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,28 @@ | ||
import React, { PropTypes } from 'react'; | ||
import { createContainer } from 'thundercats'; | ||
import { Grid, Row } from 'react-bootstrap'; | ||
|
||
@createContainer({ | ||
store: 'JobsStore' | ||
}) | ||
export default class extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
} | ||
|
||
|
||
static displayName = 'Jobs' | ||
static propTypes = { | ||
jobs: PropTypes.array | ||
} | ||
|
||
render() { | ||
return ( | ||
<Grid> | ||
<Row> | ||
foo | ||
</Row> | ||
</Grid> | ||
); | ||
} | ||
} |
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,13 @@ | ||
import React, { PropTypes } from 'react'; | ||
|
||
export default class extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
} | ||
|
||
static displayName = 'JobsList' | ||
static propTypes = {} | ||
render() { | ||
return null; | ||
} | ||
} |
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,9 @@ | ||
import { Store } from 'thundercats'; | ||
|
||
export default class JobsStore extends Store { | ||
constructor(cat) { | ||
super(); | ||
let JobsActions = cat.getActions('JobsActions'); | ||
} | ||
static displayName = 'JobsStore' | ||
} |
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,19 @@ | ||
/* | ||
* show: /jobs | ||
* showOne: /jobs/:id | ||
* edit /jobs/:id | ||
* delete /jobs/:id | ||
* createOne /jobs/new | ||
*/ | ||
|
||
export default { | ||
path: '/jobs/(:jobId)', | ||
|
||
getComponents(cb) { | ||
require.ensure([], require => { | ||
cb(null, [ | ||
require('./components/Jobs') | ||
]); | ||
}); | ||
} | ||
}; |
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 @@ | ||
export default { | ||
path: '/', | ||
getRoutes(cb) { | ||
require.ensure([], require => { | ||
cb(null, [ | ||
// require('./Bonfires'), | ||
require('./Jobs') | ||
]); | ||
}); | ||
} | ||
}; |
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 @@ | ||
Here is where all components that are shared between multiple views |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.