hexo-theme-stellar/layout/_partial/sidebar/menu.ejs

20 lines
473 B
Plaintext

<%
function layoutDiv() {
var el = ''
el += `<nav class="menu dis-select${where == 'main' ? ' mobile-hidden' : ''}">`
for (let id of Object.keys(theme.menu)) {
let item = theme.menu[id]
if (item == undefined || item.length == 0) {
continue
}
el += `<a class="nav-item${id == page.menu_id ? ' active' : ''}" href="${url_for(md_link(item))}">`
el += __(md_text(item))
el += `</a>`
}
el += `</nav>`
return el
}
%>
<%- layoutDiv() %>