35 lines
920 B
Plaintext
35 lines
920 B
Plaintext
<%
|
|
function layoutDiv() {
|
|
var el = '';
|
|
el += '<div class="nav-wrap mobile-hidden">';
|
|
el += '<nav class="sub wiki cap">';
|
|
// 所有项目
|
|
el += '<a';
|
|
if (page.filter === false) {
|
|
el += ' class="active"';
|
|
}
|
|
el += ' href="' + url_for(config.wiki_dir || "/wiki/") + '">' + __("btn.all_wiki") + '</a>';
|
|
el += '</a>';
|
|
// 项目分类
|
|
for (let group_name of Object.keys(theme.wiki.groups)) {
|
|
let group = theme.wiki.groups[group_name];
|
|
let projects = group.projects.filter(function(proj){
|
|
return proj.index !== false;
|
|
})
|
|
if (projects && projects.length > 0) {
|
|
el += '<a';
|
|
if (group.title && group.title.length > 0 && page.group === group.title) {
|
|
el += ' class="active"';
|
|
}
|
|
el += ' href="' + url_for(group.path) + '">' + group.title + '</a>';
|
|
el += '</a>';
|
|
}
|
|
}
|
|
el += '</nav>';
|
|
el += '</div>';
|
|
return el;
|
|
}
|
|
%>
|
|
|
|
<%- layoutDiv() %>
|