Skip to content

Commit

Permalink
Merge pull request #399 from everfu/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
everfu authored Oct 4, 2024
2 parents b929f1a + b35cfd1 commit c45c4c2
Show file tree
Hide file tree
Showing 21 changed files with 46 additions and 46 deletions.
15 changes: 6 additions & 9 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,6 @@ aside:
backcolor: "var(--efu-blue)" # Background color
# --------------------------- end ---------------------------

# --------------------------- start ---------------------------
# recent comments(⚠️ Comments need to be configured first.)
# 最新评论(⚠️ 需要先配置评论)
newest_comment:
enable: true
storage: .5 # 缓存时间 1: 1天 / .5 : 半天 / Cache time 1: 1 day .5 : half a day
limit: 5 # 评论数 / Number of comments
# --------------------------- end ---------------------------

# --------------------------- start ---------------------------
# article table of contents
# 文章目录
Expand Down Expand Up @@ -727,6 +718,12 @@ comment:
enable: false
# Number of hot comments
count: 3
# recent comments(⚠️ Comments need to be configured first.)
# 最新评论(⚠️ 需要先配置评论)
newest_comment:
enable: true
storage: .5 # 缓存时间 1: 1天 / .5 : 半天 / Cache time 1: 1 day .5 : half a day
limit: 5 # 评论数 / Number of comments
# Twikoo: https://solitude.js.org/comment/twikoo
twikoo: # https://twikoo.js.org/
envId: # url: https://twikoo.sondy.top/
Expand Down
2 changes: 1 addition & 1 deletion languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ aside:
back: 欢迎再次回来,
sticker: 心情贴纸
newpost: 最近发布
newcomment: 最新评论
newcomment: 最近评论
card:
posts: '累计文章数:'
tags: '标签总数:'
Expand Down
2 changes: 1 addition & 1 deletion languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ aside:
back: 歡迎再次回來,
sticker: 心情貼紙
newpost: 最近發佈
newcomment: 最新評論
newcomment: 最近評論
card:
posts: '累計文章數:'
tags: '標籤總數:'
Expand Down
6 changes: 3 additions & 3 deletions layout/includes/widgets/post/copyright.pug
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
.post-copyright
.post-copyright__author_group
a.post-copyright__author_img(href=url_for(copyright.author.url))
img.post-copyright__author_img_front(src=copyright.author.img || theme.site.icon)
.post-copyright__author_name= config.title
.post-copyright__author_desc= config.subtitle
img.post-copyright__author_img_front(src=page.avatar || copyright.author.img || theme.site.icon)
.post-copyright__author_name= page.author || config.title
.post-copyright__author_desc= page.desc || config.subtitle
.post-tools#post-tools
.post-tools-left
#quit-box(onclick="RemoveRewardMask()")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- var limit = theme.aside.newest_comment.limit ? theme.aside.newest_comment.limit : 5
- var limit = theme.comment.newest_comment.limit ? theme.comment.newest_comment.limit : 5
if theme.comment.use
case theme.comment.use[0]
when 'Twikoo'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-solitude",
"version": "2.1.1",
"version": "2.1.2",
"description": "A beautiful, powerful, and efficient Hexo theme developed by everfu.",
"main": "package.json",
"scripts": {
Expand Down
10 changes: 5 additions & 5 deletions source/css/_layout/article-container.styl
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,13 @@

&:before
margin 0
top 0.78em
width 0.42em
height 0.42em
border-radius 0.42em
top .9em
width .2em
height .2em
border-radius 50%
background 0 0
content ""
line-height .42em
line-height .2em
border 0.21em solid var(--efu-lighttext)
background var(--efu-lighttext)

Expand Down
6 changes: 3 additions & 3 deletions source/css/_layout/aside.styl
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
+maxWidth1200()
position: fixed
right: 3rem
bottom: 2rem
bottom: 10px
z-index: 100
max-width: 380px
max-height: calc(100% - 60px)
Expand Down Expand Up @@ -1040,7 +1040,7 @@ backcolor = convert(hexo-config('aside.flip.backcolor'))
.card-widget.card-adsense
padding 0

if hexo-config('aside.newest_comment.enable')
if hexo-config('comment.newest_comment.enable')
.card-recent-comment
.recent-comment-more
margin-left auto
Expand All @@ -1060,7 +1060,7 @@ if hexo-config('aside.newest_comment.enable')
position: relative

&:not(:last-child)
border-bottom 1px dashed rgba(255, 255, 255, .1)
border-bottom var(--style-border-dashed)

.thumbnail img
width: 60px
Expand Down
2 changes: 1 addition & 1 deletion source/css/_layout/rightside.styl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ if hexo-config('rightside.enable')
#rightside
position: fixed
right: -2.5rem
bottom: 2.5rem
bottom: 20px
z-index: 1000
opacity: 0
transition: all .5s
Expand Down
5 changes: 0 additions & 5 deletions source/css/_page/_home/home-top.styl
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,6 @@
flex-wrap wrap
height 120px

+maxWidth1200()
flex-direction row
left 2rem
height 60px

.banners-link-btn
display flex
flex-direction row
Expand Down
1 change: 0 additions & 1 deletion source/css/_page/equipment.styl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
line-height 1
margin-bottom 8px
white-space nowrap
overflow hidden
text-overflow ellipsis
width fit-content

Expand Down
1 change: 1 addition & 0 deletions source/css/_page/other.styl
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ div#banners
color var(--efu-white)
overflow hidden
margin-top 0
margin-bottom: 12px

.author-content-item
flex 4
Expand Down
4 changes: 2 additions & 2 deletions source/css/_page/recentcomment.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
div.console_recentcomments
display flex
flex-wrap wrap
gap 8px
gap 12px
min-height 100px
width 100%

Expand All @@ -15,7 +15,7 @@ div.console_recentcomments
cursor pointer
transition .3s
overflow hidden
gap 8px
gap .5rem
display flex
flex-direction column

Expand Down
5 changes: 4 additions & 1 deletion source/css/_post/commentBarrage.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
.comment-barrage
position fixed
bottom 0
right 20px
if hexo-config('rightside.enable')
right 2.5rem
else
right 20px
padding 0 0 20px 10px
display none
flex-direction column
Expand Down
3 changes: 2 additions & 1 deletion source/css/_post/copyright.styl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
text-align center
font-size 14px
color var(--efu-secondtext)
margin-top 4px
margin 4px 10px 0
line-height 1.5

.post-copyright__notice
font-size 12px
Expand Down
1 change: 1 addition & 0 deletions source/css/_post/meta.styl
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@
cursor pointer
transition .3s
border-radius 12px
padding: 8px

&:hover
opacity 1
Expand Down
2 changes: 1 addition & 1 deletion source/css/_tags/tabs.styl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
margin 16px 0 0 auto
color #99a9bf

margin 1rem 0 !important
margin 1rem 0
border-radius 12px
overflow hidden
box-shadow var(--efu-shadow-border)
Expand Down
19 changes: 11 additions & 8 deletions source/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ const sco = {
}
},
musicToggle() {
const $music = document.querySelector('#nav-music');
const $meting = document.querySelector('meting-js');
const $console = document.getElementById('consoleMusic');
const $rm_text = document.querySelector('#menu-music-toggle span');
const $rm_icon = document.querySelector('#menu-music-toggle i');
const $music = document.querySelector('#nav-music') || null;
const $meting = document.querySelector('meting-js') || null;
const $console = document.getElementById('consoleMusic') || null;
const $rm_text = document.querySelector('#menu-music-toggle span') || null;
const $rm_icon = document.querySelector('#menu-music-toggle i') || null;
this.musicPlaying = !this.musicPlaying;
$music.classList.toggle("playing", this.musicPlaying);
$console.classList.toggle("on", this.musicPlaying);
$console && $console.classList.toggle("on", this.musicPlaying);
if (this.musicPlaying) {
$meting.aplayer.play();
(typeof rm !== 'undefined') && rm?.menuItems.music[0] && ($rm_text.textContent = GLOBAL_CONFIG.right_menu.music.stop) && ($rm_icon.className = 'solitude fas fa-pause')
Expand All @@ -169,10 +169,11 @@ const sco = {
},
switchCommentBarrage() {
let commentBarrageElement = document.querySelector(".comment-barrage");
let consoleCommentBarrage = document.querySelector("#consoleCommentBarrage");
if (!commentBarrageElement) return;
const isDisplayed = window.getComputedStyle(commentBarrageElement).display === "flex";
commentBarrageElement.style.display = isDisplayed ? "none" : "flex";
document.querySelector("#consoleCommentBarrage").classList.toggle("on", !isDisplayed);
consoleCommentBarrage && consoleCommentBarrage.classList.toggle("on", !isDisplayed);
utils.saveToLocal.set("commentBarrageSwitch", !isDisplayed, .2);
rm?.menuItems.barrage && rm.barrage(isDisplayed)
},
Expand Down Expand Up @@ -226,7 +227,9 @@ const sco = {
entries.forEach(entry => {
if (entry.isIntersecting) {
setTimeout(() => {
waterfall(entry.target) || entry.target.classList.add('show');
waterfall(entry.target).then(() => {
entry.target.classList.add('show');
});
}, 300);
}
});
Expand Down
1 change: 1 addition & 0 deletions source/js/right_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ window.oncontextmenu = (ele) => {
Array.from(display ? rm.menuItems.other : rm.menuItems.plugin).forEach(
(item) => (item.style.display = "none")
);

Array.from(display ? rm.menuItems.plugin : rm.menuItems.other).forEach(
(item) => (item.style.display = "block")
);
Expand Down
2 changes: 1 addition & 1 deletion source/js/third_party/waterfall.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion source/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
}
},
snackbarShow: (text, showAction = false, duration = 5000) => {
document.styleSheets[0].addRule(':root', `--efu-snackbar-time:${duration}ms!important`);
Snackbar.show({
text,
showAction,
Expand Down

0 comments on commit c45c4c2

Please sign in to comment.