Authored by 沈志敏

调整样式

... ... @@ -12,14 +12,18 @@ const helpers = global.yoho.helpers;
*/
const component = {
index: (req, res, next) => {
var isLogin = true;
var testData = {
isLogin: true,
head_ico: "",
profile_name: "XXX",
head_ico: isLogin ? "" : "",
profile_name: isLogin ? "James Sen" : "登录/注册",
signinUrl: "/home",
wait_pay_num: 1,
wait_cargo_num: 2,
send_cargo_num: 3
send_cargo_num: 3,
address_num: 2,
product_favorite_total: 10,
brand_favorite_total: 21,
yoho_coin_num: 100
}
res.render('index', _.merge({
module: 'home',
... ...
<div class="my-page yoho-page">
<div class="my-header">
{{#isLogin}}
<a class="user-info" href="/home/mydetails">
<span class="user-avatar" data-avatar="{{head_ico}}"></span>
<br><span class="username">{{profile_name}}</span>
</a>
{{/isLogin}}
{{^isLogin}}
<div class="user-info">
<a class="login-btn" href="{{signinUrl}}">
登录/注册
</a>
</div>
{{/isLogin}}
</div>
<div class="my-order">
<a class="order-title" href="/home/orders">
我的订单
<span>
<span class="read-order">
查看全部订单 <span class="icon icon-right"></span>
</span>
</a>
... ... @@ -55,23 +47,27 @@
<div class="group-list">
<a class="list-item" href="/home/address">
地址管理
<span class="num">3 <span class="icon icon-right"></span></span>
<span class="num">{{address_num}} <span class="icon icon-right"></span></span>
</a>
</div>
<div class="group-list">
<a class="list-item" href="/home/favorite">
收藏的商品
<span class="num">120 <span class="icon icon-right"></span></span>
<span class="num">{{product_favorite_total}} <span class="icon icon-right"></span></span>
</a>
<a class="list-item" href="/home/favorite?tab=brand">
收藏的品牌
<span class="num">120 <span class="icon icon-right"></span></span>
<span class="num">{{brand_favorite_total}} <span class="icon icon-right"></span></span>
</a>
<a class="list-item" href="/home/favorite?tab=brand">
收藏的品牌
<span class="num">{{brand_favorite_total}} <span class="icon icon-right"></span></span>
</a>
</div>
<div class="group-list">
<a class="list-item" href="/home/mycurrency">
YOHO 币
<span class="num">100 <span class="icon icon-right"></span></span>
<span class="num">{{yoho_coin_num}} <span class="icon icon-right"></span></span>
</a>
</div>
<div class="group-list">
... ...
... ... @@ -3,20 +3,19 @@
background: #f0f0f0;
a {
color: #444;
color: #000000;
}
.user-info {
display: block;
position: relative;
padding: 0 30px;
color: #fff;
color: #000000;
font-size: 34px;
line-height: 138px;
height: 440px;
background-size: cover;
background: #444;
/*background: resolve("home/header-bg.jpg"); */
background: resolve("home/header-bg.png");
text-align: center;
.user-avatar {
... ... @@ -27,7 +26,7 @@
height: 200px;
border-radius: 50%;
border: 6px solid #a7a8a9;
background: #a7a8a9;
background: resolve("home/user-icon.png");
background-size: 100%;
}
... ... @@ -37,6 +36,7 @@
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-size: 32px;
max-width: 260px;
}
}
... ... @@ -61,8 +61,8 @@
.order-title {
display: block;
padding: 0 30px;
font-size: 16PX;
padding: 0 29px;
font-size: 34px;
line-height: 88px;
span {
... ... @@ -73,6 +73,10 @@
&.highlight {
background: #eee;
}
.read-order{
font-size: 30px;
}
}
.order-type {
... ... @@ -84,7 +88,7 @@
position: relative;
float: left;
color: #444;
font-size: 14PX;
font-size: 24px;
line-height: 1.5;
width: 170px;
... ... @@ -98,7 +102,7 @@
right: 36px;
width: 72px;
height: 72px;
font-size: 40px;
font-size: 34px;
line-height: 72px;
color: #fff;
background: #f03d35;
... ... @@ -120,8 +124,9 @@
display: block;
position: relative;
padding: 0 30px;
font-size: 16PX;
font-size: 34px;
line-height: 90px;
overflow: hidden;
&.highlight {
background: #eee;
... ... @@ -144,12 +149,12 @@
.icon {
margin-right: 5px;
font-size: 30px;
font-size: 34px;
vertical-align: top;
}
.num {
color: #e0e0e0;
color: #b0b0b0;
float: right;
}
}
... ...