Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYPC
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
2
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
ccbikai
9 years ago
Commit
d18302d971da5cd51e6b9913b075c3e2f7f26e90
2 parents
561eac5f
3ef4c70c
merge code
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
118 additions
and
0 deletions
static/js/index/footer.js
static/sass/index/_index.scss
template/m.yohobuy.com/actions/index/index/index.phtml
static/js/index/footer.js
View file @
d18302d
...
...
@@ -6,6 +6,10 @@
var
$
=
require
(
'yoho.zepto'
);
var
$searchBox
=
$
(
'.search-box'
),
$indexSearch
=
$
(
'.index-search'
),
$indexLogo
=
$
(
'.index-logo'
);
function
downLoadApp
()
{
var
appUrl
=
'http://a.app.qq.com/o/simple.jsp?pkgname=com.yoho&g_f=995445'
;
var
clickedAt
=
new
Date
();
...
...
@@ -40,3 +44,42 @@ if (!window.cookie('_float-layer-app')) {
$
(
'#float-layer-app'
).
hide
();
}
/**
* 频道选择页面顶部搜索
* @author: bikai<kai.bi@yoho.cn>
* @date: 2015/10/28
*/
$searchBox
.
find
(
'input'
).
on
(
'focus'
,
function
()
{
$indexLogo
.
css
({
width
:
0
,
display
:
'none'
});
$searchBox
.
css
({
width
:
'12.8rem'
});
$indexSearch
.
css
({
width
:
'15.5rem'
});
$
(
'.clear-text, .no-search'
).
show
();
}).
on
(
'blur'
,
function
()
{
$indexLogo
.
css
({
width
:
'5.4rem'
,
display
:
'block'
});
$searchBox
.
css
({
width
:
'8.8rem'
});
$indexSearch
.
css
({
width
:
'9.6rem'
});
$
(
'.clear-text, .no-search'
).
hide
();
});
$searchBox
.
find
(
'.clear-text'
).
tap
(
function
()
{
$searchBox
.
find
(
'input'
).
val
(
''
).
trigger
(
'focus'
);
});
$searchBox
.
find
(
'.search-icon'
).
tap
(
function
()
{
$indexSearch
.
submit
();
});
\ No newline at end of file
...
...
static/sass/index/_index.scss
View file @
d18302d
...
...
@@ -2,7 +2,71 @@
width
:
100%
;
overflow
:
hidden
;
margin
:
0
auto
;
.index-header
{
padding
:
0
20rem
/
$pxConvertRem
;
width
:
100%
;
height
:
96rem
/
$pxConvertRem
;
line-height
:
96rem
/
$pxConvertRem
;
.index-logo
{
float
:
left
;
font-size
:
50rem
/
$pxConvertRem
;
width
:
216rem
/
$pxConvertRem
;
color
:
#343434
;
}
.index-search
{
float
:
right
;
width
:
384rem
/
$pxConvertRem
;
.search-box
{
float
:
left
;
position
:
relative
;
top
:
20rem
/
$pxConvertRem
;
width
:
352rem
/
$pxConvertRem
;
height
:
56rem
/
$pxConvertRem
;
padding-right
:
40rem
/
$pxConvertRem
;
z-index
:
1
;
transition
:
width
400ms
;
box-sizing
:
border-box
;
border
:
1px
solid
#ccc
;
overflow
:
hidden
;
}
input
{
float
:
left
;
width
:
100%
;
font-size
:
28rem
/
$pxConvertRem
;
padding
:
10rem
/
$pxConvertRem
;
color
:
#999
;
overflow
:
hidden
;
border
:
none
;
}
.iconfont
{
position
:
absolute
;
top
:
8rem
/
$pxConvertRem
;
width
:
40rem
/
$pxConvertRem
;
font-size
:
28rem
/
$pxConvertRem
;
z-index
:
1
;
line-height
:
40rem
/
$pxConvertRem
;
}
.clear-text
{
display
:
none
;
right
:
50rem
/
$pxConvertRem
;
color
:
#ccc
;
}
.search-icon
{
right
:
10rem
/
$pxConvertRem
;
color
:
#e6e6e6
;
}
}
.no-search
{
display
:
none
;
float
:
left
;
margin-right
:
10rem
/
$pxConvertRem
;
color
:
#999
;
font-size
:
28rem
/
$pxConvertRem
;
}
}
.index-container
{
position
:
relative
;
@include
transition
(
transform
0
.5s
);
...
...
template/m.yohobuy.com/actions/index/index/index.phtml
View file @
d18302d
...
...
@@ -3,6 +3,17 @@
<div
class=
"index-page yoho-page"
>
<div
class=
"index-container"
>
<div
class=
"index-header clearfix"
>
<div
class=
"iconfont index-logo"
>
60
e;</div>
<form
action=
"http://search.m.yohobuy.com"
class=
"index-search"
>
<a
href=
"javascript:void(0);"
class=
"no-search"
>取消</a>
<div
class=
"search-box"
>
<input
type=
"text"
name=
"query"
placeholder=
"搜索"
>
<span
class=
"iconfont clear-text"
>
623
;</span>
<span
class=
"iconfont search-icon"
>
60
f;</span>
</div>
</form>
</div>
<div
class=
"index-channel"
>
<img
class=
"img"
src=
"{{background}}"
alt=
""
>
...
...
Please
register
or
login
to post a comment