Toggle navigation
Toggle navigation
This project
Loading...
Sign in
chenchao
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to dashboard
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
Email Patches
Plain Diff
Browse Files
Authored by
ccbikai
9 years ago
Commit
f857d423a43edc7b021a28fc9b4935a6d2b09dca
1 parent
22f70ea6
顶部图标点击背景色 变化
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
22 deletions
static/js/common.js
static/js/home/home.js
static/sass/home/_home-header.scss
static/sass/layout/_header.scss
template/m.yohobuy.com/partials/layout/page_header.phtml
static/js/common.js
View file @
f857d42
...
...
@@ -5,7 +5,8 @@
*/
var
$
=
require
(
'jquery'
);
var
$footer
=
$
(
'#yoho-footer'
);
var
$footer
=
$
(
'#yoho-footer'
),
$header
=
$
(
'.yoho-header'
);
function
cookie
(
name
)
{
var
cookies
=
document
.
cookie
,
...
...
@@ -153,6 +154,13 @@ function rePosFooter() {
}());
$header
.
on
(
'touchstart'
,
'a'
,
function
()
{
$header
.
find
(
'a'
).
removeClass
(
'highlight'
);
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
'a'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
});
//暴露公共接口
window
.
cookie
=
cookie
;
...
...
static/js/home/home.js
View file @
f857d42
...
...
@@ -214,8 +214,13 @@ function tsAnimate() {
setTimeout
(
tsAnimate
,
3000
);
// 底部留出tab 的高度
$
(
'.home-header .iconfont'
).
on
(
'touchstart'
,
function
()
{
$
(
this
).
addClass
(
'highlight'
);
}).
on
(
'touchend touchcancel'
,
function
()
{
$
(
this
).
removeClass
(
'highlight'
);
});
// 底部留出tab 的高度
$
(
'#yoho-footer'
).
css
({
'margin-bottom'
:
'2.5rem'
});
...
...
static/sass/home/_home-header.scss
View file @
f857d42
...
...
@@ -63,13 +63,23 @@
.search-btn
{
position
:
absolute
;
right
:
32rem
/
$pxConvertRem
;
right
:
0
;
top
:
0
;
bottom
:
0
;
a
{
width
:
90rem
/
$pxConvertRem
;
height
:
90rem
/
$pxConvertRem
;
text-align
:
center
;
a
{
display
:
block
;
color
:
#fff
;
font-size
:
40rem
/
$pxConvertRem
;
line-height
:
90rem
/
$pxConvertRem
;
}
}
.iconfont.highlight
{
background
:
rgba
(
200
,
200
,
200
,.
4
);
}
}
.girls-wrap
.home-header
{
...
...
static/sass/layout/_header.scss
View file @
f857d42
...
...
@@ -24,26 +24,31 @@
background
:
#4f4138
;
}
.nav-back
{
a
.highlight
{
background
:
rgba
(
200
,
200
,
200
,.
1
);
}
%nav
{
display
:
block
;
position
:
absolute
;
left
:
34rem
/
$pxConvertRem
;
top
:
28rem
/
$pxConvertRem
;
width
:
18rem
/
$pxConvertRem
;
height
:
32rem
/
$pxConvertRem
;
background
:
image-url
(
'layout/back.png'
)
no-repeat
;
background-size
:
100%
100%
;
top
:
0
;
width
:
90rem
/
$pxConvertRem
;
height
:
90rem
/
$pxConvertRem
;
font-size
:
40rem
/
$pxConvertRem
;
line-height
:
90rem
/
$pxConvertRem
;
color
:
#fff
;
text-align
:
center
;
outline
:
none
;
}
.nav-back
{
@extend
%nav
;
left
:
0
;
}
.nav-home
{
position
:
absolute
;
top
:
28rem
/
$pxConvertRem
;
right
:
34rem
/
$pxConvertRem
;
width
:
20px
;
height
:
20px
;
background
:
image-url
(
'layout/home.png'
)
no-repeat
;
background-size
:
100%
100%
;
outline
:
none
;
@extend
%nav
;
right
:
0
;
}
.nav-title
{
...
...
template/m.yohobuy.com/partials/layout/page_header.phtml
View file @
f857d42
{
{#pageHeader
}
}
<header
class=
"yoho-header{{#if boys}} boys{{/if}}{{#if girls}} girls{{/if}}{{#if kids}} kids{{/if}}{{#if lifeStyle}} life-style{{/if}}"
>
{
{#if
navBack
}
}
<a
href=
"javascript:history.go(-1);"
class=
"
nav-back"
>
</a>
<a
href=
"javascript:history.go(-1);"
class=
"
iconfont nav-back"
>
610
;
</a>
{
{/if
}
}
{
{#navHome
}
}
<a
href=
"{{.}}"
class=
"
nav-home"
>
</a>
<a
href=
"{{.}}"
class=
"
iconfont nav-home"
>
611
;
</a>
{
{/navHome
}
}
{
{#navTitle
}
}
<p
class=
"nav-title"
>
{
{.
}
}</p>
...
...
Please
register
or
login
to post a comment