2021-02-21 03:13:21 +08:00
|
|
|
<%
|
|
|
|
function layoutMainMenu() {
|
|
|
|
var el = '';
|
|
|
|
el += '<nav class="menu">'
|
|
|
|
for (let id of Object.keys(theme.sidebar.menu)) {
|
|
|
|
let item = theme.sidebar.menu[id];
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
%>
|
2021-02-19 23:33:19 +08:00
|
|
|
<header class='header'>
|
|
|
|
<%- partial('logo') %>
|
2021-02-21 03:13:21 +08:00
|
|
|
<%- layoutMainMenu() %>
|
|
|
|
</header>
|