header_menu.html
3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href=""><img alt="Brand" width="20" height="20" src="${BASE_PATH }static/front/logo.png"></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<% if (!isEmpty(folders)){
for(item in folders["0"]){
var childs = folders[item.id+''];
if(isEmpty(childs)) {
%>
<% if(item.type==1){ %>
<li class="${flyfox.isNew(item.update_time,7)?'q-newicon':''} ${item.id==folders_selected!''?'active':''} "><a href="${BASE_PATH }${flyfox.getMenu(item.id)}.html">${item.name}</a></li>
<% } else if(item.type==2){ %>
<li class="${flyfox.isNew(item.update_time,7)?'q-newicon':''} ${item.id==folders_selected!''?'active':''} "><a href="${strutil.startWith(item.jump_url,'http')?'':BASE_PATH}${item.jump_url}">${item.name}</a></li>
<% } else if(item.type==3){ %>
<li class="${flyfox.isNew(item.update_time,7)?'q-newicon':''} ${item.id==folders_selected!''?'active':''} "><a href="${strutil.startWith(item.jump_url,'http')?'':BASE_PATH}${item.jump_url}" target="_blank">${item.name}</a></li>
<% } else if(item.type==4){ %>
${item.jump_url}
<% } %>
<%
}else {
%>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">${item.name}<span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<% for(childsItem in childs){ %>
<% // 如果是跳转到admin后台管理页面,那么必须是登录并且是管理员 %>
<% if(childsItem.type==1){ %>
<li class="${flyfox.isNew(childsItem.update_time,7)?'q-newicon':''} ${childsItem.id==folders_selected!''?'active':''} "><a href="${BASE_PATH }${flyfox.getMenu(childsItem.id)}.html">${childsItem.name}</a></li>
<% } else if(childsItem.type==2){ %>
<li class="${flyfox.isNew(childsItem.update_time,7)?'q-newicon':''} ${childsItem.id==folders_selected!''?'active':''} "><a href="${strutil.startWith(childsItem.jump_url,'http')?'':BASE_PATH}${childsItem.jump_url}">${childsItem.name}</a></li>
<% } else if(childsItem.type==3){ %>
<li class="${flyfox.isNew(childsItem.update_time,7)?'q-newicon':''} ${childsItem.id==folders_selected!''?'active':''} "><a href="${strutil.startWith(childsItem.jump_url,'http')?'':BASE_PATH}${childsItem.jump_url}" target="_blank">${childsItem.name}</a></li>
<% } else if(childsItem.type==4){ %>
${childsItem.jump_url}
<% } %>
<% } %>
</ul>
</li>
<%
}
}
}
%>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="container">
<!-- 固定导航 -->
<div class="row" style="height:60px;">
<div class="col-md-12">
</div>
</div>
</div>