%
function layoutDiv() {
const topicObject = theme.topic.tree[page.topic]
var el = ''
if (topicObject) { // 专栏文章
// 专栏列表页
const topicIndexPageURL = url_for(theme.site_tree.index_topic.base_dir)
el += ``
el += ``
// 专栏项目名
const topicHomePageURL = url_for(topicObject.homepage?.path);
if (topicHomePageURL != topicIndexPageURL) {
el += ``
el += `${topicObject.name || topicObject.title}`
}
} else { // 普通文章
// 文章列表页
el += ``
el += `${__("btn.blog")}`
// 分类列表页
if (page.categories?.length > 0) {
el += ``
el += list_categories(page.categories, {
class: "cap breadcrumb",
show_count: false,
separator: ' ',
style: "none"
})
}
}
const author = theme.authors ? (theme.authors[page.author] || theme.default_author) : null
if (author) {
el += ``
const link = `${author.name}`
el += `${link}`
}
return el
}
%>
<%- layoutDiv() %>