Authored by xuqi

checked & senior hover

@@ -2,18 +2,26 @@ @@ -2,18 +2,26 @@
2 <div class="products-page yoho-page"> 2 <div class="products-page yoho-page">
3 <div class="filter-box"> 3 <div class="filter-box">
4 {{# filters}} 4 {{# filters}}
5 - {{#if checked}}  
6 - <div class="checked"> 5 + {{# checkedConditons}}
  6 + <div class="checked-conditions section">
7 <span class="title">已选条件:</span> 7 <span class="title">已选条件:</span>
8 8
9 - {{# checked}}  
10 - <span class="item"> 9 + <div class="attr-content clearfix">
  10 + {{#each conditions}}
  11 + <a class="tag" href="{{href}}">
  12 + {{#if name}}
11 {{name}} 13 {{name}}
12 - <i class="close">x</i>  
13 - </span>  
14 - {{/ checked}}  
15 - </div> 14 + {{^}}
  15 + <i class="color-block" style="background: {{color}}"></i>
16 {{/if}} 16 {{/if}}
  17 + <i class="close iconfont">&#xe602;</i>
  18 + </a>
  19 + {{/each}}
  20 +
  21 + <a class="clear-checked" href="{{clearUrl}}">清空筛选条件</a>
  22 + </div>
  23 + </div>
  24 + {{/ checkedConditons}}
17 25
18 {{#if channel}} 26 {{#if channel}}
19 <div class="channel section"> 27 <div class="channel section">
@@ -174,7 +182,9 @@ @@ -174,7 +182,9 @@
174 {{#each seniorChose}} 182 {{#each seniorChose}}
175 <li class="attr"> 183 <li class="attr">
176 {{name}} 184 {{name}}
177 - <span class="iconfont"></span> 185 + <span class="iconfont">&#xe600;</span>
  186 +
  187 + <div class="senior-up-icon"></div>
178 188
179 <div class="senior-sub hide" data-attr="{{attr}}"> 189 <div class="senior-sub hide" data-attr="{{attr}}">
180 {{#if showMulti}} 190 {{#if showMulti}}
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 10
11 &:first-child { 11 &:first-child {
12 border-top: none; 12 border-top: none;
  13 + background: #eaeceb;
13 } 14 }
14 } 15 }
15 16
@@ -48,12 +49,29 @@ @@ -48,12 +49,29 @@
48 -moz-user-select: none; 49 -moz-user-select: none;
49 } 50 }
50 51
51 - .channel {  
52 - line-height: 35px;  
53 - background: #eaeceb; 52 + .checked-conditions {
  53 + line-height: 30px;
  54 +
  55 + .tag {
  56 + display: block;
  57 + float: left;
  58 + padding: 0 10px;
  59 + margin-right: 30px;
  60 + background: #000;
  61 + color: #fff;
  62 + cursor: pointer;
  63 + }
  64 +
  65 + .color-block {
  66 + height: 14px;
  67 + width: 14px;
  68 + border: 1px solid #fff;
  69 + margin-bottom: -3px;
  70 + }
54 71
55 - .title, .attr {  
56 - line-height: 35px; 72 + .clear-checked {
  73 + color: #999;
  74 + float: right;
57 } 75 }
58 } 76 }
59 77
@@ -139,6 +157,7 @@ @@ -139,6 +157,7 @@
139 margin-top: 5px; 157 margin-top: 5px;
140 background: #f4f7f6; 158 background: #f4f7f6;
141 min-height: 30px; 159 min-height: 30px;
  160 + border: 1px solid #000;
142 } 161 }
143 } 162 }
144 163
@@ -200,17 +219,29 @@ @@ -200,17 +219,29 @@
200 margin-right: 5px; 219 margin-right: 5px;
201 } 220 }
202 221
203 - .senior-attr-wrap { 222 + .senior-attr-wrap > .attr {
204 position: relative; 223 position: relative;
205 224
  225 + &:hover {
  226 + > .iconfont {
  227 + visibility: hidden;
  228 + }
  229 +
  230 + .senior-up-icon {
  231 + display: block;
  232 + }
  233 + }
  234 + }
  235 +
206 .senior-sub { 236 .senior-sub {
207 box-sizing: border-box; 237 box-sizing: border-box;
208 position: absolute; 238 position: absolute;
209 padding: 15px 0; 239 padding: 15px 0;
210 left: 0; 240 left: 0;
211 - right: -16px; 241 + width: 1050px;
  242 + top: 39px;
212 background: #fff; 243 background: #fff;
213 - border: 1px solid #ccc; 244 + border: 1px solid #eaeceb;
214 245
215 ul { 246 ul {
216 max-width: 950px; 247 max-width: 950px;
@@ -226,9 +257,18 @@ @@ -226,9 +257,18 @@
226 right: 15px; 257 right: 15px;
227 } 258 }
228 } 259 }
229 - }  
230 260
  261 + .senior-up-icon {
  262 + position: absolute;
  263 + width: 15px;
  264 + height: 9px;
  265 + z-index: 1;
  266 + left: 50%;
  267 + margin-left: -18px;
  268 + display: none;
231 269
  270 + background: image-url('product/senior-up.png') no-repeat;
  271 + }
232 272
233 .checkbox { 273 .checkbox {
234 display: none; 274 display: none;
@@ -13,6 +13,23 @@ class IndexController extends AbstractAction @@ -13,6 +13,23 @@ class IndexController extends AbstractAction
13 $data = array( 13 $data = array(
14 'searchListPage' => true, 14 'searchListPage' => true,
15 'filters' => array( 15 'filters' => array(
  16 + 'checkedConditons' => array(
  17 + 'conditions' => array(
  18 + array(
  19 + 'href' => '',
  20 + 'name' => '暗黑'
  21 + ),
  22 + array(
  23 + 'href' => '',
  24 + 'color' => '#f00'
  25 + ),
  26 + array(
  27 + 'href' => '',
  28 + 'name' => 'CLOT'
  29 + )
  30 + ),
  31 + 'clearUrl' => ''
  32 + ),
16 'channel' => array( 33 'channel' => array(
17 array( 34 array(
18 'href' => '/?gender=1,3', 35 'href' => '/?gender=1,3',