diff --git a/webapp/components/post.jsx b/webapp/components/post.jsx index f53cb62..60d8881 100644 --- a/webapp/components/post.jsx +++ b/webapp/components/post.jsx @@ -43,7 +43,7 @@ module.exports = function(boardsAPI){
{this.getDate()} - View + View
diff --git a/webapp/components/postpage.jsx b/webapp/components/postpage.jsx index f93f985..b2347d0 100644 --- a/webapp/components/postpage.jsx +++ b/webapp/components/postpage.jsx @@ -1,4 +1,5 @@ var React = require('react') +var Link = require('react-router').Link module.exports = function(boardsAPI){ var UserID = require('userID.jsx')(boardsAPI) @@ -10,6 +11,7 @@ module.exports = function(boardsAPI){ }, componentDidMount: function(){ boardsAPI.use(boards => { + boards.init() boards.getEventEmitter().on('init', err => { if(!err && this.isMounted()){ this.init(boards) @@ -31,9 +33,22 @@ module.exports = function(boardsAPI){ } }) }, + getContext(){ + if(this.props.params.userid){ + if(this.props.params.boardname) + return
Posted by in #{this.props.params.boardname}
+ else + return
Posted by
+ } else return
You are viewing a single post
+ }, render: function(){ if(this.state.api) - return + return
+
+ {this.getContext()} +
+ +
else return } }) diff --git a/webapp/style.css b/webapp/style.css index 4615374..488a09d 100644 --- a/webapp/style.css +++ b/webapp/style.css @@ -20,6 +20,10 @@ a { text-decoration: none; } +.black { + color: black +} + .center-block { margin:auto; display:block; @@ -75,6 +79,10 @@ a:hover { color: #707070; } +.post .icons .a { + color: #707070; +} + .post .icons .user-id { display: inline-block; } @@ -83,6 +91,10 @@ a:hover { margin-left: 1rem; } +.post-page .user-id { + display: inline +} + .navbar { border-bottom: 1px solid #eee; display: block;