Skip to content

Commit

Permalink
修复搜索bug 添加底部
Browse files Browse the repository at this point in the history
  • Loading branch information
liucc1986 committed Apr 12, 2015
1 parent 8451131 commit bd1c0bf
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions routes/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ router.get('/list/:pageNum?/:pageSize?',function(req,res,next){
var articleList=results.getArticleList;
var tags=results.getTags;
res.render(articleList.temp,{
keyword:articleList.keyword,
title:articleList.title,
totalPage:articleList.totalPage,
pageNum:articleList.pageNum,
Expand Down
4 changes: 2 additions & 2 deletions routes/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ router.get('/cclogin', function(req, res, next) {
return res.redirect('/');
}

res.render('login',{
res.render('user/login',{
title:"请登录",
navActive:"login"
});
Expand Down Expand Up @@ -47,7 +47,7 @@ router.post('/login', function(req, res, next) {
});
});
router.get('/reg', function(req, res, next) {
res.render('reg',{
res.render('user/reg',{
title:"欢迎注册"

});
Expand Down
9 changes: 9 additions & 0 deletions views/include/footer.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
<div class="container-narrow">
<footer> <p>
&copy; 2015 liucc

博客首先是一种知识管理工具.
</p> </footer>
</div> <!-- container-narrow -->

</div><!-- /.container -->

<script src="/js/jquery-2.1.3.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/bootstrap-paginator.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion views/include/slider.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<form role="form" class="form-horizontal form-inline" action="/article/list/">
<div class="form-group">
<input class="form-control " type="search" name="keyword" value="<%=keyword%>"placeholder="请输入查询关键字" />
<button type="submit" name="searchBtn" value="search" class="btn btn-primary">搜索</button>
<button type="submit" class="btn btn-primary">搜索</button>

</div>

Expand Down
6 changes: 6 additions & 0 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@
<%- include include/slider.ejs %>

</div><!-- /.row -->
<div class="container-narrow">
<footer> <p>
&copy; 2015 liucc

博客首先是一种知识管理工具.
</p> </footer>
</div> <!-- container-narrow -->
</div><!-- /.container -->
<script src="/js/jquery-2.1.3.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
Expand Down

0 comments on commit bd1c0bf

Please sign in to comment.