Skip to content

Commit

Permalink
Merge pull request #136 from wleelw/dev
Browse files Browse the repository at this point in the history
release: v1.4.7
  • Loading branch information
王卓Sco authored Feb 8, 2024
2 parents 8f64944 + 7caf302 commit 6789fa7
Show file tree
Hide file tree
Showing 37 changed files with 898 additions and 1,751 deletions.
426 changes: 211 additions & 215 deletions _config.yml

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions languages/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ search:

head:
noscript: Please enable JavaScript to view the site
console: 'Program: Hexo | Theme: Hexo-Theme-Solitude | Author: WangZhuoSco、YiFeng | Github: https://github.com/wleelw/Hexo-theme-solitude | Version: v1.4.6 😄'
console: 'Program: Hexo | Theme: Hexo-Theme-Solitude | Author: WangZhuoSco、YiFeng | Github: https://github.com/wleelw/Hexo-theme-solitude | Version: v1.4.7 😄'

aside:
postcount: 'Posts :'
Expand Down Expand Up @@ -144,4 +144,7 @@ rightmenu:
dark: Dark
light: Light
chs_to_cht: Traditional
cht_to_chs: Simplified
cht_to_chs: Simplified

404:
button: Back to home
7 changes: 5 additions & 2 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ search:

head:
noscript: 开启JavaScript才能访问本站哦~
console: '程序:Hexo | 主题:Hexo-Theme-Solitude | 作者:王卓Sco、亦封 | Github: https://github.com/wleelw/Hexo-theme-solitude | 版本:v1.4.6 😄'
console: '程序:Hexo | 主题:Hexo-Theme-Solitude | 作者:王卓Sco、亦封 | Github: https://github.com/wleelw/Hexo-theme-solitude | 版本:v1.4.7 😄'

aside:
postcount: '文章总数 :'
Expand Down Expand Up @@ -144,4 +144,7 @@ rightmenu:
dark: 深色模式
light: 浅色模式
chs_to_cht: 轉為繁體
cht_to_chs: 转为简体
cht_to_chs: 转为简体

404:
button: 返回首页
7 changes: 5 additions & 2 deletions languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ search:

head:
noscript: 開啟JavaScript才能訪問本站哦~
console: '程式:Hexo |主題:Hexo-Theme-Solitude |作者:王卓Sco、亦封 |Github位址: https://github.com/wleelw/Hexo-theme-solitude |版本:v1.4.6 😄'
console: '程式:Hexo |主題:Hexo-Theme-Solitude |作者:王卓Sco、亦封 |Github位址: https://github.com/wleelw/Hexo-theme-solitude |版本:v1.4.7 😄'

aside:
postcount: '文章數:'
Expand Down Expand Up @@ -144,4 +144,7 @@ rightmenu:
dark: 深色模式
light: 淺色模式
chs_to_cht: 轉為繁體
cht_to_chs: 转为简体
cht_to_chs: 转为简体

404:
button: 返回首頁
4 changes: 2 additions & 2 deletions layout/404.pug
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ extends includes/layout.pug
block content
#error-wrap
.error-content
.error-img(style='background-image: url(' + url_for(theme.errorpage.img) + ')')
.error-img(style=`background-image: url(${url_for(theme.errorpage.img)})`)
.error-info
h1.error_title 404
.error_subtitle= theme.errorpage.text
a.button--animated(href="/")
i.scoicon.sco-external-link
| 回到主页
=_p('404.button')

