Skip to content

Commit

Permalink
添加响应式布局支持
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou committed Jun 18, 2015
1 parent 17fc1f5 commit 87d5566
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ a java blog
11. WordPress站点xml文件导入功能(支持文章、附件及标签)
12. 文章标签tag功能、私密文章支持、文章归档
13. 文章markdown/富文本编辑支持、快速编辑
14. 响应式布局支持

#### TODO
* 评论邮件提醒、近期评论
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/zblog/biz/CommentManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public int setStatus(String commentid, String newStatus){
}

/**
* 删除评论,同时删除对应文章的评论数
* 删除评论,同时更改对应文章的评论数
*
* @param commentid
*/
Expand Down
1 change: 1 addition & 0 deletions src/main/webapp/WEB-INF/jsp/common/head.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<title>${ptitle}${ptitle!=null?' | ':''}${g.title}</title>
<link rel="icon" href="${g.domain}/resource/img/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="${g.domain}/resource/css/style.css">
<link rel="stylesheet" media="screen and (max-width:770px)" href="${g.domain}/resource/css/responsive.css">
<script src="${g.domain}/resource/js/jquery-1.9.1.min.js"></script>
<link rel="alternate" type="application/rss+xml" href="${g.domain}/feed" title="${g.title}" />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="${g.domain}/xmlrpc/rsd" />
Expand Down
28 changes: 28 additions & 0 deletions src/main/webapp/resource/css/responsive.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#right_col{ display: none;}
#left_col{margin-right: 0;}
.post .title a,
.post .title span,
.post_content,
#archive_headline h2,
.post .post_tags,
#page_nav .page,
#bread_crumb ul,
#comment_header,
#comments,
#previous_next_post div{margin-right: 0;}
#post_mask{background-color: #fff;background-image: none;}

.meta{width: 22%;}
#header, #post_mask, #bread_crumb, #comments_wrapper,
.post, #page_nav, #previous_next_post, #footer{width: 78%;}


@media screen and (max-width:480px) {
#header{width: 100%;}
.meta{width: 0;display: none;}
#header, #post_mask, #bread_crumb, #comments_wrapper,
.post, #page_nav, #previous_next_post, #footer{width: 100%;}

.post .title{background-image: none;}
#previous_next_post{display: none;}
}

0 comments on commit 87d5566

Please sign in to comment.