hexo-theme-solitude 2.1.15 → 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 CHANGED
@@ -1,11 +1,11 @@
1
1
  # ---------------------------
2
2
  # Hexo Theme Solitude
3
- # Author: Ever Fu
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.ico # Site icon / 网站图标
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: # 宁静致远 <br> 热爱生活 # 标题
73
- url: Hexo Theme Solitude # 小字
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'
@@ -25,7 +25,7 @@ div
25
25
  if theme.chart
26
26
  script(src=url_for(theme.cdn.chart_js))
27
27
 
28
- if theme.typeit
28
+ if theme.typeit || typeof theme.hometop.banner.desc === 'object'
29
29
  script(src=url_for(theme.cdn.typeit_js))
30
30
 
31
31
  if theme.display_mode.universe
@@ -55,4 +55,4 @@ if theme.says.enable
55
55
  if theme.says.strip === -1
56
56
  = _p('essay.tip0')
57
57
  else
58
- = _p('essay.tip1').replace('{count}', theme.says.strip)
58
+ = _p('essay.tip1').replace('#{count}', theme.says.strip)
@@ -0,0 +1,3 @@
1
+ if page.banner
2
+ include ../widgets/page/banner
3
+ include ../widgets/page/kit/content
@@ -1,7 +1,9 @@
1
- .flink#banners
2
- include ../widgets/page/links/banner
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.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, url, icon} = theme.hometop.banner
1
+ - const { title, desc, icon} = theme.hometop.banner
2
2
 
3
3
  div.banners-title
4
4
  div.banners-title-big!= title
5
- div.banners-title-small= url
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
@@ -10,10 +10,12 @@ if skills || careers
10
10
  span.author-content-item-title= skills.subtitle
11
11
  .skills-style-group
12
12
  .tags-group-all
13
- .tags-group-wrapper
13
+ - let times = 4 * (skills.tags.length? Math.ceil(20/skills.tags.length):0)
14
+ - let length = times * skills.tags.length
15
+ - let duration = length * 1200 - 900
16
+ .tags-group-wrapper(style=`animation-duration: ${duration}ms`)
14
17
  - var pair = []
15
- - let times = skills.tags.length? Math.ceil(20/skills.tags.length):0
16
- - for (let i = 0; i < 4 * times; i++)
18
+ - for (let i = 0; i < times; i++)
17
19
  each tag, index in skills.tags
18
20
  - pair.push(tag)
19
21
  if pair.length === 2
@@ -1,6 +1,7 @@
1
+ - var $data = page.data
1
2
  #equipment
2
- if site.data.equipment
3
- each i in site.data.equipment
3
+ if $data
4
+ each i in site.data[$data]
4
5
  .equipment-item
5
6
  h2.equipment-item-title= i.class_name
6
7
  .equipment-item-description= i.description
@@ -14,18 +14,18 @@
14
14
 
15
15
  - if (site.data.links.swiper !== false)
16
16
  .tags-group-all.nowrapMove
17
- .tags-group-wrapper
18
- - const data = site.data.links.links
19
- - var links = []
20
- each x in data
21
- each y in x.link_list
22
- - links.push(y)
23
- - if (links.length)
24
- - let originalLinks = links
25
- - while (links.length<20)
26
- - links = links.concat(originalLinks)
27
- each i in [1,2]
28
- - links = links.concat(links)
17
+ - const data = site.data.links.links
18
+ - var links = []
19
+ each x in data
20
+ each y in x.link_list
21
+ - links.push(y)
22
+ - let times = 4 * (links.length? Math.ceil(20/links.length):0)
23
+ - let length = times * links.length
24
+ - let duration = length * 1500 - 1400
25
+ - let originalLinks = links
26
+ - for (let i = 1; i < times; i++)
27
+ - links = links.concat(originalLinks)
28
+ .tags-group-wrapper(style=`animation-duration: ${duration}ms`)
29
29
  - var pairs = []
30
30
  each link, index in links
31
31
  if (index % 2 === 0)
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 'says'
18
- include includes/page/says
19
- when 'equipment'
20
- include includes/page/equipment
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-solitude",
3
- "version": "2.1.15",
3
+ "version": "3.0.0",
4
4
  "description": "A beautiful, powerful, and efficient Hexo theme developed by everfu.",
5
5
  "main": "package.json",