if theme.errorpage.recommendList
.aside-list
Expand Down
14 changes: 7 additions & 7 deletions layout/includes/head/config.pug
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
localSearch = JSON.stringify({
preload: theme.search.local.preload,
path: theme?.search?.local?.CDN || '/search.xml'
})
});
break;
case 'algolia':
algolia = JSON.stringify({
Expand All @@ -17,7 +17,7 @@
hits: {
per_page: theme?.search?.algolia?.hits?.per_page || 10
}
})
});
break;
}
}
Expand All @@ -27,12 +27,12 @@
translate = JSON.stringify({
defaultEncoding: theme.translate.defaultEncoding,
translateDelay: theme.translate.translateDelay,
})
});
}
const commentInfoStart = theme.comment.randomInfoStart.map(item => `"${item}"`) || ""
const commentInfoEnd = theme.comment.randomInfoEnd.map(item => `"${item}"`) || ""
var sayhello2 = theme.aside.card.sayhello2.map(item => `"${item}"`) || []
const commentInfoStart = theme.comment.randomInfoStart.map(item => `"${item}"`) || [];
const commentInfoEnd = theme.comment.randomInfoEnd.map(item => `"${item}"`) || [];
const sayhello2 = theme.aside.card.sayhello2.map(item => `"${item}"`) || [];
script.
const GLOBAL_CONFIG = {
Expand Down Expand Up @@ -119,4 +119,4 @@ script.
enable: !{theme.music.enable},
},
translate: !{translate},
}
};
9 changes: 5 additions & 4 deletions layout/includes/head/opengraph.pug
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
if theme.opengraph.enable
-
const coverVal = page.cover || theme.site.siteIcon
let ogOption = Object.assign({
type: is_post() ? 'article' : 'website',
image: coverVal ? full_url_for(coverVal) : '',
}, theme.opengraph.options)
let ogOption = {
type: is_post() ? 'article' : 'website',
image: coverVal ? full_url_for(coverVal) : '',
...theme.opengraph.options
}
-
!= open_graph(ogOption)
else
Expand Down
5 changes: 2 additions & 3 deletions layout/includes/head/pwa.pug
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
if theme.pwa.enable
meta(name="theme-color", content=theme.pwa.theme_color)
link(rel="manifest" href=url_for(theme.pwa.manifest))
if(theme.pwa.theme_color)
if theme.pwa.theme_color
meta(name="msapplication-TileColor" content=theme.pwa.theme_color)
if theme.pwa.mask_icon
link(rel="mask-icon", href=theme.pwa.mask_icon, color=theme.pwa.theme_color)
if(theme.pwa.apple_touch_icon)
if theme.pwa.apple_touch_icon
link(rel="apple-touch-icon" sizes="180x180" href=url_for(theme.pwa.apple_touch_icon))
if theme.pwa.favicon_16_16
link(rel="icon", type="image/png", sizes="16x16", href=theme.pwa.favicon_16_16)
if theme.pwa.favicon_32_32
link(rel="icon", type="image/png", sizes="32x32", href=theme.pwa.favicon_32_32)
if theme.pwa.bookmark_icon
link(rel="bookmark", href=theme.pwa.bookmark_icon)

else
meta(name="apple-mobile-web-app-capable", content=config.title)
link(rel="bookmark", href=theme.site.siteIcon)
Expand Down
34 changes: 17 additions & 17 deletions layout/includes/inject/body.pug
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
- page.type = is_post() ? 'post' : page.type

mixin katex
if theme.katex.copytex
script(src=url_for(theme.cdn.katex_copytex))
script.
(() => {
document.querySelectorAll('#article-container span.katex-display').forEach(item => {
utils.wrap(item, 'div', {class: 'katex-wrap'})
})
})();

div
script(src=url_for(theme.cdn.main))
script(src=url_for(theme.cdn.utils))
Expand All @@ -19,24 +29,11 @@ div
if theme.translate.enable
script(src=url_for(theme.cdn.translate))

mixin katex
link(rel="stylesheet", href=url_for(theme.cdn.katex))
if theme.katex.copytex
script(src=url_for(theme.cdn.katex_copytex))
script.
(() => {
document.querySelectorAll('#article-container span.katex-display').forEach(item => {
utils.wrap(item, 'div', {class: 'katex-wrap'})
})
})()

if theme.katex && theme.katex.enable
if theme.katex.per_page
if is_post() || is_page()
+katex
else
if page.katex
+katex
if theme.katex.per_page && (is_post() || is_page())
+katex
else if page.katex
+katex

