hexo-theme-stellar 1.18.2 → 1.18.4

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,6 +1,6 @@
1
1
  ######## Stellar info ########
2
2
  stellar:
3
- version: '1.18.2'
3
+ version: '1.18.4'
4
4
  homepage: 'https://xaoxuu.com/wiki/stellar/'
5
5
  repo: 'https://github.com/xaoxuu/hexo-theme-stellar'
6
6
  cdn_css: # Use cdn links instead of /css/main.css
@@ -79,7 +79,6 @@ search:
79
79
  field: all # post, page, all
80
80
  path: /search.json # 搜索文件存放位置
81
81
  content: true # 是否搜索内容
82
- codeblock: true # 是否搜索代码块(需要content: true)
83
82
 
84
83
 
85
84
  ######## Comments ########
@@ -126,14 +125,14 @@ comments:
126
125
  # Twikoo
127
126
  # https://twikoo.js.org/
128
127
  twikoo:
129
- js: https://fastly.jsdelivr.net/npm/twikoo@1.4.0/dist/twikoo.all.min.js # 建议锁定版本
128
+ js: https://gcore.jsdelivr.net/npm/twikoo@1.6.8/dist/twikoo.all.min.js # 建议锁定版本
130
129
  envId: https://xxx # vercel函数
131
130
 
132
131
  # Waline
133
132
  # https://waline.js.org/
134
133
  waline:
135
- js: https://unpkg.com/@waline/client@v2/dist/waline.js
136
- css: https://unpkg.com/@waline/client@v2/dist/waline.css
134
+ js: https://unpkg.com/@waline/client@2.14.1/dist/waline.js
135
+ css: https://unpkg.com/@waline/client@2.14.1/dist/waline.css
137
136
  # Waline server address url, you should set this to your own link
138
137
  serverURL:
139
138
  # If false, comment count will only be displayed in post page, not in home page
@@ -164,16 +163,16 @@ comments:
164
163
  footer:
165
164
  social:
166
165
  # github:
167
- # icon: '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.3/social/08a41b181ce68.svg"/>'
166
+ # icon: '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/social/08a41b181ce68.svg"/>'
168
167
  # url: /
169
168
  # music:
170
- # icon: '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.3/social/3845874.svg"/>'
169
+ # icon: '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/social/3845874.svg"/>'
171
170
  # url: /
172
171
  # unsplash:
173
- # icon: '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.3/social/3616429.svg"/>'
172
+ # icon: '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/social/3616429.svg"/>'
174
173
  # url: /
175
174
  # comments:
176
- # icon: '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.3/social/942ebbf1a4b91.svg"/>'
175
+ # icon: '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/social/942ebbf1a4b91.svg"/>'
177
176
  # url: /about/#comments
178
177
  sitemap:
179
178
  # '博客':
@@ -213,12 +212,12 @@ tag_plugins:
213
212
  prefix: https://bu.dusays.com/2022/10/24/63567d3e07da3.png
214
213
  # {% emoji %}
215
214
  emoji:
216
- default: https://fastly.jsdelivr.net/gh/cdn-x/emoji/qq/%s.gif
217
- twemoji: https://fastly.jsdelivr.net/gh/twitter/twemoji/assets/svg/%s.svg
218
- qq: https://fastly.jsdelivr.net/gh/cdn-x/emoji/qq/%s.gif
219
- aru: https://fastly.jsdelivr.net/gh/cdn-x/emoji/aru-l/%s.gif
220
- tieba: https://fastly.jsdelivr.net/gh/cdn-x/emoji/tieba/%s.png
221
- blobcat: https://gcore.jsdelivr.net/gh/norevi/waline-blobcatemojis@1.0/blobs/%s.png
215
+ default: https://gcore.jsdelivr.net/gh/cdn-x/emoji/qq/${name}.gif
216
+ twemoji: https://gcore.jsdelivr.net/gh/twitter/twemoji/assets/svg/${name}.svg
217
+ qq: https://gcore.jsdelivr.net/gh/cdn-x/emoji/qq/${name}.gif
218
+ aru: https://gcore.jsdelivr.net/gh/cdn-x/emoji/aru-l/${name}.gif
219
+ tieba: https://gcore.jsdelivr.net/gh/cdn-x/emoji/tieba/${name}.png
220
+ blobcat: https://gcore.jsdelivr.net/gh/norevi/waline-blobcatemojis@1.0/blobs/${name}.png
222
221
  # {% image %}
