%
function layoutDiv() {
var prev,next;
var title = __('meta.read_next');
var title_prev = __('meta.prev');
var title_next = __('meta.next');
if (page.layout === 'post') {
prev = page.prev;
next = page.next;
title_prev = __('meta.newer');
title_next = __('meta.older');
} else if (page.layout === 'wiki' && page.wiki && page.wiki.length > 0) {
let proj = theme.wiki.projects[page.wiki];
if (proj) {
proj.pages.forEach((p, i) => {
if (p.order < page.order) {
if (prev == undefined || p.order > prev.order) {
prev = p;
}
} else if (p.order > page.order) {
if (next == undefined || p.order < next.order) {
next = p;
}
}
});
}
if (next == undefined) {
// 项目的最后一篇文档
return '
';
}
}
let el = '';
if (prev || next) {
el += '