hexo-theme-solitude 2.1.16 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_config.yml +9 -6
- package/layout/includes/inject/body.pug +1 -1
- package/layout/includes/page/kit.pug +3 -0
- package/layout/includes/page/links.pug +5 -3
- package/layout/includes/widgets/home/banner.pug +9 -2
- package/layout/includes/widgets/page/{equipment → kit}/content.pug +3 -2
- package/layout/page.pug +4 -6
- package/package.json +1 -1
- package/plugins.yml +1 -1
- package/scripts/event/cdn.js +45 -115
- package/scripts/event/merge_config.js +1 -1
- package/scripts/helper/stylus.js +0 -2
- package/source/css/_comments/twikoo.styl +1 -1
- package/source/css/_layout/footer.styl +1 -1
- package/source/css/_page/_about/contentinfo.styl +1 -1
- package/source/css/_page/error.styl +1 -1
- package/source/css/_page/index.styl +3 -6
- package/source/js/main.js +14 -0
- package/source/js/third_party/waterfall.min.js +1 -1
- package/.github/workflows/code-review-bot.yml +0 -28
- package/.github/workflows/issue_close_question.yml +0 -25
- package/layout/includes/page/equipment.pug +0 -2
- package/layout/includes/page/tlink.pug +0 -13
- package/scripts/tags/article.js +0 -56
- package/source/css/_page/_gallery/index.styl +0 -38
- /package/layout/includes/page/{says.pug → brevity.pug} +0 -0
package/_config.yml
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# ---------------------------
|
2
2
|
# Hexo Theme Solitude
|
3
|
-
# Author:
|
3
|
+
# Author: 伍十七(@everfu)
|
4
4
|
# Github: https://github.com/everfu/hexo-theme-solitude
|
5
5
|
#
|
6
6
|
# Guide: https://solitude.js.org
|
7
7
|
# You can get more detailed help from the guide
|
8
|
-
# 指南:https://solitude.js.org
|
8
|
+
# 指南:https://solitude.js.org/zh
|
9
9
|
# 你可以从指南中获取更详细的帮助
|
10
10
|
#
|
11
11
|
# sponsor: https://ko-fi.com/everfu
|
@@ -21,7 +21,7 @@ site:
|
|
21
21
|
name:
|
22
22
|
class: text # text / i_class / img
|
23
23
|
custom: Solitude # Solitude / fas fa-ghost / /img/pwa/favicon.ico
|
24
|
-
icon: /img/pwa/favicon.
|
24
|
+
icon: /img/pwa/favicon.png # Site icon / 网站图标
|
25
25
|
# --------------------------- end ---------------------------
|
26
26
|
|
27
27
|
# --------------------------- start ---------------------------
|
@@ -69,8 +69,11 @@ nav:
|
|
69
69
|
hometop:
|
70
70
|
enable: false
|
71
71
|
banner:
|
72
|
-
title:
|
73
|
-
|
72
|
+
title: 分享技术<br >与科技生活 # 大字
|
73
|
+
desc: 一个热爱生活的人 # 小字
|
74
|
+
# - 我只是一个普通的程序员
|
75
|
+
# - 但我有一个不平凡的梦想
|
76
|
+
# - 我希望能够改变世界
|
74
77
|
icon:
|
75
78
|
# HTML: # name
|
76
79
|
# img: https://i.postimg.cc/vBWVnY8q/html.png # url
|
@@ -380,7 +383,7 @@ font:
|
|
380
383
|
code-font-size: 16px
|
381
384
|
# Global font
|
382
385
|
# 全局字体
|
383
|
-
font-family: "PingFang SC, Hiragino Sans GB, Microsoft YaHei"
|
386
|
+
font-family: "PingFang SC, Hiragino Sans GB, Microsoft YaHei, sans-serif"
|
384
387
|
# Code font
|
385
388
|
# 代码字体
|
386
389
|
code-font-family: '"monospace", monospace'
|
@@ -1,7 +1,9 @@
|
|
1
|
-
.
|
2
|
-
|
1
|
+
- var $data = page.data
|
2
|
+
if page.banner
|
3
|
+
.flink#banners
|
4
|
+
include ../widgets/page/links/banner
|
3
5
|
.flink.article-container
|
4
|
-
each data in site.data.links
|
6
|
+
each data in site.data[$data].links
|
5
7
|
h2= data.class_name + " (" + data.link_list.length + ")"
|
6
8
|
.flink-desc= data.descr
|
7
9
|
case data.type
|
@@ -1,8 +1,15 @@
|
|
1
|
-
- const { title,
|
1
|
+
- const { title, desc, icon} = theme.hometop.banner
|
2
2
|
|
3
3
|
div.banners-title
|
4
4
|
div.banners-title-big!= title
|
5
|
-
|
5
|
+
- console.log(typeof(desc))
|
6
|
+
if typeof(desc) === 'object'
|
7
|
+
div.banners-title-small
|
8
|
+
script.
|
9
|
+
var home_subtitle = !{JSON.stringify(desc || [])};
|
10
|
+
else
|
11
|
+
div.banners-title-small= desc
|
12
|
+
|
6
13
|
- var group = theme.hometop.group
|
7
14
|
if group
|
8
15
|
div.banners-links
|
package/layout/page.pug
CHANGED
@@ -10,14 +10,12 @@ block content
|
|
10
10
|
include includes/page/tags
|
11
11
|
when 'links'
|
12
12
|
include includes/page/links
|
13
|
-
when 'tlink'
|
14
|
-
include includes/page/tlink
|
15
13
|
when 'about'
|
16
14
|
include includes/page/about
|
17
|
-
when '
|
18
|
-
include includes/page/
|
19
|
-
when '
|
20
|
-
include includes/page/
|
15
|
+
when 'brevity'
|
16
|
+
include includes/page/brevity
|
17
|
+
when 'kit'
|
18
|
+
include includes/page/kit
|
21
19
|
when 'music'
|
22
20
|
include includes/page/music
|
23
21
|
when 'message'
|
package/package.json
CHANGED
package/plugins.yml
CHANGED
package/scripts/event/cdn.js
CHANGED
@@ -3,117 +3,48 @@
|
|
3
3
|
* Merge CDN
|
4
4
|
*/
|
5
5
|
|
6
|
-
'use strict'
|
6
|
+
'use strict';
|
7
7
|
|
8
|
-
const { version } = require('../../package.json')
|
9
|
-
const path = require('path')
|
8
|
+
const { version } = require('../../package.json');
|
9
|
+
const path = require('path');
|
10
10
|
|
11
11
|
hexo.extend.filter.register('before_generate', () => {
|
12
|
-
const themeConfig = hexo.theme.config
|
13
|
-
const { CDN } = themeConfig
|
12
|
+
const themeConfig = hexo.theme.config;
|
13
|
+
const { CDN } = themeConfig;
|
14
|
+
const name = 'hexo-theme-solitude';
|
14
15
|
|
15
|
-
const thirdPartySrc = hexo.render.renderSync({ path: path.join(hexo.theme_dir, '/plugins.yml'), engine: 'yaml' })
|
16
|
+
const thirdPartySrc = hexo.render.renderSync({ path: path.join(hexo.theme_dir, '/plugins.yml'), engine: 'yaml' });
|
16
17
|
const internalSrc = {
|
17
|
-
main: {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
},
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
},
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
}
|
32
|
-
|
33
|
-
name: 'hexo-theme-solitude',
|
34
|
-
file: 'js/search/algolia.js',
|
35
|
-
version
|
36
|
-
},
|
37
|
-
cover_local: {
|
38
|
-
name: 'hexo-theme-solitude',
|
39
|
-
file: 'js/covercolor/local.js',
|
40
|
-
version
|
41
|
-
},
|
42
|
-
cover_api: {
|
43
|
-
name: 'hexo-theme-solitude',
|
44
|
-
file: 'js/covercolor/api.js',
|
45
|
-
version
|
46
|
-
},
|
47
|
-
cover_ave: {
|
48
|
-
name: 'hexo-theme-solitude',
|
49
|
-
file: 'js/covercolor/ave.js',
|
50
|
-
version
|
51
|
-
},
|
52
|
-
music_js: {
|
53
|
-
name: 'hexo-theme-solitude',
|
54
|
-
file: 'js/music.js',
|
55
|
-
version
|
56
|
-
},
|
57
|
-
right_menu_js: {
|
58
|
-
name: 'hexo-theme-solitude',
|
59
|
-
file: 'js/right_menu.js',
|
60
|
-
version
|
61
|
-
},
|
62
|
-
translate_js:{
|
63
|
-
name: 'hexo-theme-solitude',
|
64
|
-
file: 'js/tw_cn.js',
|
65
|
-
version
|
66
|
-
},
|
67
|
-
post_ai: {
|
68
|
-
name: 'hexo-theme-solitude',
|
69
|
-
file: 'js/third_party/post_ai.min.js',
|
70
|
-
version
|
71
|
-
},
|
72
|
-
commentBarrage: {
|
73
|
-
name: 'hexo-theme-solitude',
|
74
|
-
file: 'js/third_party/barrage.min.js',
|
75
|
-
version
|
76
|
-
},
|
77
|
-
waterfall: {
|
78
|
-
name: 'hexo-theme-solitude',
|
79
|
-
file: 'js/third_party/waterfall.min.js',
|
80
|
-
version
|
81
|
-
},
|
82
|
-
universe_js: {
|
83
|
-
name: 'hexo-theme-solitude',
|
84
|
-
file: 'js/third_party/universe.min.js',
|
85
|
-
version
|
86
|
-
},
|
87
|
-
envelope_js: {
|
88
|
-
name: 'hexo-theme-solitude',
|
89
|
-
file: 'js/third_party/envelope.min.js',
|
90
|
-
version
|
91
|
-
}
|
92
|
-
}
|
18
|
+
main: { name, file: 'js/main.js', version },
|
19
|
+
utils: { name, file: 'js/utils.js', version },
|
20
|
+
local_search: { name, file: 'js/search/local.js', version },
|
21
|
+
algolia_js: { name, file: 'js/search/algolia.js', version },
|
22
|
+
cover_local: { name, file: 'js/covercolor/local.js', version },
|
23
|
+
cover_api: { name, file: 'js/covercolor/api.js', version },
|
24
|
+
cover_ave: { name, file: 'js/covercolor/ave.js', version },
|
25
|
+
music_js: { name, file: 'js/music.js', version },
|
26
|
+
right_menu_js: { name, file: 'js/right_menu.js', version },
|
27
|
+
translate_js: { name, file: 'js/tw_cn.js', version },
|
28
|
+
post_ai: { name, file: 'js/third_party/post_ai.min.js', version },
|
29
|
+
commentBarrage: { name, file: 'js/third_party/barrage.min.js', version },
|
30
|
+
waterfall: { name, file: 'js/third_party/waterfall.min.js', version },
|
31
|
+
universe_js: { name, file: 'js/third_party/universe.min.js', version },
|
32
|
+
envelope_js: { name, file: 'js/third_party/envelope.min.js', version }
|
33
|
+
};
|
93
34
|
|
94
|
-
const minFile = file => {
|
95
|
-
return file.replace(/(?<!\.min)\.(js|css)$/g, ext => '.min' + ext)
|
96
|
-
}
|
35
|
+
const minFile = file => file.replace(/(?<!\.min)\.(js|css)$/g, ext => `.min${ext}`);
|
97
36
|
|
98
37
|
const createCDNLink = (data, type, cond = '') => {
|
99
38
|
Object.keys(data).forEach(key => {
|
100
|
-
let { name, version, file, other_name } = data[key]
|
101
|
-
const cdnjs_name = other_name || name
|
102
|
-
const cdnjs_file = file.replace(/^[lib|dist]*\/|browser\//g, '')
|
103
|
-
const min_cdnjs_file = minFile(cdnjs_file)
|
104
|
-
if (cond === 'internal') file = `source/${file}
|
105
|
-
const min_file = minFile(file)
|
106
|
-
const verType = CDN.version ? (type === 'local' ? `?v=${version}` : `@${version}`) : ''
|
39
|
+
let { name, version, file, other_name } = data[key];
|
40
|
+
const cdnjs_name = other_name || name;
|
41
|
+
const cdnjs_file = file.replace(/^[lib|dist]*\/|browser\//g, '');
|
42
|
+
const min_cdnjs_file = minFile(cdnjs_file);
|
43
|
+
if (cond === 'internal') file = `source/${file}`;
|
44
|
+
const min_file = minFile(file);
|
45
|
+
const verType = CDN.version ? (type === 'local' ? `?v=${version}` : `@${version}`) : '';
|
107
46
|
|
108
|
-
const value = {
|
109
|
-
version,
|
110
|
-
name,
|
111
|
-
file,
|
112
|
-
cdnjs_file,
|
113
|
-
min_file,
|
114
|
-
min_cdnjs_file,
|
115
|
-
cdnjs_name
|
116
|
-
}
|
47
|
+
const value = { version, name, file, cdnjs_file, min_file, min_cdnjs_file, cdnjs_name };
|
117
48
|
|
118
49
|
const cdnSource = {
|
119
50
|
local: cond === 'internal' ? `${cdnjs_file + verType}` : `/pluginsSrc/${name}/${file + verType}`,
|
@@ -121,27 +52,26 @@ hexo.extend.filter.register('before_generate', () => {
|
|
121
52
|
unpkg: `https://unpkg.com/${name}${verType}/${file}`,
|
122
53
|
cdnjs: `https://cdnjs.cloudflare.com/ajax/libs/${cdnjs_name}/${version}/${min_cdnjs_file}`,
|
123
54
|
custom: (CDN.custom_format || '').replace(/\$\{(.+?)}/g, (match, $1) => value[$1]),
|
124
|
-
}
|
55
|
+
};
|
125
56
|
|
126
|
-
data[key] = cdnSource[type]
|
127
|
-
})
|
57
|
+
data[key] = cdnSource[type];
|
58
|
+
});
|
128
59
|
|
129
|
-
if (cond === 'internal') data.main_css =
|
130
|
-
return data
|
131
|
-
}
|
60
|
+
if (cond === 'internal') data.main_css = `css/index.css${CDN.version ? `?v=${version}` : ''}`;
|
61
|
+
return data;
|
62
|
+
};
|
132
63
|
|
133
|
-
// delete null value
|
134
64
|
const deleteNullValue = obj => {
|
135
|
-
if (!obj) return
|
136
|
-
for (const
|
137
|
-
obj[
|
65
|
+
if (!obj) return;
|
66
|
+
for (const key in obj) {
|
67
|
+
if (obj[key] === null) delete obj[key];
|
138
68
|
}
|
139
|
-
return obj
|
140
|
-
}
|
69
|
+
return obj;
|
70
|
+
};
|
141
71
|
|
142
72
|
themeConfig.cdn = Object.assign(
|
143
73
|
createCDNLink(internalSrc, CDN.internal, 'internal'),
|
144
74
|
createCDNLink(thirdPartySrc, CDN.third_party),
|
145
75
|
deleteNullValue(CDN.options)
|
146
|
-
)
|
147
|
-
})
|
76
|
+
);
|
77
|
+
});
|
@@ -327,7 +327,7 @@ hexo.extend.filter.register('before_generate', () => {
|
|
327
327
|
font: {
|
328
328
|
'font-size': '16px',
|
329
329
|
'code-font-size': '16px',
|
330
|
-
'font-family': 'PingFang SC, Hiragino Sans GB,Microsoft YaHei',
|
330
|
+
'font-family': 'PingFang SC, Hiragino Sans GB,Microsoft YaHei, sans-serif',
|
331
331
|
'code-font-family': '"monospace", monospace',
|
332
332
|
},
|
333
333
|
extends: {
|
package/scripts/helper/stylus.js
CHANGED
@@ -3,8 +3,6 @@ hexo.extend.filter.register('stylus:renderer', function (style) {
|
|
3
3
|
const data = hexo.locals.get('data');
|
4
4
|
|
5
5
|
style.define('$about', data && data.about ? Object.keys(data.about) : false);
|
6
|
-
style.define('$link', !!(data && data.links) || !!(data && data.tlink))
|
7
|
-
style.define('$equipment', !!(data && data.equipment))
|
8
6
|
|
9
7
|
// highlight
|
10
8
|
const {syntax_highlighter: syntaxHighlighter, highlight, prismjs} = hexo.config
|
@@ -18,14 +18,11 @@ if hexo-config('music.enable')
|
|
18
18
|
if hexo-config('google_adsense.enable')
|
19
19
|
@import "google.styl"
|
20
20
|
|
21
|
-
|
22
|
-
@import "equipment.styl"
|
21
|
+
@import "equipment.styl"
|
23
22
|
|
24
|
-
|
25
|
-
@import "links.styl"
|
23
|
+
@import "links.styl"
|
26
24
|
|
27
|
-
|
28
|
-
@import "_about/about"
|
25
|
+
@import "_about/about"
|
29
26
|
|
30
27
|
@import "other"
|
31
28
|
|
package/source/js/main.js
CHANGED
@@ -483,6 +483,19 @@ const sco = {
|
|
483
483
|
}
|
484
484
|
};
|
485
485
|
utils.addEventListenerPjax(switchBtn, 'click', handleSwitchBtn);
|
486
|
+
},
|
487
|
+
homeTypeit() {
|
488
|
+
if(typeof(home_subtitle) === 'undefined') return;
|
489
|
+
const ty = new TypeIt(".banners-title-small", {
|
490
|
+
speed: 200,
|
491
|
+
waitUntilVisible: true,
|
492
|
+
loop: true,
|
493
|
+
lifeLike: true,
|
494
|
+
});
|
495
|
+
home_subtitle.forEach(item => {
|
496
|
+
ty.type(item).pause(500).delete(item);
|
497
|
+
});
|
498
|
+
ty.go();
|
486
499
|
}
|
487
500
|
};
|
488
501
|
|
@@ -747,6 +760,7 @@ window.refreshFn = () => {
|
|
747
760
|
initObserver();
|
748
761
|
if (is_home) {
|
749
762
|
showTodayCard();
|
763
|
+
sco.homeTypeit();
|
750
764
|
}
|
751
765
|
typeof updatePostsBasedOnComments === 'function' && updatePostsBasedOnComments();
|
752
766
|
if (is_post || is_page) {
|
@@ -2,4 +2,4 @@
|
|
2
2
|
* @license Copyright 2024 Ever Funnel. All rights reserved.
|
3
3
|
* Licensed under the MIT License.
|
4
4
|
*/
|
5
|
-
function waterfall(t){function e(t,e){var n=window.getComputedStyle(t);return parseFloat(n["margin"+e])||0}function n(t){return t+"px"}function r(t){return parseFloat(t.style.top)||0}function o(t){return parseFloat(t.style.left)||0}function i(t){return t.clientWidth}function l(t){return t.clientHeight}function u(t){return r(t)+l(t)+e(t,"Bottom")}function a(t){return o(t)+i(t)+e(t,"Right")}function s(t){t.sort(function(t,e){var n=u(t),r=u(e);return n===r?o(e)-o(t):r-n})}function f(e){i(t)!==containerWidth&&(window.removeEventListener(e.type,f),waterfall(t))}"string"==typeof t&&(t=document.querySelector(t));var c=Array.from(t.children).map(function(t){return(t.style.position="absolute"),t});t.style.position="relative";var p=Array.from(t.querySelectorAll("img")),y=p.map(function(t){return new Promise(function(e){t.complete?e():(t.addEventListener("load",e),t.addEventListener("error",e))})});return Promise.all(y).then(function(){var r=[];c.length&&(c[0].style.top="0px",c[0].style.left=n(e(c[0],"Left")),r.push(c[0]));for(var l=1;l<c.length;l++){var p=c[l-1],y=c[l];if(!(a(p)+i(y)<=i(t)))break;y.style.top=p.style.top;y.style.left=n(a(p));r.push(y)}for(var v=r.length;v<c.length;v++){s(r);var d=c[v],h=r.pop();d.style.top=n(u(h)+e(d,"Top"));d.style.left=n(o(h));r.push(d)}s(r);var m=r[0];t.style.height=n(u(m)+e(m,"Bottom"));i(t);window.addEventListener("resize",f)})}
|
5
|
+
function waterfall(t){function e(t,e){var n=window.getComputedStyle(t);return parseFloat(n["margin"+e])||0}function n(t){return t+"px"}function r(t){return parseFloat(t.style.top)||0}function o(t){return parseFloat(t.style.left)||0}function i(t){return t.clientWidth}function l(t){return t.clientHeight}function u(t){return r(t)+l(t)+e(t,"Bottom")}function a(t){return o(t)+i(t)+e(t,"Right")}function s(t){t.sort(function(t,e){var n=u(t),r=u(e);return n===r?o(e)-o(t):r-n})}function f(e){var containerWidth = i(t);i(t)!==containerWidth&&(window.removeEventListener(e.type,f),waterfall(t))}"string"==typeof t&&(t=document.querySelector(t));var c=Array.from(t.children).map(function(t){return(t.style.position="absolute"),t});t.style.position="relative";var p=Array.from(t.querySelectorAll("img")),y=p.map(function(t){return new Promise(function(e){t.complete?e():(t.addEventListener("load",e),t.addEventListener("error",e))})});return Promise.all(y).then(function(){var r=[];c.length&&(c[0].style.top="0px",c[0].style.left=n(e(c[0],"Left")),r.push(c[0]));for(var l=1;l<c.length;l++){var p=c[l-1],y=c[l];if(!(a(p)+i(y)<=i(t)))break;y.style.top=p.style.top;y.style.left=n(a(p));r.push(y)}for(var v=r.length;v<c.length;v++){s(r);var d=c[v],h=r.pop();d.style.top=n(u(h)+e(d,"Top"));d.style.left=n(o(h));r.push(d)}s(r);var m=r[0];t.style.height=n(u(m)+e(m,"Bottom"));i(t);window.addEventListener("resize",f)})}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
name: Code Review Bot
|
2
|
-
|
3
|
-
permissions:
|
4
|
-
contents: read
|
5
|
-
pull-requests: write
|
6
|
-
|
7
|
-
on:
|
8
|
-
pull_request:
|
9
|
-
types: [opened, reopened, synchronize]
|
10
|
-
|
11
|
-
jobs:
|
12
|
-
test:
|
13
|
-
# if: ${{ contains(github.event.*.labels.*.name, 'gpt review') }} # Optional; to run only when a label is attached
|
14
|
-
runs-on: ubuntu-latest
|
15
|
-
steps:
|
16
|
-
- uses: anc95/ChatGPT-CodeReview@main
|
17
|
-
env:
|
18
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
19
|
-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
20
|
-
# Optional
|
21
|
-
LANGUAGE: Chinese
|
22
|
-
OPENAI_API_ENDPOINT: https://api.openai.com/v1
|
23
|
-
MODEL: gpt-3.5-turbo
|
24
|
-
PROMPT:
|
25
|
-
top_p: 1
|
26
|
-
temperature: 1
|
27
|
-
max_tokens: 1000
|
28
|
-
MAX_PATCH_LENGTH: 1000
|
@@ -1,25 +0,0 @@
|
|
1
|
-
name: Close need info
|
2
|
-
|
3
|
-
on:
|
4
|
-
schedule:
|
5
|
-
- cron: "0 0 */1 * *"
|
6
|
-
workflow_dispatch:
|
7
|
-
|
8
|
-
jobs:
|
9
|
-
close-need-info:
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
steps:
|
12
|
-
- name: close-issues
|
13
|
-
uses: actions-cool/issues-helper@v3
|
14
|
-
with:
|
15
|
-
actions: "close-issues"
|
16
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
17
|
-
labels: "question"
|
18
|
-
inactive-day: 60
|
19
|
-
close-reason: "not_planned"
|
20
|
-
body: |
|
21
|
-
Hi there! This issue has been automatically closed because it has not had any activity for 60 days. We label issues as "questions" in hopes of community or maintainer input, and it seems this issue has gone stale.
|
22
|
-
|
23
|
-
If you still need assistance or believe this closure is a mistake, please feel free to reopen the issue or create a new one with updated details. We're here to help!
|
24
|
-
|
25
|
-
Thank you for your contributions to our project!
|
@@ -1,13 +0,0 @@
|
|
1
|
-
include ../widgets/page/banner
|
2
|
-
.flink.article-container
|
3
|
-
each data in site.data.tlink.links
|
4
|
-
h2= data.class_name + " (" + data.link_list.length + ")"
|
5
|
-
.flink-desc= data.descr
|
6
|
-
case data.type
|
7
|
-
when 'card'
|
8
|
-
include ../widgets/page/links/linksCard
|
9
|
-
when 'item'
|
10
|
-
include ../widgets/page/links/linksItem
|
11
|
-
when 'discn'
|
12
|
-
include ../widgets/page/links/linksDiscn
|
13
|
-
!= page.content
|
package/scripts/tags/article.js
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
const article = ([path]) => {
|
4
|
-
const post = hexo.locals.get("posts").data.find(post => post.path === path);
|
5
|
-
if (!post) return '';
|
6
|
-
|
7
|
-
const createTagLinks = tags => tags.map(tag =>
|
8
|
-
`<a class="article-meta__tags fancybox" href="${tag.path}" onclick="event.stopPropagation();">
|
9
|
-
<span class="tags-punctuation">
|
10
|
-
<i class="solitude fa-solid fa-hashtag"></i>${tag.name}
|
11
|
-
</span>
|
12
|
-
</a>`
|
13
|
-
).join('');
|
14
|
-
|
15
|
-
const createCategory = categories => categories.length > 0
|
16
|
-
? `<span class="article-meta sticky-warp">
|
17
|
-
<span class="original">${categories[0].name}</span>
|
18
|
-
</span>`
|
19
|
-
: '';
|
20
|
-
|
21
|
-
const createPostCover = post =>
|
22
|
-
`<div class="post_cover">
|
23
|
-
<a href="/${post.path}" class="fancybox" title="${post.title}">
|
24
|
-
<img class="post_bg" src="${post.cover}" alt="${post.title}">
|
25
|
-
</a>
|
26
|
-
</div>`;
|
27
|
-
|
28
|
-
const createRecentPostInfoTop = (category, post) =>
|
29
|
-
`<div class="recent-post-info-top">
|
30
|
-
<div class="recent-post-info-top-tips">${category}</div>
|
31
|
-
<a class="article-title fancybox" href="/${post.path}" title="${post.title}">${post.title}</a>
|
32
|
-
</div>`;
|
33
|
-
|
34
|
-
const createContent = description =>
|
35
|
-
`<div class="content">${description || ''}</div>`;
|
36
|
-
|
37
|
-
const createArticleMetaWrap = (tags, date) =>
|
38
|
-
`<div class="article-meta-wrap">
|
39
|
-
<span class="article-meta tags">${tags}</span>
|
40
|
-
<span class="post-meta-date">
|
41
|
-
<time datetime="${date}" style="display: inline;"></time>
|
42
|
-
</span>
|
43
|
-
</div>`;
|
44
|
-
|
45
|
-
const tags = createTagLinks(post.tags);
|
46
|
-
const category = createCategory(post.categories.data);
|
47
|
-
const postCover = createPostCover(post);
|
48
|
-
const recentPostInfoTop = createRecentPostInfoTop(category, post);
|
49
|
-
const content = createContent(post.description);
|
50
|
-
const articleMetaWrap = createArticleMetaWrap(tags, post.date);
|
51
|
-
const recentPostInfo = `<div class="recent-post-info">${recentPostInfoTop + content + articleMetaWrap}</div>`;
|
52
|
-
|
53
|
-
return `<div class="recent-post-item" onclick="pjax.loadUrl('/${post.path}')">${postCover + recentPostInfo}</div>`;
|
54
|
-
};
|
55
|
-
|
56
|
-
hexo.extend.tag.register('article', article);
|
@@ -1,38 +0,0 @@
|
|
1
|
-
#gallery
|
2
|
-
padding 16px 0
|
3
|
-
display flex
|
4
|
-
flex-wrap wrap
|
5
|
-
-webkit-box-pack start
|
6
|
-
justify-content flex-start
|
7
|
-
margin -8px
|
8
|
-
-webkit-box-align stretch
|
9
|
-
align-items stretch
|
10
|
-
|
11
|
-
#album
|
12
|
-
margin 5px auto
|
13
|
-
|
14
|
-
.locate
|
15
|
-
display flex
|
16
|
-
position absolute
|
17
|
-
left 8px
|
18
|
-
top 8px
|
19
|
-
padding 4px 6px
|
20
|
-
border-radius 8px
|
21
|
-
background var(--efu-black-op)
|
22
|
-
font-size 12px
|
23
|
-
color var(--efu-white)
|
24
|
-
transition .3s
|
25
|
-
z-index 1
|
26
|
-
user-select none
|
27
|
-
|
28
|
-
.st-gallery-item
|
29
|
-
margin-bottom 24px
|
30
|
-
overflow hidden
|
31
|
-
border-radius 8px
|
32
|
-
transition all .3s
|
33
|
-
border var(--style-border-always)
|
34
|
-
|
35
|
-
.st-gallery-image
|
36
|
-
width 100%
|
37
|
-
display block
|
38
|
-
height auto
|
File without changes
|