diff --git a/.eslintrc b/.eslintrc
index 5c50e37af5..f06a712e01 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -185,10 +185,12 @@
"sort-vars": 0,
"space-after-keywords": [
2,
- "always",
- { "checkFunctionKeyword": false }
+ "always"
+ ],
+ "space-before-function-paren": [
+ 2,
+ "never"
],
- "space-after-function-names": "never",
"space-before-blocks": [
2,
"always"
diff --git a/common/app/routes/Hikes/components/Hikes.jsx b/common/app/routes/Hikes/components/Hikes.jsx
index 9891adbc88..6beb6f6514 100644
--- a/common/app/routes/Hikes/components/Hikes.jsx
+++ b/common/app/routes/Hikes/components/Hikes.jsx
@@ -1,22 +1,35 @@
import React, { PropTypes } from 'react';
-import { Row } from 'react-bootstrap';
-import Video from 'react-video';
+import stampit from 'react-stampit';
+import { Panel, Row } from 'react-bootstrap';
+// import debugFactory from 'debug';
-export default React.createClass({
+import HikesMap from './Map.jsx';
+
+// const debug = debugFactory('freecc:hikes');
+
+export default stampit(React, {
displayName: 'Hikes',
+
propTypes: {
- id: PropTypes.string
+ children: PropTypes.element
+ },
+
+ renderMap() {
+ return (
+
+ );
},
render() {
- const {
- id
- } = this.props.params;
-
return (
-
+
+
+ Hikes!
+
+
+ { this.props.children || this.renderMap() }
+
+
);
}
});
diff --git a/common/app/routes/Hikes/components/Lecture.jsx b/common/app/routes/Hikes/components/Lecture.jsx
new file mode 100644
index 0000000000..8e1b64ddb4
--- /dev/null
+++ b/common/app/routes/Hikes/components/Lecture.jsx
@@ -0,0 +1,28 @@
+import React, { PropTypes } from 'react';
+import stampit from 'react-stampit';
+import Vimeo from 'react-vimeo';
+import debugFactory from 'debug';
+
+const debug = debugFactory('freecc:hikes');
+
+export default stampit(React, {
+ displayName: 'Lecture',
+
+ propTypes: {
+ params: PropTypes.object
+ },
+
+ onError: debug,
+
+ render() {
+ const {
+ id
+ } = this.props.params;
+
+ return (
+
+ );
+ }
+});
diff --git a/common/app/routes/Hikes/components/Map.jsx b/common/app/routes/Hikes/components/Map.jsx
new file mode 100644
index 0000000000..366bf95d2c
--- /dev/null
+++ b/common/app/routes/Hikes/components/Map.jsx
@@ -0,0 +1,28 @@
+import React from 'react';
+import stampit from 'react-stampit';
+import { Link } from 'react-router';
+import { ListGroup, ListGroupItem } from 'react-bootstrap';
+import videos from '../videos.json';
+
+export default stampit(React, {
+ displayName: 'HikesMap',
+
+ render() {
+
+ const vidElements = videos.map(({ title, id }) => {
+ return (
+
+
+ { title }
+
+
+ );
+ });
+
+ return (
+
+ { vidElements }
+
+ );
+ }
+});
diff --git a/common/app/routes/Hikes/components/Question.jsx b/common/app/routes/Hikes/components/Question.jsx
index e69de29bb2..6412002004 100644
--- a/common/app/routes/Hikes/components/Question.jsx
+++ b/common/app/routes/Hikes/components/Question.jsx
@@ -0,0 +1,19 @@
+import React, { PropTypes } from 'react';
+import stampit from 'react-stampit';
+// import debugFactory from 'debug';
+
+export default stampit(React, {
+ displayName: 'Question',
+
+ propTypes: {
+ params: PropTypes.object
+ },
+
+ render() {
+ return (
+
+
Question time
+
+ );
+ }
+});
diff --git a/common/app/routes/Hikes/index.js b/common/app/routes/Hikes/index.js
index fb24125653..ab7e72f27e 100644
--- a/common/app/routes/Hikes/index.js
+++ b/common/app/routes/Hikes/index.js
@@ -1,4 +1,6 @@
import Hikes from './components/Hikes.jsx';
+import Lecture from './components/Lecture.jsx';
+import Question from './components/Question.jsx';
/*
* show video /hikes/someVideo
@@ -6,11 +8,13 @@ import Hikes from './components/Hikes.jsx';
*/
export default {
- path: 'hikes(/:id)',
-
- getComponents(cb) {
- setTimeout(() => {
- cb(null, Hikes);
- }, 0);
- }
+ path: 'hikes',
+ component: Hikes,
+ childRoutes: [{
+ path: ':id',
+ component: Lecture
+ }, {
+ path: ':id/question/:questionId',
+ component: Question
+ }]
};