Skip to content

Commit

Permalink
Merge pull request #384 from everfu/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
everfu authored Sep 11, 2024
2 parents 8a1a95e + 0639960 commit 4686490
Show file tree
Hide file tree
Showing 43 changed files with 129 additions and 135 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ English丨[简体中文](README_zh-Hans.md)丨[繁体中文](README_zh-Hant.md)
## Todo

- [x] The list of articles is displayed in three columns on the homepage.
- [x] btns tags plugin.

> If you have any questions, please issue an [issue](https://github.com/everfu/hexo-theme-solitude/issues)
Expand Down
2 changes: 0 additions & 2 deletions README_zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
## Todo

- [x] 首页顶部新样式
- [x] 首页文章列表三列显示
- [x] btns 外挂标签

> 如有问题请提 [issue](https://github.com/everfu/hexo-theme-solitude/issues)
Expand Down
1 change: 0 additions & 1 deletion README_zh-Hant.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
## Todo

- [x] 首页文章列表三列显示
- [x] btns 外挂标签

## 應用

Expand Down
5 changes: 4 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ envelope:
# can only use NetEase Cloud Music, QQ Music and other music platforms supported by the mainland China region,
# the subsequent consideration of the use of JSON files to store music information and customize the implementation of the third-party API does not depend on the page.
# Music Page
meting_api: "https://meting.qjqq.cn/?server=:server&type=:type&id=:id&auth=:auth&r=:r" # Custom API
meting_api: "https://meting.everfu.cn/?server=:server&type=:type&id=:id&auth=:auth&r=:r" # Custom API
music:
enable: false
# 歌单 ID / 单曲 ID
Expand Down Expand Up @@ -882,6 +882,9 @@ right_menu:
# Whether to display the hot comment switch.
# 是否显示热门评论开关
commentBarrage: false
# Whether to display the browser's context menu when hold Ctrl key.
# 是否在按住 Ctrl 键时显示浏览器右键菜单
ctrlOriginalMenu: false
# Simplified and Traditional Chinese translation.
# 简繁体转换
translate:
Expand Down
2 changes: 2 additions & 0 deletions languages/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ console:
sidebar:
function: Function
darkmode: Display mode
siteinfo: Site information

footer:
description: Article from ${title}
Expand Down Expand Up @@ -195,6 +196,7 @@ right_menu:
chs_to_cht: 轉為繁體
cht_to_chs: 转为简体
img_error: This image cannot be copied or downloaded.
ctrl_original_menu: Hold Ctrl + right-click to open the browser's context menu
barrage:
open: Open Barrage
close: Close Barrage
Expand Down
2 changes: 2 additions & 0 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ console:
sidebar:
function: Function
darkmode: Display mode
siteinfo: Site information

footer:
description: Article from ${title}
Expand Down Expand Up @@ -195,6 +196,7 @@ right_menu:
chs_to_cht: 轉為繁體
cht_to_chs: 转为简体
img_error: This image cannot be copied or downloaded.
ctrl_original_menu: Hold Ctrl + right-click to open the browser's context menu
barrage:
open: Open Barrage
close: Close Barrage
Expand Down
2 changes: 2 additions & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ console:
sidebar:
function: 功能
darkmode: 显示模式
siteinfo: 网站信息

footer:
description: 来自${title}的文章
Expand Down Expand Up @@ -195,6 +196,7 @@ right_menu:
chs_to_cht: 轉為繁體
cht_to_chs: 转为简体
img_error: 此图片无法复制与下载
ctrl_original_menu: 按住Ctrl+右键可打开浏览器右键菜单
barrage:
open: 显示热评
close: 关闭热评
Expand Down
46 changes: 24 additions & 22 deletions languages/zh-TW.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
more: 更多
star: 喜歡這篇的人也看了
random: 随便逛逛
random: 隨便逛逛
upload: 發佈時間:
totalk: 無需刪除空行,直接輸入評論即可
loading: 加載中...
Expand All @@ -18,9 +18,9 @@ copy:

copy_copyright:
author: 作者
link: 連結
link: 鏈結
source: 來源
info: 著作權歸作者所有。 商業轉載請聯繫作者獲得授權,非商業轉載請註明出處。
info: 著作權歸作者所有。商業轉載請聯繫作者獲得授權,非商業轉載請註明出處。

time:
day: "天前"
Expand All @@ -41,16 +41,16 @@ nav:
site_name_title: 返回博客主頁
backtop: 返回頂部
travellings: 開往-友鏈接力
search: 搜索
search: 搜尋
randompost: 隨機一篇文章
console: 中控台
console: 主控台

home:
home: 推薦
sticky: 置頂
new: 最新
read: 未讀
recommend:
recommend:
recommendmore: 更多推薦
archives: 全部文章

Expand All @@ -66,18 +66,18 @@ post:
pv: 文章熱度
comment: 評論數
copyright:
reprint: 本文是转载或翻译文章,版权归原作者所有。转载本文请联系原作者
original: 本文是原创文章,采用
original_end: 协议,完整转载请注明来自
reprint: 本文是轉載或翻譯文章,版權歸原作者所有。轉載本文請聯繫原作者
original: 本文是原創文章,採用
original_end: 協議,完整轉載請註明來自
share:
qq: 分享到QQ
weibo: 分享到微博
telegram: 分享到Telegram
twitter: 分享到Twitter
linkedin: 分享到LinkedIn
facebook: 分享到Facebook
link: 复制文章链接
qrcode: 使用手机扫码阅读这篇文章
link: 複製文章鏈接
qrcode: 使用手機掃碼閱讀這篇文章
whatsapp: 分享到WhatsApp
ai:
title: 文章摘要
Expand Down Expand Up @@ -109,12 +109,12 @@ aside:
wordcount: '字數統計:'
toc: 文章目錄
tagmore: 查看全部
avatar: 头像
avatar: 頭像
hello: 好久不見,
back: 歡迎再次回來,
sticker: 心情贴纸
newpost: 最近发布
newcomment: 最新评论
sticker: 心情貼紙
newpost: 最近發佈
newcomment: 最新評論
card:
posts: '累計文章數:'
tags: '標籤總數:'
Expand All @@ -124,22 +124,23 @@ console:
comment_tip: 互動
comment_title: 評論
tag_tip: 標籤
tag_title: 標籤
switch_darkmode: 昼夜切換
switch_hideAside: 边栏显示控制
tag_title: 尋找感興趣的領域
switch_darkmode: 晝夜切換
switch_hideAside: 側邊欄顯示控制
switch_keyboard: 鍵盤快捷鍵
switch_music: 音樂開關
archive_unit:
recent_comment_more: 最近評論
newest_comment:
image: 圖片
link: 連結
link: 鏈結
code: 代碼
emoji: 表情

sidebar:
function: 功能
darkmode: 顯示模式
siteinfo: 網站信息

footer:
description: 來自${title}的文章
Expand Down Expand Up @@ -181,10 +182,10 @@ f12: 開發者模式已打開,請遵循GPL協定。

right_menu:
copy: 複製選中文本
paste: 粘貼文本
paste: 貼上文本
comment: 引用到評論
new: 新窗口打開
link: 複製連結位址
link: 複製鏈結位址
img: 複製此圖片
downloadImg: 下載此圖片
search: 站內搜索
Expand All @@ -193,6 +194,7 @@ right_menu:
chs_to_cht: 轉為繁體
cht_to_chs: 转为简体
img_error: 此圖片無法複製與下載
ctrl_original_menu: 按住Ctrl+右鍵可打開瀏覽器右鍵選單
barrage:
open: 顯示熱評
close: 關閉熱評
Expand Down Expand Up @@ -229,4 +231,4 @@ message:
essay:
tip0: '- 已展開所有短文 -'
tip1: '- 只展示最近 #{count} 條短文 -'
link: '連接'
link: '鏈結'
2 changes: 2 additions & 0 deletions layout/includes/head/config.pug
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@
defaultEncoding: theme.right_menu.translate.defaultEncoding
}
}
if (theme.right_menu.ctrlOriginalMenu)
rightMenu.ctrlOriginalMenu = _p('right_menu.ctrl_original_menu')
}
let highlight = false
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions layout/includes/inject/body.pug
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,5 @@ if theme.footer.randomlink
// pjax
!= partial("includes/widgets/third-party/pjax", {}, {cache: true})

