Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
1
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
yyq
9 years ago
Commit
3f57d68ca509e13e7adbdac8ff59b31aafa8a8e7
1 parent
93c73ce0
奥莱main menu调整
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
9 deletions
doraemon/models/header.js
doraemon/views/partial/header.hbs
public/scss/_header.css
doraemon/models/header.js
View file @
3f57d68
...
...
@@ -60,16 +60,23 @@ const getNavBar = (data, type) => {
let
navBars
=
[];
_
.
forEach
(
data
,
item
=>
{
let
obj
=
{};
let
obj
=
{},
lowEn
=
_
.
camelCase
(
item
.
sort_name_en
).
toLowerCase
();
obj
.
link
=
item
.
sort_url
;
obj
.
cn
=
item
.
sort_name
;
obj
.
en
=
item
.
sort_name_en
;
if
(
type
===
_
.
camelCase
(
item
.
sort_name_en
).
toLowerCase
()
)
{
if
(
type
===
lowEn
)
{
obj
.
active
=
true
;
}
// 奥莱频道显示图片,特殊处理
if
(
lowEn
===
'outlets'
)
{
obj
.
ico
=
item
.
sort_ico
;
}
navBars
.
push
(
obj
);
});
...
...
doraemon/views/partial/header.hbs
View file @
3f57d68
...
...
@@ -66,13 +66,17 @@
<div
class=
"main-logo"
><a
href=
"http://www.yohobuy.com/"
class=
"main-link"
></a></div>
<ul
class=
"main-nav-list"
>
{{#
navbars
}}
<li
{{#if
active
}}
class=
"cure"
{{/if}}
>
<h3
class=
"name-cn"
>
<a
href=
"
{{
link
}}
"
>
{{
cn
}}
</a>
</h3>
<h3
class=
"name-en"
>
<a
href=
"
{{
link
}}
"
>
{{
en
}}
</a>
</h3>
<li
{{#if
active
}}
class=
"cure"
{{/if}}{{#if
ico
}}
style=
"background: url(
{{
image
ico
54
32
}}
) no-repeat center center"
{{/if}}
>
{{#if
ico
}}
<a
href=
"
{{
link
}}
"
class=
"menu-ico"
></a>
{{^}}
<h3
class=
"name-cn"
>
<a
href=
"
{{
link
}}
"
>
{{
cn
}}
</a>
</h3>
<h3
class=
"name-en"
>
<a
href=
"
{{
link
}}
"
>
{{
en
}}
</a>
</h3>
{{/if}}
</li>
{{/
navbars
}}
</ul>
...
...
public/scss/_header.css
View file @
3f57d68
...
...
@@ -302,6 +302,12 @@
color
:
#fff
;
}
}
.menu-ico
{
width
:
80px
;
height
:
32px
;
display
:
block
;
}
}
.outlets-logo
{
...
...
Please
register
or
login
to post a comment