Skip to content

Commit

Permalink
add like btn and review btn
Browse files Browse the repository at this point in the history
  • Loading branch information
hustlzp committed Feb 23, 2013
1 parent 6cc23e2 commit 35f4cb2
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 30 deletions.
Binary file modified xichuangzhu/controllers/user.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions xichuangzhu/static/style/page.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
body{margin:55px 0 0 0;font-family:'arial','宋体';}body #main-wap{font-size:14px;line-height:26px;min-height:700px;}body #main-wap a:not[class='btn']{color:#005580;}
body #main-wap h1{font-size:25px;line-height:25px;font-weight:bold;margin:15px 0 12px 0;}
body #main-wap h2{font-size:18px;line-height:18px;font-family:'yahei';font-weight:normal;margin:15px 0;color:darkred;}
body #main-wap h2{font-size:18px;line-height:18px;font-family:'yahei';font-weight:normal;margin:15px 0;color:darkred;clear:both;}
#douban-icon{float:right;margin-top:8px;cursor:pointer;}
#footer{text-align:center;font-size:12px;font-family:'微软雅黑';margin:20px 0 10px 0;}
.link-more a{margin-left:5px;font-size:12px;font-family:'yahei';}
Expand All @@ -18,7 +18,7 @@ body #main-wap h2{font-size:18px;line-height:18px;font-family:'yahei';font-weigh
#page-works .work-item .work-content{font-size:14px;line-height:22px;}
#page-single-work .work-title{font-size:25px;line-height:35px;margin-top:30px;margin-bottom:12px;font-weight:bold;font-family:'宋体';text-align:center;clear:both;}
#page-single-work .work-author{text-align:center;margin-bottom:20px;padding-right:6px;font-size:16px;}
#page-single-work .work-content{font-family:'仿宋_GB2312';font-weight:bold;font-size:18px;margin-bottom:30px;font-size:14pt;}
#page-single-work .work-content{font-family:'仿宋_GB2312';font-weight:bold;margin-bottom:30px;font-size:14pt;}
#page-single-work .work-type-shi{text-align:center;}
#page-single-work .work-type-ci{text-indent:2em;line-height:30px;}
#page-single-work .work-type-wen p{text-indent:2em;line-height:30px;margin-bottom:18px;}
Expand Down
6 changes: 3 additions & 3 deletions xichuangzhu/static/style/page.less
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ body{
font-weight: normal;
margin: 15px 0;
color: darkred;
clear: both;
}
}
}
Expand Down Expand Up @@ -185,10 +186,9 @@ body{

.work-content{
font-family: '仿宋_GB2312';
//font-family: '宋体';
font-weight: bold;
font-size: 18px;
font-weight: bold;
margin-bottom: 30px;
//font-size: 18px;
font-size: 14pt;
}
.work-type-shi{
Expand Down
32 changes: 16 additions & 16 deletions xichuangzhu/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@
</li>
</ul>

{% if session.user_id == 45197381 %}
<!-- add -->
<ul class="nav pull-right">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
添加 <span class="caret"></span>
</a>
{% if session.user_id == 45197381 %}
<!-- add -->
<ul class="nav pull-right">
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
添加 <span class="caret"></span>
</a>

<ul class="dropdown-menu">
<li><a href="{{ url_for('add_work') }}">作品</a></li>
<li><a href="{{ url_for('add_collection') }}">作品集</a></li>
<li><a href="{{ url_for('add_author') }}">文学家</a></li>
<li><a href="{{ url_for('add_dynasty') }}">朝代</a></li>
</ul>
</li>
</ul>
{% endif %}
<ul class="dropdown-menu">
<li><a href="{{ url_for('add_work') }}">作品</a></li>
<li><a href="{{ url_for('add_collection') }}">作品集</a></li>
<li><a href="{{ url_for('add_author') }}">文学家</a></li>
<li><a href="{{ url_for('add_dynasty') }}">朝代</a></li>
</ul>
</li>
</ul>
{% endif %}

{% else %}

Expand Down
2 changes: 1 addition & 1 deletion xichuangzhu/templates/single_author.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="row">
<div class="span8">
{% if session.user_id == 45197381 %}
<a class="btn btn-primary pull-right" href="{{ url_for('edit_author', authorID=author.AuthorID) }}">编辑</a>
<a class="btn btn-small pull-right" href="{{ url_for('edit_author', authorID=author.AuthorID) }}">编辑</a>
{% endif %}

<div class="author">
Expand Down
2 changes: 1 addition & 1 deletion xichuangzhu/templates/single_collection.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="span8">
{% if session.user_id == 45197381 %}
<div class="btn-group pull-right">
<a class="btn btn-primary" href="{{ url_for('edit_collection', collectionID=collection.CollectionID) }}">编辑</a>
<a class="btn btn-small" href="{{ url_for('edit_collection', collectionID=collection.CollectionID) }}">编辑</a>
</div>
{% endif %}

Expand Down
2 changes: 1 addition & 1 deletion xichuangzhu/templates/single_dynasty.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="row">
<div class="span8">
{% if session.user_id == 45197381 %}
<a class="btn btn-primary pull-right" href="{{ url_for('edit_dynasty', dynastyID=dynasty.DynastyID) }}">编辑</a>
<a class="btn btn-small pull-right" href="{{ url_for('edit_dynasty', dynastyID=dynasty.DynastyID) }}">编辑</a>
{% endif %}

<h1 class='dynasty'>{{ dynasty.Dynasty }}</h1>
Expand Down
16 changes: 10 additions & 6 deletions xichuangzhu/templates/single_work.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@

<div class="row">
<div class="span8">
{% if session.user_id == 45197381 %}
<div class="pull-right">
<a class="btn btn-primary" href="{{ url_for('edit_work', workID=work.WorkID) }}">编辑</a>
</div>
{% endif %}

<div class="work-title">{{ work.Title }}</div>
<div class="work-author">
<a href="{{ url_for('single_dynasty', dynastyID = work.DynastyID) }}">{{ work.Dynasty }}</a><a href="{{ url_for('single_author', authorID=work.AuthorID) }}">{{ work.Author }}</a></div>
<div class="work-content work-type-{{ work.Type }}">{{ work.Content|safe }}</div>

{% if session.user_id %}
<div class="btn-group pull-right">
<a class="btn btn-small" href="#">收藏 <span class="icon-heart"></span></a>
<a class="btn btn-small" href="#">点评 <span class="icon-file"></span></a>
{% if session.user_id == 45197381 %}
<a class="btn btn-small" href="{{ url_for('edit_work', workID=work.WorkID) }}">编辑 <span class="icon-edit"></span></a>
{% endif %}
</div>
{% endif %}

{% if work.CollectionID != 0 %}
<h2>作品集</h2>
<div class="work-collection"><a href="{{ url_for('single_collection', collectionID=work.CollectionID) }}">{{ work.Collection }}</a></div>
Expand Down

0 comments on commit 35f4cb2

Please sign in to comment.