Skip to content

Commit

Permalink
Merge pull request #166 from valor-x/dev
Browse files Browse the repository at this point in the history
v1.5.5
  • Loading branch information
everfu authored Mar 19, 2024
2 parents 0d8bf7b + 798c345 commit 5f6a8c1
Show file tree
Hide file tree
Showing 49 changed files with 684 additions and 753 deletions.
12 changes: 0 additions & 12 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ nav:
# 友情链接: /links/ || st-group-fill
# 宝藏博主: javascript:travelling() || st-gift-fill
# 我的:
# 相册集: /gallery/ || st-image-fill
# 装备: /equipment/ || st-laptop-line
# 工具箱: /tlink/ || st-tools-fill
# 音乐馆: /music/ || st-disc-fill
Expand Down Expand Up @@ -321,11 +320,6 @@ post:
enable: true
license: CC BY-NC-SA 4.0
licenurl: https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh
# 是否使用移轴动画头像
# Whether to use the shift animation avatar
author:
enable: false
author_back: https://7.isyangs.cn/34/65f2e52b2d91e-34.png # 底部头像背景 / Bottom avatar background
# 顶部文章简介
# Top article introduction
meta:
Expand Down Expand Up @@ -542,12 +536,6 @@ moments:
bundlejs: https://cdn.cbd.int/st-source/js/moment/bundle.min.js
randompostjs: https://cdn.cbd.int/st-source/js/moment/random_post.min.js

# 相册
# album
album:
enable: false # 是否开启相册 / Whether to enable album
limit: 6 # 单行显示图片数量 / Number of pictures displayed in a single line

# 快捷菜单你
# quick menu
keyboard:
Expand Down
15 changes: 9 additions & 6 deletions languages/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ copy:
success: Copied
error: Copied failed

time:
recent: Recent
yesterday: Yesterday
berforeyesterday: TDBY
daybefore: Days ago
runtime: days
lately:
second: second
minute: minute
hour: hour
day: day
month: month
year: year
ago: ago
error: NaN

chs:
chs_tw: Traditional Chinese
Expand Down
15 changes: 9 additions & 6 deletions languages/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ copy:
success: 复制成功
error: 复制失败

time:
recent: 最近
yesterday: 昨天
berforeyesterday: 前天
daybefore: 天前
runtime:
lately:
second:
minute: 分钟
hour: 小时
day:
month: 个月
year:
ago:
error: NaN

chs:
chs_tw: 繁體中文
Expand Down
15 changes: 9 additions & 6 deletions languages/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@ copy:
success: 複製成功
error: 複製失敗

time:
recent: 最近
yesterday: 昨天
berforeyesterday: 前天
daybefore: 天前
runtime:
lately:
second:
minute: 分鐘
hour: 小時
day:
month: 个月
year:
ago:
error: NaN

