Skip to content

Commit

Permalink
Merge pull request #320 from everfu/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
everfu authored Jul 11, 2024
2 parents 5bf69d5 + 17fc6f2 commit 9deeb42
Show file tree
Hide file tree
Showing 51 changed files with 709 additions and 421 deletions.
23 changes: 0 additions & 23 deletions .github/logo.svg

This file was deleted.

Binary file added .github/persona.avif
Binary file not shown.
Binary file added .github/screenshot.avif
Binary file not shown.
Binary file removed .github/screenshot.webp
Binary file not shown.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div align="center">

<img src=".github/logo.svg" alt="Solitude logo" height="200">
<img src=".github/persona.avif" alt="Solitude logo" height="200">

<h1>Hexo Theme Solitude</h1>

Expand Down Expand Up @@ -31,11 +31,11 @@
[![gitee](https://img.shields.io/badge/Gitee-red?logo=gitee)](https://gitee.com/nsjjd_w/hexo-theme-solitude)
[![gitlab](https://img.shields.io/badge/GitLab-blue?logo=gitlab)](https://gitlab.com/efu/hexo-theme-solitude)

[文档](https://solitude.js.org/)[预览](https://www.efu.me/)
[文档](https://solitude.js.org/)[预览](https://everfu.github.io/Solitude/)

</div>

![Screenshot](.github/screenshot.webp)
![Screenshot](.github/screenshot.avif)

## 特性

Expand Down
6 changes: 3 additions & 3 deletions README_en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div align="center">

<img src=".github/logo.svg" alt="Solitude logo" height="200">
<img src=".github/persona.avif" alt="Solitude logo" height="200">

<h1>Hexo Theme Solitude</h1>

Expand Down Expand Up @@ -31,11 +31,11 @@
[![gitee](https://img.shields.io/badge/Gitee-red?logo=gitee)](https://gitee.com/nsjjd_w/hexo-theme-solitude)
[![gitlab](https://img.shields.io/badge/GitLab-blue?logo=gitlab)](https://gitlab.com/efu/hexo-theme-solitude)

[Documentation](https://solitude.js.org/)[Preview](https://www.efu.me/)
[Documentation](https://solitude.js.org/)[Preview](https://everfu.github.io/Solitude/)

</div>

![Screenshot](.github/screenshot.webp)
![Screenshot](.github/screenshot.avif)

## Features

Expand Down
6 changes: 3 additions & 3 deletions README_zh-Hant.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div align="center">

<img src=".github/logo.svg" alt="Solitude logo" height="200">
<img src=".github/persona.avif" alt="Solitude logo" height="200">

<h1>Hexo Theme Solitude</h1>

Expand Down Expand Up @@ -31,11 +31,11 @@
[![gitee](https://img.shields.io/badge/Gitee-red?logo=gitee)](https://gitee.com/nsjjd_w/hexo-theme-solitude)
[![gitlab](https://img.shields.io/badge/GitLab-blue?logo=gitlab)](https://gitlab.com/efu/hexo-theme-solitude)

[文档](https://solitude.js.org/)[預覽](https://www.efu.me/)
[文档](https://solitude.js.org/)[預覽](https://everfu.github.io/Solitude/)

</div>

![Screenshot](.github/screenshot.webp)
![Screenshot](.github/screenshot.avif)

## 特性

Expand Down
60 changes: 52 additions & 8 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ page:
# post default settings
post:
default:
top_cover: true # 顶部描述 / Top description
# 文章默认图片
# default cover
cover:
Expand Down Expand Up @@ -760,7 +761,7 @@ post_ai:

# latex 公式支持
# latex formula support
# docs: https://solitude.js.org/configuration/extra#数学公式
# docs: https://solitude.js.org/config/extend.html#数学公式
katex:
enable: false
per_page: false # 是否在每页都加载 / Whether to load on each page
Expand All @@ -776,6 +777,9 @@ comment:
count: false # 评论数展示
pv: false # 是否使用評論統計頁面訪問
avatar: https://cravatar.cn # Gravatar link
hot_tip: # 多人互动
enable: false # 开启后将在文章列表显示多人互动
count: 3 # 设置大于多少评论时显示

# twikoo 配置信息
# twikoo settings
Expand Down Expand Up @@ -822,8 +826,15 @@ giscus:
dark: dark
option:

# 中控台扩展 : 最新评论 + 标签 + 文章
console_plus: false
# 中控台
console:
enable: false # 开启后显示中控台
recentComment: # 开启后显示最近评论
enable: false # 开启前请先配置评论
storage: .2 # 缓存时间
card:
tags: true # 开启后显示 标签
archive: true # 开启后显示 归档

# 站点验证
# Site verification
Expand Down Expand Up @@ -862,7 +873,7 @@ extends:

# PWA
# https://developer.mozilla.org/zh-CN/docs/Web/Progressive_web_apps
# docs: https://solitude.js.org/configuration/extra#pwa
# docs: https://solitude.js.org/config/extra#pwa
pwa:
enable: false
manifest: /manifest.json # manifest.json 文件路径
Expand Down Expand Up @@ -931,11 +942,43 @@ memorial:
enable: false
# 日期, (M-D)
# Date, (M-D)
# eg: 7-8, 9-18, 12-13 ...
# eg: 7-7, 9-18, 12-13 ...
date:
- "7-8" #七八卢沟桥事变
- "9-18" #九一八事变/建军节
- "12-13" #南京国家公祭日
- "7-7" # 七七事变
- "9-18" # 九一八事变/建军节
- "12-13" # 南京国家公祭日

# 诱骗
# lure
lure:
enable: false
# 跳出
# Jump out
jump: "404 Not Found"
# 切回
# Switch back
back: "ヾ(≧∇≦*)ゝ嘿嘿,上当了吧"

# 文章过期提醒
# Article expiration reminder
expire:
enable: false
# 过期时间
# Expiration time
time: 30
position: top # top / bottom
# 过期提示
# Expiration prompt
text_prev: "本文已于"
text_next: "天前过期,如果内容不符,请联系站长更新。"

# 背景图片
# Background image
background:
enable: false
opacity: .2
dark: https://bu.dusays.com/2023/09/29/651685ce667d1.jpg
light: https://bu.dusays.com/2023/09/29/651685cc18d39.jpg

# CDN
# Don't modify the following settings unless you know how they work
Expand All @@ -958,6 +1001,7 @@ CDN:

option:
solitude_css: https://cdn2.codesign.qq.com/icons/7pOrz0WXB5ZWJPX/latest/iconfont.css
busuanzi_qj_js: https://pv.lemonso.com/js
# algolia_search:
# instantsearch:
# pjax:
Expand Down
1 change: 1 addition & 0 deletions languages/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ upload: 'datetime: '
totalk: You don't need to delete blank lines, just type in your comments.
loading: Loading...
day: ' days'
hot-tip: Hot

theme:
dark: Dark
Expand Down
1 change: 1 addition & 0 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ upload: 'datetime: '
totalk: You don't need to delete blank lines, just type in your comments.
loading: Loading...
day: ' days'
hot-tip: Hot

theme:
dark: Dark
Expand Down
1 change: 1 addition & 0 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ upload: 发布时间:
totalk: 无需删除空行,直接输入评论即可
loading: 加载中...
day: ''
hot-tip: 多人互动

# Language: 简体中文
theme:
Expand Down
1 change: 1 addition & 0 deletions languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ upload: 發佈時間:
totalk: 無需刪除空行,直接輸入評論即可
loading: 加載中...
day: ''
hot-tip: 多人互動

# Language: 繁體中文 (台灣)
theme:
Expand Down
65 changes: 39 additions & 26 deletions layout/includes/console.pug
Original file line number Diff line number Diff line change
@@ -1,33 +1,46 @@
- const { recentComment, card } = theme.console
- const { cache } = recentComment
- const limit = 6
- const { use } = theme.comment

div#console
div.close-btn(onclick="sco.hideConsole()")
i.solitude.st-close-fill
if theme.console_plus
div.console-card-group
if theme.recent_comments.enable && theme.recent_comments.img
div.console-card-group-left
div.console-card#card-newest-comments(onclick="sco.hideConsole()")
div.card-content
div.author-content-item-tips= _p('console.comment_tip')
div.author-content-item-title
| #{_p('console.comment_title')}
if theme.recent_comments.enable
a.recent-comment-more(href=url_for(theme.recent_comments.page) title=_p('console.recent_comment_more'))
i.solitude.st-right-btn-fill
a.recent-comment-image(href=url_for(theme.recent_comments.page))
img(src=theme.recent_comments.img)

div.console-card-group-right
div.console-card.tags(onclick="sco.hideConsole()")
div.console-card-group
if use && recentComment.enable
div.console-card-group-left
div.console-card#card-newest-comments(onclick="sco.hideConsole()")
div.card-content
div.author-content-item-tips= _p('console.tag_tip')
div.author-content-item-title= _p('console.tag_title')
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

div.console-card.history(onclick="sco.hideConsole()")
include ./widgets/aside/asideArchive.pug
div.author-content-item-tips= _p('console.comment_tip')
div.author-content-item-title
| #{_p('console.comment_title')}
if theme.recent_comments.enable
a.recent-comment-more(href=url_for(theme.recent_comments.page) title=_p('console.recent_comment_more'))
i.solitude.st-right-btn-fill
#console_recentcomments
case use[0]
when 'Twikoo'
include ./widgets/page/recentcomment/twikoo
when 'Valine'
include ./widgets/page/recentcomment/valine
when 'Waline'
include ./widgets/page/recentcomment/waline
when 'Artalk'
include ./widgets/page/recentcomment/artalk
if card.tags || card.archive
div.console-card-group-right
if card.tags
div.console-card.tags(onclick="sco.hideConsole()")
div.card-content
div.author-content-item-tips= _p('console.tag_tip')
div.author-content-item-title= _p('console.tag_title')
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
if card.archive
div.console-card.history(onclick="sco.hideConsole()")
include ./widgets/aside/asideArchive.pug

div.button-group
div.console-btn-item
Expand Down
20 changes: 20 additions & 0 deletions layout/includes/head/config.pug
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,24 @@
}
}
let lure = false
if (theme.lure.enable) {
lure = {
jump: theme.lure.jump,
back: theme.lure.back,
}
}
let expire = false
if (theme.expire.enable) {
expire = {
time: theme.expire.time,
position: theme.expire.position,
text_prev: theme.expire.text_prev,
text_next: theme.expire.text_next,
}
}
script.
const GLOBAL_CONFIG = {
root: '!{config.root}',
Expand Down Expand Up @@ -167,4 +185,6 @@ script.
lightbox: '!{ theme.mediumZoom ? "mediumZoom" : (theme.fancybox ? "fancybox" : "null")}',
post_ai: !{post_ai},
right_menu: !{rightMenu ? JSON.stringify(rightMenu) : false},
lure: !{lure ? JSON.stringify(lure) : false},
expire: !{expire ? JSON.stringify(expire) : false},
};
6 changes: 4 additions & 2 deletions layout/includes/header.pug
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
header#page-header(class=is_post() ? 'post-bg' : 'not-top-img')
- const not_cover = !(typeof page.not_cover ==='undefined' ? false : page.not_cover)
header#page-header(class=is_post() && theme.post.default.top_cover && not_cover ? 'post-bg' : 'not-top-img')
include ./nav.pug
if is_post()
include ./widgets/post/postMeta.pug
if theme.post.default.top_cover && !page.not_cover
include ./widgets/post/postMeta.pug
7 changes: 6 additions & 1 deletion layout/includes/layout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ html(lang=config.language, data-theme="light")
if theme.display_mode.universe
canvas#universe

// background img
if theme.background.enable
#global_bg

// loading
if theme.loading.fullpage
include ./loading.pug

// console
include ./console.pug
if theme.console.enable
include ./console.pug

// sidebar
include ./sidebar.pug
Expand Down
2 changes: 1 addition & 1 deletion layout/includes/page/recentcomment.pug
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
include ../widgets/page/banner

if enable && use
#comments-page
#console_recentcomments
case use[0]
when 'Twikoo'
include ../widgets/page/recentcomment/twikoo
Expand Down
Loading

0 comments on commit 9deeb42

Please sign in to comment.