28 lines
697 B
Plaintext
28 lines
697 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' : ''}" title="${item.title}" href="${url_for(item.url)}">`
|
|
if (item.icon?.length > 0) {
|
|
if (item.icon.startsWith('<img')) {
|
|
el += item.icon
|
|
} else {
|
|
el += `<img no-lazy src="${item.icon}">`
|
|
}
|
|
} else {
|
|
el += `<span>${__(item.title)}</span>`
|
|
}
|
|
el += `</a>`
|
|
}
|
|
el += `</nav>`
|
|
return el
|
|
}
|
|
%>
|
|
|
|
<%- layoutDiv() %>
|