6
6
  "scripts": {
package/plugins.yml CHANGED
@@ -111,7 +111,7 @@ mermaid_js:
111
111
  chart_js:
112
112
  name: chart.js
113
113
  file: dist/chart.umd.js
114
- version: 4.4.1
114
+ version: 4.4.7
115
115
  other_name: Chart.js
116
116
  typeit_js:
117
117
  name: typeit
@@ -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
- name: 'hexo-theme-solitude',
19
- file: 'js/main.js',
20
- version
21
- },
22
- utils: {
23
- name: 'hexo-theme-solitude',
24
- file: 'js/utils.js',
25
- version
26
- },
27
- local_search: {
28
- name: 'hexo-theme-solitude',
29
- file: 'js/search/local.js',
30
- version
31
- },
32
- algolia_js: {
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 = 'css/index.css' + (CDN.version ? `?v=${version}` : '')
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 i in obj) {
137
- obj[i] === null && delete obj[i]
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: {
@@ -13,5 +13,6 @@ hexo.extend.helper.register('page_description', function () {
13
13
  })
14
14
 
15
15
  hexo.extend.helper.register("urlNoIndex", function (url = null) {
16
- return prettyUrls(url || this.url, { trailing_index: false, trailing_html: true });
16
+ const { config } = this
17
+ return prettyUrls(url || this.url, config.pretty_urls);
17
18
  });
@@ -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
@@ -282,7 +282,7 @@
282
282
  code
283
283
  kbd
284
284
  samp
285
- font-family ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace
285
+ font-family $code-font-family
286
286
 
287
287
  pre
288
288
  background var(--efu-secondbg)
@@ -100,7 +100,7 @@
100
100
  flex-direction row
101
101
  width 100%
102
102
  max-width 1200px
103
- justify-content space-between
103
+ justify-content space-evenly
104
104
  flex-wrap wrap
105
105
  margin 1rem auto 3rem
106
106
  padding 0 1rem
@@ -34,7 +34,7 @@
34
34
  margin-right auto
35
35
  width 100%
36
36
  font-size 36px
37
- font-family Helvetica
37
+ font-family $font-family
38
38
  line-height 1.06
39
39
  letter-spacing -.02em
40
40
  color var(--efu-fontcolor)
@@ -57,7 +57,7 @@
57
57
  padding .5rem
58
58
  text-align center
59
59
  font-size 14px
60
- font-family "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei"
60
+ font-family $font-family
61
61
 
62
62
  +maxWidth768()
63
63
  width 100%
@@ -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
- if $equipment
22
- @import "equipment.styl"
21
+ @import "equipment.styl"
23
22
 
24
- if $link
25
- @import "links.styl"
23
+ @import "links.styl"
26
24
 
27
- if $about
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
 
@@ -691,7 +704,7 @@ class tabs {
691
704
  const { expire } = GLOBAL_CONFIG;
692
705
  if (!expire) return;
693
706
  const list = document.querySelectorAll('.post-meta-date time');
694
- const post_date = list.length ? list[list.length - 1] : document.querySelector('.datatime');
707
+ const post_date = list.length ? list[list.length - 1] : document.querySelector('.datetime');
695
708
  if (!post_date) return;
696
709
  const ex = Math.ceil((new Date().getTime() - new Date(post_date.getAttribute('datetime')).getTime()) / 1000 / 60 / 60 / 24);
697
710
  if (expire.time > ex) return;
@@ -734,7 +747,7 @@ const forPostFn = () => {
734
747
  window.refreshFn = () => {
735
748
  const { is_home, is_page, page, is_post } = PAGE_CONFIG;
736
749
  const { runtime, lazyload, lightbox, randomlink, covercolor, post_ai, lure, expire } = GLOBAL_CONFIG;
737
- const timeSelector = (is_home ? '.post-meta-date time' : is_post ? '.post-meta-date time' : '.datatime') + ', .webinfo-item time';
750
+ const timeSelector = (is_home ? '.post-meta-date time' : is_post ? '.post-meta-date time' : '.datetime') + ', .webinfo-item time';
738
751
  document.body.setAttribute('data-type', page);
739
752
  sco.changeTimeFormat(document.querySelectorAll(timeSelector));
740
753
  runtime && sco.addRuntime();
@@ -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) {
@@ -123,7 +123,7 @@ window.oncontextmenu = (ele) => {
123
123
 
124
124
  rm.menuItems.copy.style.display = selectTextNow && window.getSelection() ? "flex" : "none";
125
125
  GLOBAL_CONFIG.comment && (rm.menuItems.comment.style.display = selectTextNow && window.getSelection() ? "flex" : "none");
126
- rm.menuItems.search.style.display = selectTextNow && window.getSelection() ? "flex" : "none";
126
+ rm.menuItems.search && (rm.menuItems.search.style.display = selectTextNow && window.getSelection() ? "flex" : "none");
127
127
 
128
128
  rm.menuItems.new.style.display = link ? "flex" : "none";
129
129
  rm.menuItems.copyLink.style.display = link ? "flex" : "none";
@@ -198,4 +198,4 @@ window.oncontextmenu = (ele) => {
198
198
  addEventListener(rm.menuItems.downloadImg, "click", () => rm.downloadImage() && rm.hideRightMenu());
199
199
  addEventListener(rm.menuItems.copyImg, "click", () => rm.copyImage() && rm.hideRightMenu());
200
200
  addEventListener(rm.menuItems.copyLink, "click", () => rm.copyText(rm.domhref) && rm.hideRightMenu());
201
- })();
201
+ })();
@@ -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,2 +0,0 @@
1
- include ../widgets/page/banner
2
- include ../widgets/page/equipment/content
@@ -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
@@ -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