223
222
  image:
224
223
  fancybox: # true, false
@@ -237,7 +236,7 @@ tag_plugins:
237
236
  plugins:
238
237
  ## required plugins ##
239
238
  # jquery
240
- jquery: https://fastly.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js
239
+ jquery: https://gcore.jsdelivr.net/npm/jquery@3.6.2/dist/jquery.min.js
241
240
 
242
241
  # stellar api
243
242
  stellar:
@@ -256,20 +255,20 @@ plugins:
256
255
  preload:
257
256
  enable: true
258
257
  service: flying_pages # instant_page, flying_pages
259
- instant_page: https://fastly.jsdelivr.net/gh/volantis-x/cdn-volantis@4.1.2/js/instant_page.js
260
- flying_pages: https://fastly.jsdelivr.net/gh/gijo-varghese/flying-pages@2.1.2/flying-pages.min.js
258
+ instant_page: https://gcore.jsdelivr.net/gh/volantis-x/cdn-volantis@4.1.2/js/instant_page.js
259
+ flying_pages: https://gcore.jsdelivr.net/gh/gijo-varghese/flying-pages@2.1.2/flying-pages.min.js
261
260
 
262
261
  # image lazyload
263
262
  # https://www.npmjs.com/package/vanilla-lazyload
264
263
  lazyload:
265
264
  enable: true # [hexo clean && hexo s] is required after changing this value.
266
- js: https://fastly.jsdelivr.net/npm/vanilla-lazyload@17.3.1/dist/lazyload.min.js
265
+ js: https://gcore.jsdelivr.net/npm/vanilla-lazyload@17.8.3/dist/lazyload.min.js
267
266
  transition: blur # blur, fade
268
267
 
269
268
  # https://scrollrevealjs.org/api/reveal.html
270
269
  scrollreveal:
271
270
  enable: #true
272
- js: https://fastly.jsdelivr.net/npm/scrollreveal@4.0.9/dist/scrollreveal.min.js
271
+ js: https://gcore.jsdelivr.net/npm/scrollreveal@4.0.9/dist/scrollreveal.min.js
273
272
  distance: 8px
274
273
  duration: 500 # ms
275
274
  interval: 100 # ms
@@ -279,8 +278,8 @@ plugins:
279
278
  # available for {% image xxx %}
280
279
  fancybox:
281
280
  enable: true
282
- js: https://fastly.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.umd.js
283
- css: https://fastly.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.css
281
+ js: https://gcore.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.umd.js
282
+ css: https://gcore.jsdelivr.net/npm/@fancyapps/ui@4.0/dist/fancybox.css
284
283
  # 可以处理评论区的图片(不支持 iframe 类评论系统)例如:
285
284
  # 使用twikoo评论可以写: .tk-content img:not([class*="emo"])
286
285
  # 使用waline评论可以写: #waline_container .vcontent img
@@ -289,16 +288,16 @@ plugins:
289
288
  # swiper
290
289
  swiper:
291
290
  enable: true
292
- css: https://unpkg.com/swiper@8/swiper-bundle.min.css
293
- js: https://unpkg.com/swiper@8/swiper-bundle.min.js
291
+ css: https://unpkg.com/swiper@8.4.5/swiper-bundle.min.css
292
+ js: https://unpkg.com/swiper@8.4.5/swiper-bundle.min.js
294
293
 
295
294
 
296
295
  # 赫蹏 (Heti) - 专为中文网页内容设计的排版样式增强
297
296
  # https://github.com/sivan/heti
298
297
  heti:
299
298
  enable: false # 此插件会和代码块冲突,仅适用于纯中文博主。
300
- css: https://unpkg.com/heti/umd/heti.min.css
301
- js: https://unpkg.com/heti/umd/heti-addon.min.js
299
+ css: https://unpkg.com/heti@0.9.2/umd/heti.min.css
300
+ js: https://unpkg.com/heti@0.9.2/umd/heti-addon.min.js
302
301
 
303
302
  # MathJax
304
303
  # 需在Markdown文件开头加入mathjax: true
@@ -313,9 +312,9 @@ plugins:
313
312
  # 使用 hexo-renderer-markdown-it-plus 作为公式渲染器:npm uninstall hexo-renderer-marked --save npm install hexo-renderer-markdown-it-plus --save
