Display hot/recent/submit/search views correctly through index

This commit is contained in:
Nathan Leniz
2015-03-06 08:20:49 +09:00
parent 5440efc729
commit 0276c6867e
3 changed files with 7 additions and 5 deletions

View File

@ -33,13 +33,13 @@ exports.hot = function(req, res, next) {
};
exports.submitNew = function(req,res, next) {
res.render('stories/submit-story', {
res.render('stories/index', {
page: 'submit'
});
};
exports.search = function(req, res, next) {
res.render('stories/search-stories', {
res.render('stories/index', {
page: 'search'
});
};

View File

@ -7,6 +7,7 @@ block content
.panel-heading.text-center Camper News
.panel-body
include ./news-nav
.spacer
if (page === 'hot')
include ./hot-stories
if (page === 'recent')

View File

@ -1,4 +1,5 @@
#story-submit.col-xs-12
.spacer
.col-xs-12
form.form-horizontal.control-label-story-submission#story-submission-form
.col-xs-2.img-story-post
img.img-responsive(src='#{user.profile.picture}')
@ -13,6 +14,6 @@
label.control-label.control-label-story-submission(for='name') Title
.col-xs-11
input.form-control(placeholder='Type a headline for your link here', name='Title')
.spacer
.form-group
.btn.btn-large.btn-block.btn-primary#story-submit Submit
.spacer
.btn.btn-big.btn-block.btn-primary#story-submit Submit