add gender nav for brand page. code review by XWG
Showing
4 changed files
with
95 additions
and
2 deletions
@@ -13,6 +13,7 @@ var swiper, | @@ -13,6 +13,7 @@ var swiper, | ||
13 | $fixTitleBar, | 13 | $fixTitleBar, |
14 | $brandList = $('.brand-list'), | 14 | $brandList = $('.brand-list'), |
15 | $icon = $('.search-icon'), | 15 | $icon = $('.search-icon'), |
16 | + $genderItem = $('.genderNav li'), | ||
16 | hotBrandsSwiper; | 17 | hotBrandsSwiper; |
17 | 18 | ||
18 | var searchH = $('.newbrand-search').outerHeight(), | 19 | var searchH = $('.newbrand-search').outerHeight(), |
@@ -177,3 +178,10 @@ if ($('.brand-search-page').length) { | @@ -177,3 +178,10 @@ if ($('.brand-search-page').length) { | ||
177 | }); | 178 | }); |
178 | 179 | ||
179 | } | 180 | } |
181 | + | ||
182 | +if($genderItem.length > 0) { | ||
183 | + $genderItem.on('touchstart', function(){ | ||
184 | + $('.genderNav ul .active').removeClass('active'); | ||
185 | + $(this).addClass('active'); | ||
186 | + }) | ||
187 | +} |
1 | .brand-page { | 1 | .brand-page { |
2 | + .re-pos-search { | ||
3 | + top: 170rem / $pxConvertRem !important; | ||
4 | + } | ||
5 | + .genderNav { | ||
6 | + display: block; | ||
7 | + width: 100%; | ||
8 | + height: 80rem / $pxConvertRem; | ||
9 | + line-height: 80rem / $pxConvertRem; | ||
10 | + overflow: hidden; | ||
11 | + color: #aeaeae; | ||
12 | + z-index: 3; | ||
13 | + position: fixed; | ||
14 | + top: 90rem / $pxConvertRem; | ||
15 | + border-bottom: 1px solid #e1e1e1; | ||
16 | + | ||
17 | + ul{ | ||
18 | + width: 100%; | ||
19 | + height: 90%; | ||
20 | + overflow: hidden; | ||
21 | + li{ | ||
22 | + width: 25%; | ||
23 | + height: 100%; | ||
24 | + overflow: hidden; | ||
25 | + float: left; | ||
26 | + text-align: center; | ||
27 | + position: relative; | ||
28 | + font-size: 28rem / $pxConvertRem; | ||
29 | + i{ | ||
30 | + width: 100%; | ||
31 | + height: 40%; | ||
32 | + overflow: hidden; | ||
33 | + display: block; | ||
34 | + } | ||
35 | + span:not(.split-border){ | ||
36 | + width: 100%; | ||
37 | + height: auto; | ||
38 | + overflow: hidden; | ||
39 | + display: block; | ||
40 | + //line-height: 40rem / $pxConvertRem; | ||
41 | + } | ||
42 | + | ||
43 | + .split-border { | ||
44 | + display: inline-block; | ||
45 | + width: 2px; | ||
46 | + height: 1rem; | ||
47 | + background-color: #e1e1e1; | ||
48 | + position: absolute; | ||
49 | + top: 30%; | ||
50 | + right: 0; | ||
51 | + } | ||
52 | + } | ||
53 | + | ||
54 | + li:last-child { | ||
55 | + .split-border { | ||
56 | + display: none; | ||
57 | + } | ||
58 | + } | ||
59 | + | ||
60 | + li.active { | ||
61 | + color: #444; | ||
62 | + } | ||
63 | + } | ||
64 | + } | ||
2 | .newbrand-search { | 65 | .newbrand-search { |
3 | width: 93.75%; | 66 | width: 93.75%; |
4 | height: 60rem / $pxConvertRem; | 67 | height: 60rem / $pxConvertRem; |
1 | {{> layout/header}} | 1 | {{> layout/header}} |
2 | <div class="brand-page yoho-page"> | 2 | <div class="brand-page yoho-page"> |
3 | {{# channel}} | 3 | {{# channel}} |
4 | - | ||
5 | - <div class="newbrand-search"> | 4 | + |
5 | + {{> home/top_nav}} | ||
6 | + | ||
7 | + <div class="newbrand-search re-pos-search"> | ||
6 | <div class="search-box clearfix"> | 8 | <div class="search-box clearfix"> |
7 | <a href="{{searchUrl}}" > | 9 | <a href="{{searchUrl}}" > |
8 | <input type="text" class="search-input" placeholder="查找品牌" readonly="true"> | 10 | <input type="text" class="search-input" placeholder="查找品牌" readonly="true"> |
1 | +<div class="genderNav"> | ||
2 | + <ul> | ||
3 | + <li class="active"> | ||
4 | + <span>Boy</span> | ||
5 | + <span class="split-border"></span> | ||
6 | + </li> | ||
7 | + <li> | ||
8 | + <span>Girl</span> | ||
9 | + <span class="split-border"></span> | ||
10 | + </li> | ||
11 | + <li> | ||
12 | + <span>Kid</span> | ||
13 | + <span class="split-border"></span> | ||
14 | + </li> | ||
15 | + <li> | ||
16 | + <span>Lifestyle</span> | ||
17 | + <span class="split-border"></span> | ||
18 | + </li> | ||
19 | + </ul> | ||
20 | +</div> |
-
Please register or login to post a comment