[opt] update
This commit is contained in:
parent
fca4425122
commit
a78feec152
|
@ -49,7 +49,7 @@ article:
|
||||||
auto_excerpt: 200
|
auto_excerpt: 200
|
||||||
# 分类颜色
|
# 分类颜色
|
||||||
category_color:
|
category_color:
|
||||||
'新闻稿': '#DA0F47'
|
'探索号': '#f44336'
|
||||||
# 文章许可协议
|
# 文章许可协议
|
||||||
license: '本文采用[署名-非商业性使用-相同方式共享 4.0 国际](https://creativecommons.org/licenses/by-nc-sa/4.0/)许可协议,转载请注明出处。'
|
license: '本文采用[署名-非商业性使用-相同方式共享 4.0 国际](https://creativecommons.org/licenses/by-nc-sa/4.0/)许可协议,转载请注明出处。'
|
||||||
# 分享
|
# 分享
|
||||||
|
|
|
@ -74,16 +74,16 @@ function layoutWidgets() {
|
||||||
if (page.sidebar) {
|
if (page.sidebar) {
|
||||||
page.sidebar.forEach((w, i) => {
|
page.sidebar.forEach((w, i) => {
|
||||||
let name = ''
|
let name = ''
|
||||||
|
let widget = {}
|
||||||
if (typeof w == 'string') {
|
if (typeof w == 'string') {
|
||||||
name = w
|
name = w
|
||||||
} else if (typeof w == 'object' && w.layout && w.override) {
|
} else if (typeof w == 'object' && w.override) {
|
||||||
name = w.override
|
name = w.override
|
||||||
}
|
}
|
||||||
let widget = {}
|
|
||||||
if (name in theme.data.widgets) {
|
if (name in theme.data.widgets) {
|
||||||
Object.assign(widget, theme.data.widgets[name])
|
Object.assign(widget, theme.data.widgets[name])
|
||||||
}
|
}
|
||||||
if (typeof w == 'object' && w.layout) {
|
if (typeof w == 'object' && w.override) {
|
||||||
Object.assign(widget, w)
|
Object.assign(widget, w)
|
||||||
}
|
}
|
||||||
if (widget && widget.layout) {
|
if (widget && widget.layout) {
|
||||||
|
|
|
@ -24,7 +24,7 @@ function layoutDiv() {
|
||||||
|
|
||||||
el += '<div class="widget-wrap" id="github-user">';
|
el += '<div class="widget-wrap" id="github-user">';
|
||||||
// body
|
// body
|
||||||
el += '<div class="widget-body stellar-ghinfo-api" api="' + item.api + '/users/' + item.username + '">';
|
el += '<div class="widget-body stellar-ghinfo-api" api="' + theme.api_host.ghapi + '/users/' + item.username + '">';
|
||||||
if (item.avatar) {
|
if (item.avatar) {
|
||||||
el += '<div class="avatar" ><img no-lazy type="img" id="avatar_url" src="' + config.avatar + '"></div>';
|
el += '<div class="avatar" ><img no-lazy type="img" id="avatar_url" src="' + config.avatar + '"></div>';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue