2021-02-21 03:13:21 +08:00
|
|
|
<%
|
2024-01-09 11:23:53 +08:00
|
|
|
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'))
|
2021-02-21 03:13:21 +08:00
|
|
|
function layoutDiv() {
|
2024-01-09 11:23:53 +08:00
|
|
|
var el = ''
|
2024-01-30 23:48:00 +08:00
|
|
|
el += `<footer class="page-footer${scrollreveal(' ')} footnote">`
|
2024-01-09 11:23:53 +08:00
|
|
|
el += '<hr>'
|
2021-06-26 16:08:16 +08:00
|
|
|
// sitemap
|
|
|
|
if (theme.footer.sitemap && Object.keys(theme.footer.sitemap).length > 0) {
|
2024-01-09 11:23:53 +08:00
|
|
|
el += '<div class="sitemap">'
|
2021-06-26 16:08:16 +08:00
|
|
|
for (let group of Object.keys(theme.footer.sitemap)) {
|
2024-01-09 11:23:53 +08:00
|
|
|
let items = theme.footer.sitemap[group]
|
2021-06-26 16:08:16 +08:00
|
|
|
if (items == undefined || items.length == 0) {
|
2024-01-09 11:23:53 +08:00
|
|
|
continue
|
2021-06-26 16:08:16 +08:00
|
|
|
}
|
2024-01-09 11:23:53 +08:00
|
|
|
el += '<div class="sitemap-group">'
|
2024-01-31 22:45:07 +08:00
|
|
|
el += '<span class="fs15">' + group + '</span>'
|
2021-06-26 16:08:16 +08:00
|
|
|
items.forEach((item, i) => {
|
2024-01-09 11:23:53 +08:00
|
|
|
el += '<a href="' + url_for(md_link(item)) + '">'
|
|
|
|
el += __(md_text(item))
|
|
|
|
el += '</a>'
|
2021-06-26 16:08:16 +08:00
|
|
|
});
|
2024-01-09 11:23:53 +08:00
|
|
|
el += '</div>'
|
2021-06-26 16:08:16 +08:00
|
|
|
}
|
2024-01-09 11:23:53 +08:00
|
|
|
el += '</div>'
|
2021-06-26 16:08:16 +08:00
|
|
|
}
|
|
|
|
// footer
|
2024-01-09 11:23:53 +08:00
|
|
|
el += '<div class="text">'
|
2022-09-14 17:47:08 +08:00
|
|
|
if (content) {
|
2024-01-09 11:23:53 +08:00
|
|
|
el += markdown(content)
|
2021-07-31 18:20:25 +08:00
|
|
|
}
|
2024-01-09 11:23:53 +08:00
|
|
|
el += '</div></footer>'
|
|
|
|
return el
|
2021-02-21 03:13:21 +08:00
|
|
|
}
|
|
|
|
%>
|
|
|
|
<%- layoutDiv() %>
|