314
313
  katex:
315
314
  enable: false
316
- min_css: <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous">
317
- min_js: <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script>
318
- auto_render_min_js: <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous"onload="renderMathInElement(document.body);"></script>
315
+ min_css: <link rel="stylesheet" href="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous">
316
+ min_js: <script defer src="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script>
317
+ auto_render_min_js: <script defer src="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous"onload="renderMathInElement(document.body);"></script>
319
318
 
320
319
  style:
321
320
  darkmode: auto # auto / always / false
@@ -350,10 +349,10 @@ style:
350
349
  hover: 'hsl(14 100% 57%)' # 按钮高亮颜色
351
350
  animated_avatar:
352
351
  animate: auto # auto, always
353
- background: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.2/avatar/round/rainbow64@3x.webp
352
+ background: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/avatar/round/rainbow64@3x.webp
354
353
  codeblock:
355
354
  scrollbar: 4px
356
- highlightjs_theme: https://fastly.jsdelivr.net/gh/highlightjs/cdn-release@11.5.0/build/styles/atom-one-dark.min.css
355
+ highlightjs_theme: https://gcore.jsdelivr.net/gh/highlightjs/cdn-release@11.7.0/build/styles/atom-one-dark.min.css
357
356
  loading:
358
357
  loading: 正在加载
359
358
  error: 加载失败,请稍后重试。
@@ -362,10 +361,10 @@ style:
362
361
  search: 'linear-gradient(to right, #04F3FF, #08FFC6, #DDF730, #FFBD19, #FF1FE0, #C418FF, #04F3FF)'
363
362
 
364
363
  default:
365
- avatar: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/avatar/round/3442075.svg
366
- link: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/link/8f277b4ee0ecd.svg
367
- cover: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/cover/76b86c0226ffd.svg
368
- image: https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/image/2659360.svg
364
+ avatar: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/avatar/round/3442075.svg
365
+ link: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/link/8f277b4ee0ecd.svg
366
+ cover: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/cover/76b86c0226ffd.svg
367
+ image: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/image/2659360.svg
369
368
 
370
369
  api_host:
371
370
  ghapi: https://api.github.com
package/layout/404.ejs CHANGED
@@ -6,7 +6,7 @@ page.header = 'auto';
6
6
  page.robots = 'none';
7
7
  %>
8
8
  <article class='md-text error-page'>
9
- <h1><img id='error' src='https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/404/1c830bfcd517d.svg' alt='404'></h1>
9
+ <h1><img id='error' src='https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/404/1c830bfcd517d.svg' alt='404'></h1>
10
10
  <p class='what'>
11
11
  <strong>
12
12
  <%- __('page.error.what') %>
@@ -64,8 +64,8 @@ function og_args() {
64
64
  <%- generate_robots() %>
65
65
 
66
66
  <meta http-equiv='x-dns-prefetch-control' content='on' />
67
- <link rel='dns-prefetch' href='https://fastly.jsdelivr.net'>
68
- <link rel="preconnect" href="https://fastly.jsdelivr.net" crossorigin>
67
+ <link rel='dns-prefetch' href='https://gcore.jsdelivr.net'>
68
+ <link rel="preconnect" href="https://gcore.jsdelivr.net" crossorigin>
69
69
  <link rel='dns-prefetch' href='//unpkg.com'>
70
70
 
71
71
  <meta name="renderer" content="webkit">
@@ -85,13 +85,13 @@ function layoutDiv() {
85
85
  }
86
86
  el += '>';
87
87
  if (item == 'wechat') {
88
- el += '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/b32ef3da1162a.svg"/>';
88
+ el += '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/social/b32ef3da1162a.svg"/>';
89
89
  } else if (item == 'weibo') {
90
- el += '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/80c07e4dbb303.svg"/>';
90
+ el += '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/social/80c07e4dbb303.svg"/>';
91
91
  } else if (item == 'email') {
92
- el += '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/a1b00e20f425d.svg"/>';
92
+ el += '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/social/a1b00e20f425d.svg"/>';
93
93
  } else if (item == 'link') {
94
- el += '<img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/social/8411ed322ced6.svg"/>';
94
+ el += '<img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/social/8411ed322ced6.svg"/>';
95
95
  }
96
96
  el += '</a>';
97
97
  }
@@ -90,7 +90,7 @@ function div_default() {
90
90
  }
91
91
  }