// theme
include ../body/mode

// google adsense
include ../body/gadsense
6 changes: 6 additions & 0 deletions layout/includes/inject/head.pug
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,9 @@ if theme.extends.head
!= item

!=fragment_cache('injectHeadJs', function(){return inject_head_js()})

// theme
include ../head/mode

if theme.page.echart
script(src=url_for(theme.cdn.echarts))
2 changes: 1 addition & 1 deletion layout/includes/page/says.pug
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if theme.says.enable
.bber-bottom
.bber-info
.bber-info-time
i.solitude.fa-solid.fa-calendar-days
i.solitude.fa-solid.fa-calendar-day
time.datetime(datetime=moment(item.date).format())
if item.location
.bber-info-location
Expand Down
2 changes: 1 addition & 1 deletion layout/includes/rightmenu.pug
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ div#rightMenu
div.rightMenu-item#menu-forward
i.solitude.fa-solid.fa-arrow-right
div.rightMenu-item#menu-refresh
i.solitude.fa-solid.fa-arrow-rotate-right
i.solitude.fa-solid.fa-arrows-rotate
div.rightMenu-item#menu-top
i.solitude.fa-solid.fa-arrow-up
div.rightMenu-group.rightMenu-line.rightMenuPlugin
Expand Down
11 changes: 10 additions & 1 deletion layout/includes/sidebar.pug
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,13 @@ div#sidebar(style="zoom: 1;")
div.card-tag-cloud
each tag in site.tags.find({ parent: { $exists: false } }).data
a(href=url_for(tag.path))= tag.name
sup= tag.length
sup= tag.length
if theme.wordcount && theme.aside.siteinfo.wordcount
span.sidebar-menu-item-title= __('sidebar.siteinfo')
.webinfo
.webinfo-item
.webinfo-item-title
i.item-icon.solitude.fa-solid.fa-file-word
.item-name= __('aside.wordcount')
.item-count= totalcount(site)

