Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHO-ACTIVITY-PHP
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
梁志锋
9 years ago
Commit
6cc4f2187e0b8108ef31bc71b45e9453dedab333
2 parents
1576941a
df4465ba
Merge branch 'develop' of git.dev.yoho.cn:web/yohobuy into develop
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
49 deletions
framework
static/js/category/brand.js
static/js/index/channel.js
static/sass/category/_brand.scss
static/sass/home/_hot-brands.scss
framework
@
75bbc3b0
Subproject commit
119c247f5cf929aa1e059e40609bb16dd6b58f05
Subproject commit
75bbc3b075de19f239532f60c5995d06c5f814e2
...
...
static/js/category/brand.js
View file @
6cc4f21
...
...
@@ -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
());
}
});
});
...
...
static/js/index/channel.js
View file @
6cc4f21
...
...
@@ -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
();
...
...
static/sass/category/_brand.scss
View file @
6cc4f21
...
...
@@ -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
:
5
8rem
/
$pxConvertRem
;
height
:
6
8rem
/
$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
;
}
}
...
...
static/sass/home/_hot-brands.scss
View file @
6cc4f21
...
...
@@ -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%
;
}
...
...
Please
register
or
login
to post a comment