27 lines
694 B
Plaintext
27 lines
694 B
Plaintext
<%
|
|
function layoutDiv() {
|
|
var el = ''
|
|
el += `<nav class="menu dis-select${where == 'main' ? ' mobile-hidden' : ''}">`
|
|
for (let item of (theme.menubar.items || [])) {
|
|
if (item == undefined || item.id == null || item.url == null) {
|
|
continue
|
|
}
|
|
el += `<a class="nav-item${item.id == page.menu_id ? ' active' : ''}" title="${item.title}" href="${url_for(item.url)}"`
|
|
if (item.theme?.length > 0) {
|
|
el += ` style="color:${item.theme}"`
|
|
}
|
|
el += `>`
|
|
if (item.icon?.length > 0) {
|
|
el += icon(item.icon, 'no-lazy')
|
|
} else {
|
|
el += `<span>${__(item.title)}</span>`
|
|
}
|
|
el += `</a>`
|
|
}
|
|
el += `</nav>`
|
|
return el
|
|
}
|
|
%>
|
|
|
|
<%- layoutDiv() %>
|