hexo-theme-stellar/layout/_partial/main/footer.ejs

36 lines
1.1 KiB
Plaintext
Executable File

<%
const content = theme.footer.content?.replace('${author.name}', (config.author || 'Anonymity'))?.replace('${theme.name}', stellar_info('name'))?.replace('${theme.version}', stellar_info('version'))?.replace('${theme.tree}', stellar_info('tree'))
function layoutDiv() {
var el = ''
el += `<footer class="page-footer${scrollreveal(' ')} fs12">`
el += '<hr>'
// sitemap
if (theme.footer.sitemap && Object.keys(theme.footer.sitemap).length > 0) {
el += '<div class="sitemap">'
for (let group of Object.keys(theme.footer.sitemap)) {
let items = theme.footer.sitemap[group]
if (items == undefined || items.length == 0) {
continue
}
el += '<div class="sitemap-group">'
el += '<span class="fs14">' + group + '</span>'
items.forEach((item, i) => {
el += '<a href="' + url_for(md_link(item)) + '">'
el += __(md_text(item))
el += '</a>'
});
el += '</div>'
}
el += '</div>'
}
// footer
el += '<div class="text">'
if (content) {
el += markdown(content)
}
el += '</div></footer>'
return el
}
%>
<%- layoutDiv() %>