19 changes: 8 additions & 11 deletions layout/includes/widgets/aside/asideNewestPost.pug
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
i.solitude.fa-solid.fa-map
span= _p('aside.newpost')
.aside-list
- let index = 1
each post in site.posts.data.sort((a, b) => b.date < a.date ? -1 : 1)
if index <= 5
.aside-list-item
a.thumbnail(href=url_for(post.path) title=post.title)
img(alt=post.title src=url_for(post.cover))
.content
span.title(href=url_for(post.path) title=post.title)= post.title
if post.categories.data[0]
span.article-recent_post_categories(href=url_for(post.path))= post.categories.data[0].name
- index++
each post in site.posts.data.sort((a, b) => b.date < a.date ? -1 : 1).slice(0, 5)
a.aside-list-item(href=url_for(post.path) title=post.title)
.thumbnail
img(alt=post.title src=url_for(post.cover))
.content
span.title(href=url_for(post.path) title=post.title)= post.title
if post.categories.data[0]
span.article-recent_post_categories(href=url_for(post.path))= post.categories.data[0].name
4 changes: 2 additions & 2 deletions layout/includes/widgets/aside/asideWebInfo.pug
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
if theme.aside.siteinfo.runtimeenable
.webinfo-item
.webinfo-item-title
i.item-icon.solitude.fa-solid.fa-calendar-days
i.item-icon.solitude.fa-solid.fa-calendar-day
.item-name= __('aside.runtime')
.item-count#runtimeshow
if theme.aside.siteinfo.updatetime
.webinfo-item
.webinfo-item-title
i.item-icon.solitude.fa-solid.fa-rotate-left
i.item-icon.solitude.fa-solid.fa-arrows-rotate
.item-name= __('aside.updatetime')
time.item-count(datetime=new Date())
if theme.wordcount && theme.aside.siteinfo.wordcount
Expand Down
1 change: 0 additions & 1 deletion layout/includes/widgets/page/links/banner.pug
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
.tags-group-wrapper
- const data = site.data.links.links
- for (let i = 0; i < 2; i++)
each item in [1,2]
each x in data
- var pairs = []
each y, index in x.link_list
Expand Down
4 changes: 2 additions & 2 deletions layout/includes/widgets/post/postInfo.pug
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
.meta-secondline
if theme.post.meta.date
span.post-meta-date(title=_p('post.posted') + ' ' + full_date(page.date))
i.post-meta-icon.solitude.fa-solid.fa-calendar-days
i.post-meta-icon.solitude.fa-solid.fa-clock
time(datetime=date_xml(page.date))= date_xml(page.date)
if theme.post.meta.updated
span.post-meta-date(title=_p('post.updated') + ' ' + full_date(page.updated))
i.post-meta-icon.solitude.fa-solid.fa-arrow-rotate-right
i.post-meta-icon.solitude.fa-solid.fa-arrows-rotate
time(datetime=date_xml(page.updated))= date_xml(page.updated)
if theme.wordcount
span.post-meta-wordcount
Expand Down
2 changes: 1 addition & 1 deletion layout/page.pug
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ block content
- var comment_js = true
include includes/widgets/third-party/comments/comment
if page.aside
include includes/widgets/aside/aside
include includes/widgets/aside/aside
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.0.12",
"version": "2.0.13",
"description": "A beautiful, powerful, and efficient Hexo theme developed by everfu.",
"main": "package.json",
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions scripts/event/merge_config.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ hexo.extend.filter.register('before_generate', () => {
right_menu: {
enable: false,
commentBarrage: false,
ctrlOriginalMenu: false,
translate: {
enable: false,
defaultEncoding: 2,
Expand Down
2 changes: 1 addition & 1 deletion scripts/event/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ hexo.extend.generator.register('categories', function(locals) {
comment: false
}
};
});
});
Loading

0 comments on commit 4686490

Please sign in to comment.