Permalink
Browse files

界面样式修改

  • Loading branch information...
1 parent 19af37d commit eecbcf0a5890254c67a4d578d48ff450340c5c42 @dgunzi committed Nov 8, 2012
Showing with 47 additions and 24 deletions.
  1. +2 −2 public/css/bootstrap.css
  2. +6 −1 public/css/custom.css
  3. +36 −18 views/cookbookview.html
  4. +2 −2 views/index.html
  5. +1 −1 views/user_add.html
View
@@ -165,7 +165,7 @@ a:hover {
.container,
.navbar-fixed-top .container,
.navbar-fixed-bottom .container {
- width: 940px;
+ width: 960px;
}
.span12 {
width: 940px;
@@ -180,7 +180,7 @@ a:hover {
width: 700px;
}
.span8 {
- width: 620px;
+ width: 640px;
}
.span7 {
width: 540px;
View
@@ -134,10 +134,15 @@ img { max-width: 100%;}
.cookbookitem .finalPic{
text-align: center;
}
-
+.cookbookDetail .minfo{
+ margin-left:15px;
+}
.cookbookitem .info i{
margin-right:3px;
}
+.cookbookDetail .detailTitle h3 i{
+ margin:3px 3px 0 0;
+}
.side_bar .thumbnail{
margin-top: 15px;
}
View
@@ -1,32 +1,50 @@
<%- include common/header.html -%>
- <div class="container-fluid">
+ <div class="mainContainer">
<div class="row-fluid">
<div class="span8">
<% var monthNames = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ];
-
+ var levelClass = ["","label-success","label-warning","label-important","label-info","label-inverse"];
var d = cookbook.datetime;
var datetime = monthNames[d.getMonth()] + " " + d.getDay() + ", " + d.getFullYear();
+ var levelIndex = cookbook.level-1;
%>
- <section class="cookbookitem">
+ <section class="cookbookitem thumbnail">
<div class="page-header">
<h2><%=cookbook.title %></h2>
- <div class="row-fluid">
- <div class="span9">
- <%= cookbook.user %>
- </div>
- <div class="span3">
- <span style="margin-left: 35px;"><small><%=datetime%></small></span>
- </div>
+ <div class="info">
+ <span><i class="icon-user"></i>作者:<%= cookbook.user %></span>
+ <span style="margin-left: 35px;"><i class="icon-calendar"></i>发表于:<small><%=datetime%></small></span>
+ <span class="label <%=levelClass[levelIndex]%> fr"><%=cookconfig.level[levelIndex]%></span>
</div>
</div>
-
- <div class="steps">
+ <div class="steps cookbookDetail">
+ <div class="detailTitle"><h3><i class="icon-home"></i>主料:</h3></div>
+ <p class="minfo"><%- cookbook.major %></p>
+ <%
+ if(cookbook.minor!=""){
+ %>
+ <div class="detailTitle"><h3><i class="icon-tags"></i>配料:</h3></div>
+ <p class="minfo"><%- cookbook.minor %></p>
+ <%
+ }
+ %>
+ <div class="detailTitle"><h3><i class="icon-leaf"></i>调料:</h3></div>
+ <p class="minfo"><%- cookbook.seasoning %></p>
+ <div class="detailTitle"><h3><i class="icon-list"></i>做法:</h3></div>
<%- cookbook.steps %>
</div>
</section>
</div>
- <div class="span4">
- <section>
+ <div class="span4 side_bar">
+ <section class="login thumbnail">
+ <h3>Homely Dishes,欢迎您!</h3>
+ <a href="/user_add" class="btn btn-info">注册</a>
+ <p>
+ 已注册用户请
+ <a href="/login">登录</a>
+ </p>
+ </section>
+ <section class="thumbnail">
<div class="page-header">
<h2>大家在看</h2>
</div>
@@ -41,7 +59,7 @@
<li><a>魔芋烧鸭</a></li>
</ol>
</section>
- <section>
+ <section class="thumbnail">
<div class="page-header">
<h2>随机菜谱</h2>
</div>
@@ -56,7 +74,7 @@
<li><a>以服务人民为荣,以背离人民为耻吗?</a></li>
</ol>
</section>
- <section>
+ <section class="thumbnail">
<div class="page-header">
<h2>今日推荐</h2>
</div>
@@ -68,7 +86,7 @@
</ul>
<div class="tab-content">
<div class="tab-pane active" id="1">
- <div class="thumbnail">
+ <div>
<img src="/img/thumb/huangdouyumifagao.png" alt="">
<div class="caption">
<h3>黄豆玉米面发糕</h3>
@@ -80,7 +98,7 @@
</div>
</div>
<div class="tab-pane" id="2">
- <div class="thumbnail">
+ <div>
<img src="/img/thumb/jiamaji.png" alt="">
<div class="caption">
<h3>椒麻鸡</h3>
View
@@ -1,5 +1,5 @@
<%- include common/header.html -%>
- <div class="container-fluid">
+ <div class="mainContainer">
<div class="subnav">
<ul class="nav nav-pills">
<li><a href="/">全部</a></li>
@@ -47,7 +47,7 @@
if(pages == current_page) nextPage = pages;
if(current_page == 1) prePage = 1;
%>
- <div class="finalPic"><%- lastPic %></div>
+ <div class="finalPic" ><a href="/<%=cookbooks[item].url%>" target="_blank"><%- lastPic %></a></div>
<%- steps %>
</div>
<div class="row">
View
@@ -7,7 +7,7 @@
text-align: right;
}
</style>
-<div class="container-fluid">
+<div class="mainContainer">
<div class="row-fluid">
<div class="span8">
<%if(locals.error){%>

0 comments on commit eecbcf0

Please sign in to comment.