26 lines
577 B
Plaintext
26 lines
577 B
Plaintext
<%
|
|
function layoutMainMenu() {
|
|
var el = '';
|
|
el += '<nav class="menu">'
|
|
for (let id of Object.keys(theme.sidebar.menu)) {
|
|
let item = theme.sidebar.menu[id];
|
|
if (item.url == undefined || item.url.length == 0) {
|
|
continue;
|
|
}
|
|
el += '<a class="nav-item';
|
|
if (id == page.menu_id) {
|
|
el += ' active';
|
|
}
|
|
el += '" href="' + url_for(item.url) + '">';
|
|
el += '<span>' + __(item.title) + '</span>';
|
|
el += '</a>';
|
|
}
|
|
el += '</nav>';
|
|
return el;
|
|
}
|
|
%>
|
|
<header class='header'>
|
|
<%- partial('logo') %>
|
|
<%- layoutMainMenu() %>
|
|
</header>
|