script(src=url_for(theme.cdn.pjax))
if theme.lazyload.enable
Expand Down Expand Up @@ -111,6 +108,9 @@ div#js-pjax
if page.type === 'album' && theme.album.enable
script.
initGallery()
if is_home() && theme.says.home_mini
script.
sco.initbbtalk();
if page.type === 'says' && theme.says.enable
script.
window.addEventListener('resize', utils.throttle(function () {
Expand Down
5 changes: 3 additions & 2 deletions layout/includes/inject/head.pug
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ if theme.says.home_mini
if theme.lightbox && theme.fancybox
link(rel="stylesheet", href=url_for(theme.cdn.fancyapps_css))

if theme.katex && theme.katex.enable
link(rel="stylesheet", href=url_for(theme.cdn.katex))

// Open Graph
include ../head/opengraph.pug

Expand Down Expand Up @@ -78,8 +81,6 @@ script.
"%c🔥 !{_p('head.console')}",
"color: #fff; background: linear-gradient(-25deg, #a8edea, #fed6e3); padding: 8px 15px; border-radius: 8px; text-shadow: 2px 2px 4px white; color: black;"
);

// custom inject
if theme.extends.head
each item in theme.extends.head
!= item
2 changes: 1 addition & 1 deletion layout/includes/mixins/pagination.pug
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ nav#pagination
- var options = {mid_size: 1,escape: false,next_text: '<div class="pagination_tips_next">下页</div> <i class="scoicon sco-arrow-right-bold"></i>',prev_text: '<i class="scoicon sco-arrow-left-bold"></i> <div class="pagination_tips_prev">上页</div>'}
!=paginator(options)
div.toPageGroup
input#toPageText(oninput="value=value.replace(/[^0-9]/g,'')", maxlength="3", title="跳转到指定页面", onkeyup="if (this.value === '0') this.value = ''")
input#toPageText(oninput="value=value.replace(/[^0-9]/g,'')" maxlength="3" title="跳转到指定页面" onkeyup="if (this.value === '0') this.value = ''")
a#toPageButton(onclick="sco.toPage()")
i.scoicon.sco-show-right-line
20 changes: 0 additions & 20 deletions layout/includes/page/rss.pug

This file was deleted.

51 changes: 44 additions & 7 deletions layout/includes/page/says.pug
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,50 @@ if theme.says.enable
#bber
section.timeline.page-1
ul.list#waterfall
case theme.says.mode
when 'local'
include ../widgets/page/says/local
when 'json'
include ../widgets/page/says/json
when 'memos'
include ../widgets/page/says/memos
each item in site.data.essay.essay_list.slice(0, theme.says.strip)
li.item
if theme.says.style === 2
.meta
img.avatar(src=theme.aside.card.author.img)
.info
span.bber_nick= config.author
time.datetime.bber_date(datetime=moment(item.date).format())
if item.content
a.bber-reply.goComment(onclick=`sco.toTalk('${item.content}')`)
i.scoicon.sco-chat-fill

#bber-content
p.datacont= item.content
if item.image
.bber-content-img
each img in item.image
img(src=img title="即刻短文配图")

if item.aplayer
.bber-music
meting-js(server=item.aplayer.server type="song" id=item.aplayer.id mutex="true" preload="none" theme="var(--sco-main)" data-lrctype="0")

if item.video
.bber-video
if item.video.player
video(src=item.video.player controls="controls" style="object-fit: cover;")
if item.video.bilibili
iframe(src='//player.bilibili.com/player.html?auto-play=0&bvid=' + item.video.bilibili scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true")

if theme.says.style === 1
hr
.bber-bottom
.bber-info
.bber-info-time
i.scoicon.sco-calendar-todo-fill
time.datetime(datetime=moment(item.date).format())
if item.link
a.bber-content-link(href=url_for(item.link) title="跳转到短文指引的链接" target="_blank")
i.scoicon.sco-link-m-line
| 链接
if item.content
a.bber-reply(onclick=`sco.toTalk('${item.content}')`)
i.scoicon.sco-chat-fill
#bber-tips
if theme.says.strip === -1
| - 已展开所有短文 -
Expand Down
25 changes: 0 additions & 25 deletions layout/includes/widgets/home/bb/json.pug

This file was deleted.

20 changes: 0 additions & 20 deletions layout/includes/widgets/home/bb/local.pug

This file was deleted.

28 changes: 0 additions & 28 deletions layout/includes/widgets/home/bb/memos.pug

This file was deleted.

Loading

0 comments on commit 6789fa7

Please sign in to comment.