commit ece83848ab1957f65dcc379e63564d2290c73a6a Author: Kyle Mathews Date: Thu Jun 11 16:41:30 2015 -0700 Basics are in place diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c2658d7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/app.coffee b/app.coffee new file mode 100644 index 0000000..0e06299 --- /dev/null +++ b/app.coffee @@ -0,0 +1,2 @@ +exports.context = -> + return require.context './pages', true diff --git a/components/ReadNext.cjsx b/components/ReadNext.cjsx new file mode 100644 index 0000000..4d49aeb --- /dev/null +++ b/components/ReadNext.cjsx @@ -0,0 +1,50 @@ +React = require 'react' +Router = require 'react-router' +{Link} = Router +prune = require 'underscore.string/prune' +includes = require 'underscore.string/include' +find = require 'lodash/collection/find' + +module.exports = React.createClass + + render: -> + {rhythm, fontSizeToMS} = @props.typography + readNext = @props.post.readNext + if readNext? + nextPost = find @props.pages, (page) -> includes page.path, readNext.slice(1, -1) + unless nextPost +