Authored by 梁志锋

Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop

framework @ 75bbc3b0
Subproject commit 119c247f5cf929aa1e059e40609bb16dd6b58f05
Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
... ...
... ... @@ -10,6 +10,7 @@ var $ = require('jquery'),
lazyLoad = require('yoho.lazyload');
var swiper,
$fixTitleBar,
$brandText,
$brandHref,
$brandList = $('.brand-list');
... ... @@ -40,21 +41,30 @@ $('.yoho-header').css({
top: 0
});
$fixTitleBar = $('<div class="title-bar fixed-title-bar"><h2></h2></div>');
$fixTitleBar.hide();
$('.brand-list').last().append($fixTitleBar);
$(window).scroll(function() {
var scrTop = $(window).scrollTop();
var scrTop = $(window).scrollTop(),
minBrandListTop = brandSwipe + $('.hot-brand').outerHeight() +
$('.banner-top').outerHeight();
if ($brandList.eq(0).offset().top < minBrandListTop) {
$fixTitleBar.hide();
}
$('.brand-list').each(function() {
$brandList.each(function() {
var offTop = $(this).offset().top - brandSwipe;
if (scrTop >= offTop) {
$brandList.find('.title-bar').css('position', 'static');
$(this).find('.title-bar').css({
$fixTitleBar.css({
display: 'block',
position: 'fixed',
top: brandSwipe
});
} else {
$(this).find('.title-bar').css('position', 'static');
}).find('h2').html($(this).find('.title-bar').text());
}
});
});
... ...
... ... @@ -4,10 +4,13 @@
* @date: 2015/10/28
*/
var $ = require('jquery');
var $searchBox = $('.search-box'),
$indexSearch = $('.index-search'),
$indexLogo = $('.index-logo');
require('../common');
function showBigSearch() {
$indexLogo.css({
opacity: 0
... ... @@ -50,4 +53,4 @@ $('.no-search').on('touchend', function() {
hideBigSearch();
});
window.rePosFooter();
window.rePosFooter && window.rePosFooter();
... ...
... ... @@ -185,51 +185,50 @@
.search-result {
padding-top: 176rem / $pxConvertRem;
}
}
.history{
width: 100%;
height: auto;
overflow: hidden;
position: absolute;
left: 0;
top: 176rem / $pxConvertRem;
> h6{
width: 100%;
height: 88rem / $pxConvertRem;
line-height: 88rem / $pxConvertRem;
color: #999;
text-indent: .6rem;
font-size: 36em / $pxConvertRem;
}
.historyList{
.history{
width: 100%;
height: auto;
overflow: hidden;
display: block;
> a{
position: absolute;
left: 0;
top: 176rem / $pxConvertRem;
> h6{
width: 100%;
height: 88rem / $pxConvertRem;
line-height: 88rem / $pxConvertRem;
color: #999;
text-indent: .6rem;
font-size: 36em / $pxConvertRem;
}
.historyList{
width: 100%;
height: auto;
overflow: hidden;
display: block;
> a{
width: auto;
height: 58rem / $pxConvertRem;
overflow: hidden;
line-height: 58rem / $pxConvertRem;
margin: 0 0 20rem / $pxConvertRem .6rem;
padding: 0 20rem / $pxConvertRem;
float: left;
background-color:#f8f8f8;
color: #444;
}
}
> span{
width: auto;
height: 58rem / $pxConvertRem;
height: 68rem / $pxConvertRem;
overflow: hidden;
line-height: 58rem / $pxConvertRem;
margin: 0 0 20rem / $pxConvertRem .6rem;
padding: 0 20rem / $pxConvertRem;
float: left;
background-color:#f8f8f8;
color: #444;
display: inline-block;
line-height: 68rem / $pxConvertRem;
border:1px solid #e6e6e6;
padding: 0 28rem / $pxConvertRem;
font-size: 48em / $pxConvertRem;
margin-left: .6rem;
color: #000;
}
}
> span{
width: auto;
height: 68rem / $pxConvertRem;
overflow: hidden;
display: inline-block;
line-height: 68rem / $pxConvertRem;
border:1px solid #e6e6e6;
padding: 0 28rem / $pxConvertRem;
font-size: 48em / $pxConvertRem;
margin-left: .6rem;
color: #000;
}
}
... ...
... ... @@ -17,14 +17,15 @@
overflow: hidden;
.brand-logo {
display: table-cell;
width: 100%;
height: 128rem / $pxConvertRem;
line-height: 128rem / $pxConvertRem;
text-align: center;
font-size: 0;
vertical-align: middle;
img {
vertical-align: middle;
max-width: 100%;
max-height: 100%;
}
... ...