`
@@ -34,18 +94,18 @@ function layoutBottom() {
}
function layoutDiv() {
- const top = partial('article_top_area')
const bottom = layoutBottom()
- if (top.trim().length == 0 && bottom.length == 0) {
+ if (page.breadcrumb === false && bottom.length == 0) {
return ``
}
+ const top = layoutBreadcrumb()
var style = ``
var el = ``
el += `
`
- if (banner_url?.length > 0) {
- el += ``
- if (page.poster?.color) {
- style += ' style="--text-banner:' + page.poster?.color + '"'
+ if (banner.url?.length > 0) {
+ el += ``
+ if (banner.color) {
+ style += ' style="--text-banner:' + banner.color + '"'
}
}
el += `
diff --git a/layout/_partial/main/navbar/article_top_area.ejs b/layout/_partial/main/navbar/article_top_area.ejs
deleted file mode 100644
index 4f6e830..0000000
--- a/layout/_partial/main/navbar/article_top_area.ejs
+++ /dev/null
@@ -1,33 +0,0 @@
-<%
-function layoutDiv() {
- if (page.breadcrumb === false) {
- return ''
- }
- var el = ''
- // 1.main
- el += `
`
- // 2.left
- el += `
`
- // 3.left.top: 面包屑导航
- el += `
`
- // 首页
- el += `${__("btn.home")}`
- if (theme.wiki.tree[page.wiki]) {
- el += partial('breadcrumb/wiki')
- } else if (page.layout == 'post') {
- el += partial('breadcrumb/blog')
- } else {
- el += partial('breadcrumb/page')
- }
- // end 3.left.top
- el += `
`
- // 3.left.bottom
- el += partial('dateinfo')
- // end 2.left
- el += `
`
- // end 1.main
- el += `
`
- return el
-}
-%>
-<%- layoutDiv() %>
diff --git a/layout/_partial/main/navbar/author_banner.ejs b/layout/_partial/main/navbar/author_banner.ejs
deleted file mode 100644
index 9709282..0000000
--- a/layout/_partial/main/navbar/author_banner.ejs
+++ /dev/null
@@ -1,29 +0,0 @@
-<%
-function layoutDiv() {
- const author = page.author
- var el = ``
- el += `
`
- if (author.banner) {
- el += ``
- }
- el += `
-
-
-
-
-
-
-
-
${author.name}
-
${author.description || ""}
-
-
-
- `
- el += `
`
- return el
-}
-%>
-<%- layoutDiv() %>
\ No newline at end of file
diff --git a/layout/_partial/sidebar/logo.ejs b/layout/_partial/sidebar/logo.ejs
index 485f029..f32fccd 100644
--- a/layout/_partial/sidebar/logo.ejs
+++ b/layout/_partial/sidebar/logo.ejs
@@ -67,7 +67,7 @@ function layoutDiv() {
const main = md_text(logo.title)
if (main) {
let url = md_link(logo.title)
- el += layoutTitle(main, url, logo.subtitle)
+ el += layoutTitle(main, url, md_text(logo.subtitle))
}
el += `
`
el += ''
diff --git a/layout/archive.ejs b/layout/archive.ejs
index a4120bf..39858ba 100755
--- a/layout/archive.ejs
+++ b/layout/archive.ejs
@@ -8,14 +8,21 @@ if (page.author) {
}
function layoutArchiveList() {
var el = ''
+ var cls = ''
if (page.author) {
page.title = page.author.name
- el += partial('_partial/main/navbar/author_banner')
+ page.banner = page.author.banner
+ page.banner_info = {
+ avatar: page.author.avatar,
+ subtitle: page.author.description
+ }
+ el += partial('_partial/main/navbar/article_banner')
+ cls += ' author'
} else {
page.title = __('btn.archives')
el += partial('_partial/main/navbar/nav_tabs_blog')
}
- el += `