chs:
chs_tw: 繁體中文
Expand Down
15 changes: 9 additions & 6 deletions layout/includes/head/config.pug
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,15 @@ script.
error: '!{_p('copy.error')}',
},
backtop: '!{_p('nav.backtop')}',
time: {
recent: '!{_p('time.recent')}',
yesterday: '!{_p('time.yesterday')}',
berforeyesterday: '!{_p('time.berforeyesterday')}',
daybefore: '!{_p('time.daybefore')}',
runtime: '!{_p('time.runtime')}',
lately: {
second: '!{_p('lately.second')}',
minute: '!{_p('lately.minute')}',
hour: '!{_p('lately.hour')}',
day: '!{_p('lately.day')}',
month: '!{_p('lately.month')}',
year: '!{_p('lately.year')}',
ago: '!{_p('lately.ago')}',
error: '!{_p('lately.error')}',
},
search: {
empty: '!{_p('search.empty')}',
Expand Down
7 changes: 7 additions & 0 deletions layout/includes/inject/body.pug
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ div
script(src=url_for(theme.cdn.main))
script(src=url_for(theme.cdn.utils))

// lately
script(src=url_for(theme.cdn.lately_js))

if theme.mermaid
script(src=url_for(theme.cdn.mermaid_js))

Expand Down Expand Up @@ -106,6 +109,10 @@ div
!= item

div#js-pjax
case config.lang
when 'en'
script.
utils.changeTimeFormat()
if theme.mermaid
script.
mermaid.run();
Expand Down
2 changes: 1 addition & 1 deletion layout/includes/inject/head.pug
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ script.
)(window)

console.log(
"%c Program: Hexo %c Theme: Solitude %c Version: v1.5.4",
"%c Program: Hexo %c Theme: Solitude %c Version: v1.5.5",
"border-radius:5px 0 0 5px;padding: 5px 10px;color:white;background:#ff3842;",
"padding: 5px 10px;color:white;background:#3e9f50;",
"border-radius:0 5px 5px 0;padding: 5px 10px;background:#0084ff;color:white;"
Expand Down
38 changes: 0 additions & 38 deletions layout/includes/page/album.pug

This file was deleted.

11 changes: 0 additions & 11 deletions layout/includes/page/gallery.pug

This file was deleted.

2 changes: 0 additions & 2 deletions layout/includes/widgets/post/copyright.pug
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
.post-copyright
.post-copyright__author_group
a.post-copyright__author_img(href="/about/")
if theme.post.default.copyright.author.enable
img.post-copyright__author_img_back(src=theme.post.default.copyright.author.author_back)
img.post-copyright__author_img_front(src=theme.site.icon)
.post-copyright__author_name= config.title
.post-copyright__author_desc= config.subtitle
Expand Down
4 changes: 0 additions & 4 deletions layout/page.pug
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ block content
include includes/page/default
when 'music'
include includes/page/music
when 'gallery'
include includes/page/gallery
when 'album'
include includes/page/album
default
include includes/page/default
if page.comment
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": "1.5.4",
"version": "1.5.5",
"description": "A beautiful, powerful, and efficient Hexo theme developed by the wleelw",
"main": "package.json",
"scripts": {
Expand Down
4 changes: 0 additions & 4 deletions plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,6 @@ fancyapps_css:
name: fancyapps-ui
file: dist/fancybox/fancybox.min.css
version: 5.0.33
macy_js:
name: macy
file: dist/macy.min.js
version: 2.5.1
mermaid_js:
name: mermaid
file: dist/mermaid.min.js
Expand Down
7 changes: 6 additions & 1 deletion scripts/event/cdn.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ hexo.extend.filter.register('before_generate', () => {
name: 'hexo-theme-solitude',
file: 'js/universe.min.js',
version
}
},
lately_js: {
name: 'hexo-theme-solitude',
file: 'js/lately.min.js',
version
},
}

const minFile = file => {
Expand Down
49 changes: 0 additions & 49 deletions scripts/generator/gallery.js

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/tags/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function btn(args) {
option = option.trim();

return `<button class="btn-sco ${option}" onclick="location.href = '${urlFor(url)}'"
title="${text}">${icon.length ? `<i class="${icon}"></i>` : ""}${text.length ? `<span>${text}</span>` : ""}</button>`;
title="${text}">${icon.length ? `<i class="solitude ${icon}"></i>` : ""}${text.length ? `<span>${text}</span>` : ""}</button>`;
}

hexo.extend.tag.register("btn", btn, { ends: false });
4 changes: 2 additions & 2 deletions scripts/tags/bvideo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict'

function bilibili(args) {
return `<iframe class="bvideo" src="${args}"></iframe>`
return `<iframe class="bvideo" width="100%" height="600" src="//player.bilibili.com/player.html?aid=1351697032&bvid=${args}&p=1" border="0" frameBorder="no" framespacing="0" allowFullScreen="true"></iframe>`
}

hexo.extend.tag.register('bilibili', bilibili, { ends: false })
hexo.extend.tag.register('bvideo', bilibili, {ends: false})
9 changes: 0 additions & 9 deletions scripts/tags/card.js

This file was deleted.

54 changes: 54 additions & 0 deletions scripts/tags/gallery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
'use strict';

function galleryGroup(args, content) {
const title = args[0];
const description = args[1];
const link = args[2];
const image = args[3];

return `<div class="gallery-item" onclick="pjax.loadUrl('/${link}/')">
<img class="cover" src="${image}" />
<span class="title">${title}</span>
<span class="desc">${description}</span>
</div>`;
}

const urlFor = require('hexo-util').url_for.bind(hexo)

const gallery = (args, content) => {
args = args.join(' ').split(',')
let button = false
let type = 'data'
let dataStr = ''

if (args[0] === 'url') {
[type, dataStr, button] = args // url,[link],[lazyload]
} else {
[button] = args // [lazyload]
const regex = /!\[(.*?)\]\(([^\s]*)\s*(?:["'](.*?)["']?)?\s*\)/g
let m
const arr = []
while ((m = regex.exec(content)) !== null) {
if (m.index === regex.lastIndex) {
regex.lastIndex++
}
arr.push({
url: m[2],
alt: m[1],
title: m[3]
})
}

dataStr = JSON.stringify(arr)
}

return `<div class="gallery-container" data-type="${type}" data-button="${button}">
<div class="gallery-data">${dataStr}</div>
<div class="gallery-items">
</div>
</div>`
}

hexo.extend.tag.register('gallery', gallery, {ends: true});

hexo.extend.tag.register('galleryGroup',galleryGroup, {ends: false});
Loading

0 comments on commit 5f6a8c1

Please sign in to comment.