Merge branch 'develop' of http://git.dev.yoho.cn/web/yohobuy into develop
Showing
5 changed files
with
32 additions
and
16 deletions
@@ -7,8 +7,6 @@ var $ = require('jquery'); | @@ -7,8 +7,6 @@ var $ = require('jquery'); | ||
7 | 7 | ||
8 | var $footer = $('#yoho-footer'); | 8 | var $footer = $('#yoho-footer'); |
9 | 9 | ||
10 | -var FOOTERHEIGHT = 120; //footer height | ||
11 | - | ||
12 | function cookie(name) { | 10 | function cookie(name) { |
13 | var cookies = document.cookie, | 11 | var cookies = document.cookie, |
14 | cookieVal, | 12 | cookieVal, |
@@ -100,7 +98,7 @@ function rePosFooter() { | @@ -100,7 +98,7 @@ function rePosFooter() { | ||
100 | return; | 98 | return; |
101 | } | 99 | } |
102 | 100 | ||
103 | - if ($('body').height() < $(window).height() - FOOTERHEIGHT) { | 101 | + if ($('body').height() <= $(window).height()) { |
104 | $footer.addClass('bottom'); | 102 | $footer.addClass('bottom'); |
105 | } else { | 103 | } else { |
106 | $footer.removeClass('bottom'); | 104 | $footer.removeClass('bottom'); |
@@ -113,7 +111,7 @@ function rePosFooter() { | @@ -113,7 +111,7 @@ function rePosFooter() { | ||
113 | 111 | ||
114 | var user = getUser(); | 112 | var user = getUser(); |
115 | 113 | ||
116 | - if ($('body').height() < $(window).height() - FOOTERHEIGHT) { | 114 | + if ($('body').height() <= $(window).height()) { |
117 | $footer.addClass('bottom'); | 115 | $footer.addClass('bottom'); |
118 | } | 116 | } |
119 | 117 |
@@ -8,7 +8,7 @@ var $searchBox = $('.search-box'), | @@ -8,7 +8,7 @@ var $searchBox = $('.search-box'), | ||
8 | $indexSearch = $('.index-search'), | 8 | $indexSearch = $('.index-search'), |
9 | $indexLogo = $('.index-logo'); | 9 | $indexLogo = $('.index-logo'); |
10 | 10 | ||
11 | -$searchBox.find('input').on('focus', function() { | 11 | +function showBigSearch() { |
12 | $indexLogo.css({ | 12 | $indexLogo.css({ |
13 | width: 0 | 13 | width: 0 |
14 | }); | 14 | }); |
@@ -19,7 +19,9 @@ $searchBox.find('input').on('focus', function() { | @@ -19,7 +19,9 @@ $searchBox.find('input').on('focus', function() { | ||
19 | width: '15.5rem' | 19 | width: '15.5rem' |
20 | }); | 20 | }); |
21 | $('.clear-text, .no-search').show(); | 21 | $('.clear-text, .no-search').show(); |
22 | -}).on('blur', function() { | 22 | +} |
23 | + | ||
24 | +function hideBigSearch() { | ||
23 | $indexLogo.css({ | 25 | $indexLogo.css({ |
24 | width: '5.4rem' | 26 | width: '5.4rem' |
25 | }); | 27 | }); |
@@ -30,12 +32,22 @@ $searchBox.find('input').on('focus', function() { | @@ -30,12 +32,22 @@ $searchBox.find('input').on('focus', function() { | ||
30 | width: '9.6rem' | 32 | width: '9.6rem' |
31 | }); | 33 | }); |
32 | $('.clear-text, .no-search').hide(); | 34 | $('.clear-text, .no-search').hide(); |
35 | +} | ||
36 | + | ||
37 | +$searchBox.find('input').on('focus', function() { | ||
38 | + showBigSearch(); | ||
33 | }); | 39 | }); |
34 | -$searchBox.find('.clear-text').click(function() { | ||
35 | - $searchBox.find('input').val('').trigger('focus'); | 40 | + |
41 | +$searchBox.find('.clear-text').on('touchend', function() { | ||
42 | + $searchBox.find('input').val(''); | ||
36 | }); | 43 | }); |
37 | -$searchBox.find('.search-icon').click(function() { | 44 | +$searchBox.find('.search-icon').on('touchend', function() { |
38 | $indexSearch.submit(); | 45 | $indexSearch.submit(); |
39 | }); | 46 | }); |
40 | 47 | ||
48 | +$('.no-search').on('touchend', function() { | ||
49 | + $searchBox.find('input').val(''); | ||
50 | + hideBigSearch(); | ||
51 | +}); | ||
52 | + | ||
41 | window.rePosFooter(); | 53 | window.rePosFooter(); |
@@ -108,7 +108,7 @@ | @@ -108,7 +108,7 @@ | ||
108 | padding: 0 20rem / $pxConvertRem; | 108 | padding: 0 20rem / $pxConvertRem; |
109 | a { | 109 | a { |
110 | display: block; | 110 | display: block; |
111 | - padding-top: 10rem / $pxConvertRem; | 111 | + // padding-top: 10rem / $pxConvertRem; |
112 | height: 76rem / $pxConvertRem; | 112 | height: 76rem / $pxConvertRem; |
113 | line-height: 76rem / $pxConvertRem; | 113 | line-height: 76rem / $pxConvertRem; |
114 | font-size: 28rem / $pxConvertRem; | 114 | font-size: 28rem / $pxConvertRem; |
@@ -116,13 +116,14 @@ | @@ -116,13 +116,14 @@ | ||
116 | border-top: 1px solid #f9f9f9; | 116 | border-top: 1px solid #f9f9f9; |
117 | i { | 117 | i { |
118 | display: inline-block; | 118 | display: inline-block; |
119 | + margin-top: -4rem / $pxConvertRem; | ||
119 | margin-left: 24rem / $pxConvertRem; | 120 | margin-left: 24rem / $pxConvertRem; |
120 | width: 58rem / $pxConvertRem; | 121 | width: 58rem / $pxConvertRem; |
121 | height: 38rem / $pxConvertRem; | 122 | height: 38rem / $pxConvertRem; |
122 | text-align: center; | 123 | text-align: center; |
123 | vertical-align: middle; | 124 | vertical-align: middle; |
124 | font-size: 18rem / $pxConvertRem; | 125 | font-size: 18rem / $pxConvertRem; |
125 | - line-height: 39rem / $pxConvertRem; | 126 | + line-height: 38rem / $pxConvertRem; |
126 | color: #fff; | 127 | color: #fff; |
127 | border-radius: 50rem / $pxConvertRem;; | 128 | border-radius: 50rem / $pxConvertRem;; |
128 | } | 129 | } |
@@ -4,12 +4,12 @@ | @@ -4,12 +4,12 @@ | ||
4 | position: fixed; | 4 | position: fixed; |
5 | top: 0; | 5 | top: 0; |
6 | bottom: 0; | 6 | bottom: 0; |
7 | - // left: 0; | 7 | + left: -540rem / $pxConvertRem; |
8 | right: 640rem / $pxConvertRem; | 8 | right: 640rem / $pxConvertRem; |
9 | width: 540rem / $pxConvertRem; | 9 | width: 540rem / $pxConvertRem; |
10 | z-index: -1; | 10 | z-index: -1; |
11 | overflow: hidden; | 11 | overflow: hidden; |
12 | - @include transition(right .3s); | 12 | + @include transition(all .3s); |
13 | 13 | ||
14 | ul { | 14 | ul { |
15 | background: #f0f0f0; | 15 | background: #f0f0f0; |
@@ -107,6 +107,7 @@ | @@ -107,6 +107,7 @@ | ||
107 | } | 107 | } |
108 | 108 | ||
109 | .side-nav.on { | 109 | .side-nav.on { |
110 | + left: 0; | ||
110 | right: 100rem / $pxConvertRem; | 111 | right: 100rem / $pxConvertRem; |
111 | z-index: 3; | 112 | z-index: 3; |
112 | } | 113 | } |
@@ -24,7 +24,8 @@ | @@ -24,7 +24,8 @@ | ||
24 | width: 384rem / $pxConvertRem; | 24 | width: 384rem / $pxConvertRem; |
25 | height: 112rem / $pxConvertRem; | 25 | height: 112rem / $pxConvertRem; |
26 | overflow: hidden; | 26 | overflow: hidden; |
27 | - transition: width 400ms; | 27 | + z-index: 3; |
28 | + @include transition(width .4s); | ||
28 | .search-box { | 29 | .search-box { |
29 | float: left; | 30 | float: left; |
30 | position: relative; | 31 | position: relative; |
@@ -96,10 +97,10 @@ | @@ -96,10 +97,10 @@ | ||
96 | min-height: 800rem / $pxConvertRem; | 97 | min-height: 800rem / $pxConvertRem; |
97 | 98 | ||
98 | .index-channel-list { | 99 | .index-channel-list { |
99 | - padding-top: 50%; | 100 | + margin-top: -50%; |
100 | width: 100%; | 101 | width: 100%; |
101 | position: absolute; | 102 | position: absolute; |
102 | - top: -180rem / $pxConvertRem; | 103 | + top: 50%; |
103 | 104 | ||
104 | .list-item { | 105 | .list-item { |
105 | display: block; | 106 | display: block; |
@@ -114,6 +115,9 @@ | @@ -114,6 +115,9 @@ | ||
114 | background: #000; | 115 | background: #000; |
115 | border: 4px solid #fff; | 116 | border: 4px solid #fff; |
116 | font-weight: bold; | 117 | font-weight: bold; |
118 | + &:last-child { | ||
119 | + margin-bottom: 0; | ||
120 | + } | ||
117 | } | 121 | } |
118 | .lighter { | 122 | .lighter { |
119 | font-weight: lighter; | 123 | font-weight: lighter; |
-
Please register or login to post a comment