Authored by 王水玲

首页侧边栏

<div class="side-nav">
{{# sideNav}}
{{#if sideNav}}
<ul {{#if @first}}class="first"{{/if}}>
{{# this}}
<li class="{{styleClass}}">
{{#if url}}
<a href="{{url}}" style="{{#if color}}color:{{color}};{{/if}}">
{{# sideNav}}
<li class="{{toLowerCase sortNameEn}}">
{{#if sortUrl}}
<a href="{{sortUrl}}" style="{{#if sortNameColor}}color:{{sortNameColor}};{{/if}}">
{{else}}
<a href="javascript:;" style="{{#if color}}color:{{color}};{{/if}}">
<a href="javascript:;" style="{{#if sortNameColor}}color:{{sortNameColor}};{{/if}}">
{{/if}}
{{# img}}
<span class="nav-img" style="background-image: url({{.}})"></span>
{{/ img}}
{{^ img}}
{{# sortIco}}
<span class="nav-img" style="background-image: url({{image . 60 60}})"></span>
{{/ sortIco}}
{{^ sortIco}}
<i class="nav-icon"></i>
{{/ img}}
<em>{{textCn}}</em>
<span class="title">{{textEn}}</span>
{{# subNav}}
{{/ sortIco}}
<em>{{sortName}}</em>
<span class="title">{{sortNameEn}}</span>
{{# sub}}
<span class="enter-subnav iconfont">&#xe614;</span>
{{/ subNav}}
{{/ sub}}
</a>
{{# subNav}}
{{# sub}}
<ul class="sub-nav">
{{# list}}
<li class="{{# isSelect}}current{{/ isSelect}}" style="background-color:{{bgColor}};">
... ... @@ -38,9 +38,9 @@
</li>
{{/ list}}
</ul>
{{/ subNav}}
{{/ sub}}
</li>
{{/ this}}
{{/ sideNav}}
</ul>
{{/sideNav}}
{{/if}}
</div>
... ...
... ... @@ -55,3 +55,20 @@ exports.url = (uri, qs, module) => {
return url;
};
/**
* 大写转小写处理
* @param {[string]} str 转换字符
*/
exports.toLowerCase = (str) => {
return str.toLowerCase();
};
/**
* 小写转大写处理
* @param {[string]} str 转换字符
*/
exports.toUpperCase = (str) => {
return str.toUpperCase();
};
\ No newline at end of file
... ...
.channel {
.side-nav {
display: none;
background: #fff;
position: fixed;
... ... @@ -161,7 +161,7 @@
}
}
.channel.on {
.side-nav.on {
display: block;
}
... ...