Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
YOHOBUYWAP
·
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
Email Patches
Plain Diff
Browse Files
Authored by
ccbikai
9 years ago
Commit
1a6b1aad10771331ee52317715821d77ac723409
1 parent
91b6f68e
频道选择页面顶部搜索优化
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
8 deletions
static/js/index/channel.js
static/sass/index/_index.scss
static/js/index/channel.js
View file @
1a6b1aa
...
...
@@ -8,7 +8,7 @@ var $searchBox = $('.search-box'),
$indexSearch
=
$
(
'.index-search'
),
$indexLogo
=
$
(
'.index-logo'
);
$searchBox
.
find
(
'input'
).
on
(
'focus'
,
function
()
{
function
showBigSearch
()
{
$indexLogo
.
css
({
width
:
0
});
...
...
@@ -19,7 +19,9 @@ $searchBox.find('input').on('focus', function() {
width
:
'15.5rem'
});
$
(
'.clear-text, .no-search'
).
show
();
}).
on
(
'blur'
,
function
()
{
}
function
hideBigSearch
()
{
$indexLogo
.
css
({
width
:
'5.4rem'
});
...
...
@@ -30,12 +32,22 @@ $searchBox.find('input').on('focus', function() {
width
:
'9.6rem'
});
$
(
'.clear-text, .no-search'
).
hide
();
}
$searchBox
.
find
(
'input'
).
on
(
'focus'
,
function
()
{
showBigSearch
();
});
$searchBox
.
find
(
'.clear-text'
).
click
(
function
()
{
$searchBox
.
find
(
'input'
).
val
(
''
).
trigger
(
'focus'
);
$searchBox
.
find
(
'.clear-text'
).
on
(
'touchend'
,
function
()
{
$searchBox
.
find
(
'input'
).
val
(
''
);
});
$searchBox
.
find
(
'.search-icon'
).
click
(
function
()
{
$searchBox
.
find
(
'.search-icon'
).
on
(
'touchend'
,
function
()
{
$indexSearch
.
submit
();
});
$
(
'.no-search'
).
on
(
'touchend'
,
function
()
{
$searchBox
.
find
(
'input'
).
val
(
''
);
hideBigSearch
();
});
window
.
rePosFooter
();
...
...
static/sass/index/_index.scss
View file @
1a6b1aa
...
...
@@ -24,7 +24,8 @@
width
:
384rem
/
$pxConvertRem
;
height
:
112rem
/
$pxConvertRem
;
overflow
:
hidden
;
transition
:
width
400ms
;
z-index
:
3
;
@include
transition
(
width
.4s
);
.search-box
{
float
:
left
;
position
:
relative
;
...
...
@@ -96,10 +97,10 @@
min-height
:
800rem
/
$pxConvertRem
;
.index-channel-list
{
padding-top
:
50%
;
margin-top
:
-
50%
;
width
:
100%
;
position
:
absolute
;
top
:
-180rem
/
$pxConvertRem
;
top
:
50%
;
.list-item
{
display
:
block
;
...
...
@@ -114,6 +115,9 @@
background
:
#000
;
border
:
4px
solid
#fff
;
font-weight
:
bold
;
&
:last-child
{
margin-bottom
:
0
;
}
}
.lighter
{
font-weight
:
lighter
;
...
...
Please
register
or
login
to post a comment