92
92
  if (post.pin) {
93
- el += '<span class="pin"><img src="https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/badge/3279dd441df8b.svg"/></span>';
93
+ el += '<span class="pin"><img src="https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/badge/3279dd441df8b.svg"/></span>';
94
94
  }
95
95
  el += '</div>';
96
96
  el += '</article>';
@@ -104,7 +104,7 @@
104
104
 
105
105
  // required plugins (only load if needs)
106
106
  stellar.plugins = {
107
- jQuery: '<%- url_for(theme.plugins.jquery || "https://fastly.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js") %>'
107
+ jQuery: '<%- url_for(theme.plugins.jquery || "https://gcore.jsdelivr.net/npm/jquery@3.6.2/dist/jquery.min.js") %>'
108
108
  };
109
109
 
110
110
  if ('<%- theme.search.service %>') {
package/layout/wiki.ejs CHANGED
@@ -30,7 +30,7 @@ function layoutTitle() {
30
30
  }
31
31
  %>
32
32
  <%- partial('_partial/main/navbar/breadcrumb') %>
33
- <article class='md-text content <%- page.layout %><%- scrollreveal() %>'>
33
+ <article class='md-text content <%- page.layout %><%- page.indent ? ' indent' : '' %><%- scrollreveal() %>'>
34
34
  <%- layoutTitle() %>
35
35
  <%- page.content %>
36
36
  <%- partial('_partial/main/article/article_footer') %>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-stellar",
3
- "version": "1.18.2",
3
+ "version": "1.18.4",
4
4
  "description": "Elegant and powerful theme for Hexo.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * https://github.com/wzpan/hexo-generator-search
3
3
  */
4
+ const { stripHTML } = require('hexo-util')
4
5
 
5
6
  hexo.extend.generator.register('search_json_generator', function (locals) {
6
7
  if (this.theme.config.search.service != 'local_search') { return {} }
@@ -29,46 +30,17 @@ hexo.extend.generator.register('search_json_generator', function (locals) {
29
30
  if (post.path) {
30
31
  temp_post.path = root + post.path
31
32
  }
32
- if (cfg.content != false && post._content) {
33
- var content = post._content.trim()
34
- // 过滤掉标签和注释
35
- if (content.includes('{%')) {
36
- // 需要保留内容的的标签
37
- content = content.replace(/{%\s*mark\s*(.*?)\s*%}/g, '$1')
38
- content = content.replace(/{%\s*folding\s*(.*?)\s*%}/g, '$1')
39
- content = content.replace(/{%\s*copy\s*(.*?)\s*%}/g, '$1')
40
- content = content.replace(/{%\s*note\s*(.*?)\s*%}/g, '$1')
41
- content = content.replace(/{%\s*kbd\s*(.*?)\s*%}/g, '$1')
42
- content = content.replace(/{%\s*emp\s*(.*?)\s*%}/g, '$1')
43
- content = content.replace(/{%\s*wavy\s*(.*?)\s*%}/g, '$1')
44
- content = content.replace(/{%\s*sub\s*(.*?)\s*%}/g, '$1')
45
- content = content.replace(/{%\s*sup\s*(.*?)\s*%}/g, '$1')
46
- content = content.replace(/<!--\s*folder(.*?)\s*-->/g, '$1')
47
- content = content.replace(/<!--\s*tab(.*?)\s*-->/g, '$1')
48
- content = content.replace(/<!--\s*node(.*?)\s*-->/g, '$1')
49
- // 不保留内容的标签
50
- content = content.replace(/{%\s*(.*?)\s*%}/g, '')
51
- // 注释
52
- content = content.replace(/<!--\s*(.*?)\s*-->/g, '')
53
- // ## 标题
54
- content = content.replace(/[#]{2,} /g, '')
55
- // 部分HTML标签
56
- content = content.replace(/<iframe[\s|\S]+iframe>/g, '')
57
- content = content.replace(/<hr>/g, '')
58
- content = content.replace(/<br>/g, '')
59
- // 图片
60
- content = content.replace(/\!\[(.*?)\]\((.*?)\)/g, '')
61
- // 链接
62
- content = content.replace(/\[(.*?)\]\((.*?)\)/g, '$1')
63
- // 过滤代码块
64
- if (cfg.codeblock == false) {
65
- content = content.replace(/```([^`]+)```/g, '')
66
- }
67
- // 多个连续空格换成单个空格
68
- content = content.replace(/[\s]{2,} /g, ' ')
69
- // 特殊字符
70
- content = content.replace(/[\r|\n]+/g, '')
71
- }
33
+ if (cfg.content != false && post.content) {
34
+ var content = stripHTML(post.content).trim()
35
+ // 部分HTML标签
36
+ content = content.replace(/<iframe[\s|\S]+iframe>/g, '')
37
+ content = content.replace(/<hr>/g, '')
38
+ content = content.replace(/<br>/g, '')
39
+ // 换行符换成空格
40
+ content = content.replace(/\\n/g, ' ')
41
+ content = content.replace(/\n/g, ' ')
42
+ // 多个连续空格换成单个空格
43
+ content = content.replace(/[\s]{2,}/g, ' ')
72
44
  temp_post.content = content.trim()
73
45
  }
74
46
  if (post.tags && post.tags.length > 0) {
@@ -27,7 +27,7 @@ module.exports = ctx => function(args) {
27
27
  }
28
28
  }
29
29
  if (config[args.source] && args.name) {
30
- let url = config[args.source].replace('%s', args.name)
30
+ let url = config[args.source].replace('${name}', args.name)
31
31
  el += '<img no-lazy="" class="inline"'
32
32
  el += ' src="' + url + '"'
33
33
  if (args.height) {
@@ -15,7 +15,7 @@ $color-text = convert(hexo-config('style.color.text'))
15
15
 
16
16
  // @font-face
17
17
  // font-family: 'Dosis'
18
- // src: url('https://fastly.jsdelivr.net/gh/volantis-x/cdn-fonts@20.5.30/Dosis/Dosis-Medium.ttf')
18
+ // src: url('https://gcore.jsdelivr.net/gh/volantis-x/cdn-fonts@20.5.30/Dosis/Dosis-Medium.ttf')
19
19
  // font-weight: normal
20
20
  // font-style: normal
21
21
 
@@ -23,10 +23,10 @@
23
23
  background-clip: content-box
24
24
  &.next
25
25
  border-left: 1px dashed var(--block-border)
26
- background-image: url('https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/arrow/064b95430caf4.svg')
26
+ background-image: url('https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/arrow/064b95430caf4.svg')
27
27
  &.prev
28
28
  border-right: 1px dashed var(--block-border)
29
- background-image: url('https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/arrow/f049bbd4e88ec.svg')
29
+ background-image: url('https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/arrow/f049bbd4e88ec.svg')
30
30
  .current
31
31
  font-family: $ff-code
32
32
  color: var(--text-p3)
@@ -70,7 +70,7 @@ set_darkmode_tags()
70
70
  set_dynamic_color($theme)
71
71
  --theme: $theme
72
72
  --theme-bg1: hsl(hue($theme), 50, 16)
73
- --theme-bg2: hsl(hue($theme), 32, 16)
73
+ --theme-bg2: hsl(hue($theme), 16, 16)
74
74
  --theme-border: hsl(hue($theme), 50, 24)
75
75
  --text-p0: hsl(hue($theme), 100, 85)
76
76
  --text-p1: hsl(hue($theme), 50, 75)
@@ -1,35 +1,30 @@
1
1
  .tag-plugin.folders
2
- display: block
3
- margin: 1rem 0
4
- border-radius: $border-bar
2
+ margin: var(--gap-p) 0
5
3
  font-size: $fs-14
6
- border: 1px solid var(--theme-border)
4
+ border-top: 1px solid var(--block-border)
7
5
  overflow: hidden
8
6
  .folder
9
- display: block
10
- font-size: $fs-14
11
- background: var(--block)
12
- &:last-child summary
13
- border-bottom: none
7
+ border-bottom: 1px solid var(--block-border)
8
+ padding: 1rem
14
9
  summary
15
- display: block
16
10
  cursor: pointer
17
11
  color: var(--text-p2)
18
12
  font-weight: 500
19
13
  position: relative
20
14
  line-height: 1.2
21
15
  outline: none
22
- padding: 0.75rem 1rem
23
- border-bottom: 1px solid var(--theme-border)
16
+ padding: 1rem
17
+ margin: -1rem
24
18
  &:last-child
25
19
  border-bottom: none
26
20
  >
21
+ span
22
+ margin-left: 0.25em
27
23
  p,h1,h2,h3,h4,h5,h6
28
24
  display: inline
29
25
  border-bottom: none !important
30
26
  &:hover
31
27
  color: var(--text-p0)
32
- background: var(--block-hover)
33
28
  &:after
34
29
  position: absolute
35
30
  content: '+'
@@ -40,23 +35,15 @@
40
35
 
41
36
 
42
37
  .tag-plugin.folders details[open]
43
- background: none
44
- &:last-child
45
- summary
46
- border-bottom: 1px solid var(--theme-border)
47
- .body
48
- border-bottom: none
49
38
  >summary
50
39
  color: var(--text-p1)
51
- background: var(--block-hover)
40
+ font-weight: 700
52
41
  &:after
53
42
  content: '-'
54
43
 
55
44
  >div.body
56
- padding: 1rem
57
- border-bottom: 1px solid var(--theme-border)
58
45
  font-size: $fs-15
59
46
  >:first-child
60
- margin-top: 0
47
+ margin-top: 1rem
61
48
  >:last-child
62
- margin-bottom: 0
49
+ margin-bottom: 0
@@ -2,21 +2,22 @@ details.folding
2
2
  display: block
3
3
  padding: 1rem
4
4
  margin: 1rem 0
5
- border-radius: $border-bar
6
- font-size: $fs-14
5
+ border-radius: $border-block
7
6
  background: var(--theme-bg2)
8
7
  border: 1px solid var(--theme-border)
9
8
  summary
10
9
  cursor: pointer
11
- padding: .75rem 1rem
12
- margin: 0 - 1rem
13
- border-radius: $border-bar
10
+ padding: 1rem
11
+ margin: -1rem
14
12
  color: var(--text-p2)
15
13
  font-weight: 500
14
+ font-size: $fs-14
16
15
  position: relative
17
- line-height: normal
16
+ line-height: 1.2
18
17
  outline: none
19
18
  >
19
+ span
20
+ margin-left: 0.25em
20
21
  p,h1,h2,h3,h4,h5,h6
21
22
  display: inline
22
23
  border-bottom: none !important
@@ -34,25 +35,17 @@ details.folding
34
35
 
35
36
  details.folding[open]
36
37
  >summary
37
- border-bottom: 1px solid var(--theme-border)
38
- border-bottom-left-radius: 0
39
- border-bottom-right-radius: 0
40
38
  color: var(--text-p1)
41
- margin-bottom: 0
39
+ font-weight: 700
40
+ z-index 1
42
41
  &:after
43
42
  content: '-'
44
43
  >div.body
45
- display: flex;
46
- flex-direction: column;
47
- padding: 1rem
48
- margin: 0 - 1rem
49
- margin-top: 0
50
- background: var(--card)
51
- border-bottom-left-radius: 'calc(%s - 1px)' % $border-bar
52
- border-bottom-right-radius: 'calc(%s - 1px)' % $border-bar
53
- font-size: $fs-15
44
+ padding: 0 1rem 1rem
45
+ margin: 0 -1rem -1rem
46
+ color: var(--text-p1)
54
47
  >:first-child
55
- margin-top: 0
48
+ margin-top: 1rem
56
49
  >:last-child
57
50
  margin-bottom: 0
58
51
 
@@ -65,5 +58,17 @@ details.folding[child=codeblock]>div.body
65
58
  border-radius: 0
66
59
  background: transparent
67
60
  margin: 0
61
+ figcaption
62
+ display: none
68
63
  .code:before
69
64
  content: none
65
+
66
+ details.folding[child=iframe]
67
+ overflow: hidden
68
+ background: none
69
+ >summary
70
+ background: none
71
+ >div.body
72
+ padding: 0
73
+ background: none
74
+ overflow: hidden
@@ -27,7 +27,7 @@
27
27
  margin-top: 19px
28
28
  margin-bottom: 20px
29
29
  .frame
30
- background-image: url(https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/frame/iphone11.svg);
30
+ background-image: url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/frame/iphone11.svg);
31
31
  width: 329px
32
32
  height: 658px
33
33
  &[focus='top']
@@ -53,5 +53,6 @@
53
53
  iframe
54
54
  margin: 0
55
55
 
56
+
56
57
  .md-text .tag-plugin .tag-plugin.note
57
58
  --gap-p: 1rem
@@ -0,0 +1,13 @@
1
+ .tag-plugin.note, .tag-plugin.folding
2
+ blockquote
3
+ border-top-left-radius: 0
4
+ border-bottom-left-radius: 0
5
+ background: none
6
+ padding-top: 0
7
+ padding-bottom: 0
8
+ table:not([class])
9
+ th
10
+ background: var(--block-hover)
11
+ td,th
12
+ border-color: var(--block-border)
13
+
@@ -17,7 +17,7 @@
17
17
  line-height: 1.2
18
18
 
19
19
  .md-text .tag-plugin.quot .content
20
- max-width 400px
20
+ max-width 500px
21
21
  position: relative
22
22
  // override
23
23
  .md-text.content .tag-plugin.quot
@@ -1,6 +1,3 @@
1
- .md-text .tag-plugin.folding .body:has(.timeline)
2
- background: var(--site-bg)
3
-
4
1
  .md-text .tag-plugin.timeline
5
2
  position: relative
6
3
  margin-top: 0
package/source/js/main.js CHANGED
@@ -127,7 +127,7 @@ const init = {
127
127
  const e0 = document.querySelector('.widgets')
128
128
  const e1 = document.querySelector('#data-toc a.toc-link[href="' + encodeURI(link) + '"]')
129
129
  const offsetBottom = e1.getBoundingClientRect().bottom - e0.getBoundingClientRect().bottom + 100
130
- const offsetTop = e1.getBoundingClientRect().top - e0.getBoundingClientRect().top - 80
130
+ const offsetTop = e1.getBoundingClientRect().top - e0.getBoundingClientRect().top - 64
131
131
  if (offsetTop < 0) {
132
132
  e0.scrollBy(0, offsetTop)
133
133
  } else if (offsetBottom > 0) {
@@ -86,7 +86,7 @@ $(function () {
86
86
  var cfg = new Object();
87
87
  cfg.el = el;
88
88
  cfg.api = api;
89
- cfg.avatar = 'https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/avatar/round/3442075.svg';
89
+ cfg.avatar = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/avatar/round/3442075.svg';
90
90
  FCircle.layoutDiv(cfg);
91
91
  }
92
92
  });
@@ -78,7 +78,7 @@ $(function () {
78
78
  cfg.el = el;
79
79
  cfg.api = api;
80
80
  cfg.class = el.getAttribute('class');
81
- cfg.avatar = 'https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/avatar/round/3442075.svg';
81
+ cfg.avatar = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/avatar/round/3442075.svg';
82
82
  friendsjs.layout(cfg);
83
83
  }
84
84
  });
@@ -81,8 +81,8 @@ $(function () {
81
81
  cfg.class = el.getAttribute('class');
82
82
  cfg.el = el;
83
83
  cfg.api = api;
84
- cfg.avatar = 'https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/link/8f277b4ee0ecd.svg';
85
- cfg.screenshot = 'https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/cover/76b86c0226ffd.svg';
84
+ cfg.avatar = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/link/8f277b4ee0ecd.svg';
85
+ cfg.screenshot = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/cover/76b86c0226ffd.svg';
86
86
  sitesjs.layout(cfg);
87
87
  }
88
88
  });
@@ -110,7 +110,7 @@ $(function () {
110
110
  var cfg = new Object();
111
111
  cfg.el = el;
112
112
  cfg.api = api;
113
- cfg.avatar = 'https://fastly.jsdelivr.net/gh/cdn-x/placeholder@1.0.1/avatar/round/3442075.svg';
113
+ cfg.avatar = 'https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.4/avatar/round/3442075.svg';
114
114
  weibojs.layoutDiv(cfg);
115
115
  }
116
116
  });
@@ -54,13 +54,10 @@ var searchFunc = function(path, filter, searchId, contentId) {
54
54
  }
55
55
  // perform local searching
56
56
  datas.forEach(function(data) {
57
- if (!data.title?.trim().length) { return }
58
57
  if (!data.content?.trim().length) { return }
59
58
  var matches = 0;
60
- if (filter && !data.path.includes(filter)) {
61
- return;
62
- }
63
- var dataTitle = data.title.trim();
59
+ if (filter && !data.path.includes(filter)) { return }
60
+ var dataTitle = data.title?.trim() || 'Untitled';
64
61
  var dataTitleLowerCase = dataTitle.toLowerCase();
65
62
  var dataContent = data.content;
66
63
  var dataContentLowerCase = dataContent.toLowerCase();