hexo-theme-stellar 1.30.1 → 1.30.3

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.
Files changed (66) hide show
  1. package/_config.yml +34 -25
  2. package/layout/_partial/main/article/article_footer.ejs +1 -1
  3. package/layout/_partial/main/navbar/nav_tabs_blog.ejs +4 -0
  4. package/layout/_partial/main/navbar/nav_tabs_wiki.ejs +4 -0
  5. package/layout/_partial/main/post_list/post_card.ejs +4 -3
  6. package/layout/_partial/menubtn.ejs +1 -1
  7. package/layout/_partial/scripts/utils.ejs +1 -1
  8. package/layout/layout.ejs +1 -1
  9. package/layout/page.ejs +1 -1
  10. package/package.json +1 -1
  11. package/scripts/tags/inline-labels.js +3 -0
  12. package/scripts/tags/lib/okr.js +6 -6
  13. package/scripts/tags/lib/quot.js +16 -15
  14. package/source/css/_common/base.styl +1 -1
  15. package/source/css/_common/blockquote.styl +16 -5
  16. package/source/css/_common/blur.styl +2 -2
  17. package/source/css/_common/device.styl +12 -21
  18. package/source/css/_common/pre.styl +1 -0
  19. package/source/css/_components/layout.styl +12 -4
  20. package/source/css/_components/list.styl +4 -1
  21. package/source/css/_components/md.styl +3 -46
  22. package/source/css/_components/pages/article-indent.styl +6 -0
  23. package/source/css/_components/pages/article-story.styl +120 -0
  24. package/source/css/_components/pages/article-tech.styl +35 -0
  25. package/source/css/_components/partial/article-banner.styl +12 -7
  26. package/source/css/_components/partial/article-footer.styl +25 -15
  27. package/source/css/_components/partial/navbar.styl +31 -50
  28. package/source/css/_components/partial/related.styl +1 -1
  29. package/source/css/_components/sidebar/sidebar.styl +3 -2
  30. package/source/css/_components/tag-plugins/button.styl +11 -11
  31. package/source/css/_components/tag-plugins/common.styl +7 -4
  32. package/source/css/_components/tag-plugins/friends_posts.styl +2 -2
  33. package/source/css/_components/tag-plugins/inline-labels.styl +5 -0
  34. package/source/css/_components/tag-plugins/link.styl +2 -1
  35. package/source/css/_components/tag-plugins/mark.styl +1 -1
  36. package/source/css/_components/tag-plugins/mdrender.styl +15 -0
  37. package/source/css/_components/tag-plugins/note.styl +4 -1
  38. package/source/css/_components/tag-plugins/poetry.styl +2 -0
  39. package/source/css/_components/tag-plugins/quot.styl +51 -25
  40. package/source/css/_components/tag-plugins/sites.styl +1 -0
  41. package/source/css/_components/tag-plugins/tabs.styl +8 -10
  42. package/source/css/_components/tag-plugins/timeline.styl +12 -20
  43. package/source/css/_components/widgets/ghrepo.styl +1 -1
  44. package/source/css/_components/widgets/ghuser.styl +1 -1
  45. package/source/css/_components/widgets/markdown.styl +4 -3
  46. package/source/css/_components/widgets/related.styl +1 -1
  47. package/source/css/_components/widgets/tagcloud.styl +1 -1
  48. package/source/css/_components/widgets/timeline.styl +1 -1
  49. package/source/css/_components/widgets/toc.styl +1 -1
  50. package/source/css/_components/widgets/widgets.styl +1 -1
  51. package/source/css/_custom.styl +6 -2
  52. package/source/css/_defines/const.styl +4 -0
  53. package/source/css/_defines/func.styl +37 -0
  54. package/source/css/_defines/theme.styl +9 -0
  55. package/source/js/services/artalk_latest_comment.js +2 -1
  56. package/source/js/services/fcircle.js +2 -1
  57. package/source/js/services/friends.js +2 -1
  58. package/source/js/services/friends_and_posts.js +2 -1
  59. package/source/js/services/ghinfo.js +2 -1
  60. package/source/js/services/giscus_latest_comment.js +2 -1
  61. package/source/js/services/mdrender.js +5 -2
  62. package/source/js/services/memos.js +2 -1
  63. package/source/js/services/sites.js +2 -1
  64. package/source/js/services/timeline.js +2 -1
  65. package/source/js/services/waline_latest_comment.js +2 -1
  66. package/source/js/services/weibo.js +2 -1
package/_config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  ######## Stellar info ########
2
2
  stellar:
3
- version: '1.30.1'
3
+ version: '1.30.3'
4
4
  homepage: 'https://xaoxuu.com/wiki/stellar/'
5
5
  repo: 'https://github.com/xaoxuu/hexo-theme-stellar'
6
6
  main_css: /css/main.css
@@ -10,7 +10,7 @@ stellar:
10
10
  ######## head tags ########
11
11
  preconnect:
12
12
  # - https://gcore.jsdelivr.net
13
- # - https://cdn.jsdelivr.net
13
+ # - https://gcore.jsdelivr.net
14
14
  # - https://unpkg.com
15
15
 
16
16
  open_graph:
@@ -174,6 +174,8 @@ article:
174
174
  auto_cover: false # search from https://source.unsplash.com/
175
175
  # 封面图宽高比
176
176
  cover_ratio: 2
177
+ # 文章内横幅宽高比
178
+ banner_ratio: 2.5
177
179
  # 如果没有指定横幅,是否根据 tags 作为关键词搜索横幅图片?
178
180
  auto_banner: false # search from https://source.unsplash.com/
179
181
  # 如果没有指定 excerpt 和 description,将自动取多长的内容作为文章摘要?
@@ -252,15 +254,15 @@ comments:
252
254
  # Twikoo
253
255
  # https://twikoo.js.org/
254
256
  twikoo:
255
- js: https://gcore.jsdelivr.net/npm/twikoo@1.6.8/dist/twikoo.all.min.js # 建议锁定版本
257
+ js: https://gcore.jsdelivr.net/npm/twikoo@1.6/dist/twikoo.all.min.js # 建议锁定版本
256
258
  envId: https://xxx # vercel函数
257
259
 
258
260
  # Waline
259
261
  # https://waline.js.org/
260
262
  waline:
261
- js: https://gcore.jsdelivr.net/npm/@waline/client@3.1.3/dist/waline.js
262
- css: https://gcore.jsdelivr.net/npm/@waline/client@3.1.3/dist/waline.css
263
- meta_css: https://gcore.jsdelivr.net/npm/@waline/client@3.1.3/dist/waline-meta.css
263
+ js: https://gcore.jsdelivr.net/npm/@waline/client@3.1/dist/waline.js
264
+ css: https://gcore.jsdelivr.net/npm/@waline/client@3.1/dist/waline.css
265
+ meta_css: https://gcore.jsdelivr.net/npm/@waline/client@3.1/dist/waline-meta.css
264
266
  # Waline server address url, you should set this to your own link
265
267
  serverURL: https://waline.vercel.app
266
268
  # If false, comment count will only be displayed in post page, not in home page
@@ -300,8 +302,8 @@ comments:
300
302
  # Artalk
301
303
  # https://artalk.js.org/
302
304
  artalk:
303
- css: https://unpkg.com/artalk@2.8.5/dist/Artalk.css
304
- js: https://unpkg.com/artalk@2.8.5/dist/Artalk.js
305
+ css: https://unpkg.com/artalk@2.8/dist/Artalk.css
306
+ js: https://unpkg.com/artalk@2.8/dist/Artalk.js
305
307
  server: # 后端服务地址
306
308
  placeholder: ''
307
309
  darkMode: auto
@@ -392,7 +394,7 @@ tag_plugins:
392
394
  # {% hashtag %}
393
395
  hashtag:
394
396
  default_color: # red, orange, yellow, green, cyan, blue, purple
395
- # {% okr o1 percent:0.5 status:normal %}
397
+ # {% okr o1 percent:50 status:in_track/at_risk/off_track/finished/unfinished %}
396
398
  okr:
397
399
  border: true # 是否显示边框
398
400
  status: # 可以自行增加
@@ -424,8 +426,8 @@ tag_plugins:
424
426
 
425
427
  # 基础依赖
426
428
  dependencies:
427
- jquery: https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js
428
- marked: https://cdn.jsdelivr.net/npm/marked@13.0.1/lib/marked.umd.min.js
429
+ jquery: https://gcore.jsdelivr.net/npm/jquery@3.7/dist/jquery.min.js
430
+ marked: https://gcore.jsdelivr.net/npm/marked@13.0/lib/marked.umd.min.js
429
431
 
430
432
 
431
433
  # 内置服务,按需加载(页面内用到了就会加载,没有用到就不会加载)
@@ -488,13 +490,13 @@ plugins:
488
490
  preload:
489
491
  enable: true
490
492
  service: flying_pages # flying_pages
491
- flying_pages: https://cdn.jsdelivr.net/npm/flying-pages@2/flying-pages.min.js
493
+ flying_pages: https://gcore.jsdelivr.net/npm/flying-pages@2/flying-pages.min.js
492
494
 
493
495
  # lazyload
494
496
  # https://www.npmjs.com/package/vanilla-lazyload
495
497
  lazyload:
496
498
  enable: true # [hexo clean && hexo s] is required after changing this value.
497
- js: https://cdn.jsdelivr.net/npm/vanilla-lazyload@19.1.3/dist/lazyload.min.js
499
+ js: https://gcore.jsdelivr.net/npm/vanilla-lazyload@19.1/dist/lazyload.min.js
498
500
  transition: fade # blur, fade
499
501
 
500
502
  # https://fancyapps.com/docs/ui/fancybox/
@@ -502,8 +504,8 @@ plugins:
502
504
  fancybox:
503
505
  enable: true
504
506
  loader: /js/plugins/fancybox-loader.js
505
- js: https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.umd.js
506
- css: https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.css
507
+ js: https://gcore.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.umd.js
508
+ css: https://gcore.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.css
507
509
  # 让 md 语法图片支持放大可以这样写: .md-text img:not([class]), .md-text .image img
508
510
  # 可以处理评论区的图片(不支持 iframe 类评论系统)例如:
509
511
  # 使用 twikoo 评论可以写: .tk-content img:not([class*="emo"])
@@ -513,13 +515,13 @@ plugins:
513
515
  # swiper
514
516
  swiper:
515
517
  enable: true
516
- css: https://unpkg.com/swiper@10.3.1/swiper-bundle.min.css
517
- js: https://unpkg.com/swiper@10.3.1/swiper-bundle.min.js
518
+ css: https://unpkg.com/swiper@10.3/swiper-bundle.min.css
519
+ js: https://unpkg.com/swiper@10.3/swiper-bundle.min.js
518
520
 
519
521
  # https://scrollrevealjs.org/api/reveal.html
520
522
  scrollreveal:
521
523
  enable: #true
522
- js: https://cdn.jsdelivr.net/npm/scrollreveal@4.0.9/dist/scrollreveal.min.js
524
+ js: https://gcore.jsdelivr.net/npm/scrollreveal@4.0/dist/scrollreveal.min.js
523
525
  distance: 16px
524
526
  duration: 800 # ms
525
527
  interval: 100 # ms
@@ -552,7 +554,7 @@ plugins:
552
554
  katex:
553
555
  enable: #true # hexo-renderer-markdown-it-plus 默认开启 katex,此选项仅用于引入样式
554
556
  inject: |
555
- <link rel="stylesheet" href="https://gcore.jsdelivr.net/npm/katex@0.16.4/dist/katex.min.css" integrity="sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0" crossorigin="anonymous">
557
+ <link rel="stylesheet" href="https://gcore.jsdelivr.net/npm/katex@0.16/dist/katex.min.css" integrity="sha384-vKruj+a13U8yHIkAyGgK1J3ArTLzrFGBbBc0tDp4ad/EyewESeXE/Iv67Aj8gKZ0" crossorigin="anonymous">
556
558
 
557
559
  # MathJax
558
560
  # 需在Markdown文件开头加入mathjax: true
@@ -574,7 +576,7 @@ plugins:
574
576
  enable: # true # 可以在特定文章的 front-matter 中设置 mermaid: true 来开启,也可以在这里设置全局开启
575
577
  style_optimization: false # use custom style in stellar
576
578
  # js: https://unpkg.com/mermaid@9.0.0/dist/mermaid.min.js
577
- js: https://cdn.jsdelivr.net/npm/mermaid@v9/dist/mermaid.min.js
579
+ js: https://gcore.jsdelivr.net/npm/mermaid@v9/dist/mermaid.min.js
578
580
  # Available themes: default | dark | forest | neutral
579
581
  theme: neutral
580
582
 
@@ -589,8 +591,8 @@ plugins:
589
591
  # https://github.com/sivan/heti
590
592
  heti:
591
593
  enable: false # 此插件会和代码块冲突,仅适用于纯中文博主。
592
- css: https://unpkg.com/heti@0.9.2/umd/heti.min.css
593
- js: https://unpkg.com/heti@0.9.2/umd/heti-addon.min.js
594
+ css: https://unpkg.com/heti@0.9/umd/heti.min.css
595
+ js: https://unpkg.com/heti@0.9/umd/heti-addon.min.js
594
596
 
595
597
 
596
598
 
@@ -611,8 +613,9 @@ style:
611
613
  prefix:
612
614
  h2: https://api.iconify.design/ci:heading-h2.svg
613
615
  border-radius:
614
- card-l: 16px # 侧边栏、文章横幅位置的圆角
615
- card: 12px # 文章内大部分卡片的圆角
616
+ card-l: 24px # 侧边栏、文章横幅位置的圆角
617
+ card: 16px # 文章内大部分卡片的圆角
618
+ card-s: 12px # 文章内小型卡片的圆角
616
619
  bar: 8px # 横条类元素的圆角
617
620
  image: 12px # 图片圆角
618
621
  color:
@@ -631,7 +634,7 @@ style:
631
634
  background: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/rainbow64@3x.webp
632
635
  codeblock:
633
636
  scrollbar: 4px
634
- highlightjs_theme: https://gcore.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/atom-one-dark.min.css
637
+ highlightjs_theme: https://gcore.jsdelivr.net/gh/highlightjs/cdn-release@11.9/build/styles/atom-one-dark.min.css
635
638
  loading:
636
639
  loading: 正在加载
637
640
  error: 加载失败,请稍后重试。
@@ -651,6 +654,12 @@ style:
651
654
  background-image: #'url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.14/image/site-bg1@small.webp)' # 未完全适配,慎用
652
655
  blur-px: 100px
653
656
  blur-bg: var(--alpha75)
657
+ # 技术文章内页各级标题前面的符号
658
+ header_prefix:
659
+ h2: '⌘'
660
+ h3: '='
661
+ h4: '|'
662
+ h5: ':'
654
663
 
655
664
 
656
665
  default:
@@ -14,7 +14,7 @@ function layoutDiv() {
14
14
  if (item.length === 0) {
15
15
  return el;
16
16
  }
17
- el += `<div class="article-footer${scrollreveal(' ')} fs14">`
17
+ el += `<div class="article-footer${scrollreveal(' ')}">`
18
18
  if (page.references?.length > 0) {
19
19
  function refList() {
20
20
  var el = '';
@@ -2,6 +2,8 @@
2
2
  function layoutDiv() {
3
3
  var el = '';
4
4
  el += '<div class="navbar top">';
5
+ el += '<div class="navbar-blur">';
6
+ el += '<div class="navbar-container">';
5
7
  el += '<nav class="post">';
6
8
  if (is_home()) {
7
9
  el += '<a class="active" href="' + url_for(config.index_generator.path) + '">' + __("btn.recent_publish") + '</a>';
@@ -60,6 +62,8 @@ function layoutDiv() {
60
62
 
61
63
  el += '</nav>';
62
64
  el += '</div>';
65
+ el += '</div>';
66
+ el += '</div>';
63
67
  return el;
64
68
  }
65
69
  %>
@@ -2,6 +2,8 @@
2
2
  function layoutDiv() {
3
3
  var el = '';
4
4
  el += '<div class="navbar top">';
5
+ el += '<div class="navbar-blur">';
6
+ el += '<div class="navbar-container">';
5
7
  el += '<nav class="wiki">';
6
8
  // 所有项目
7
9
  el += '<a';
@@ -40,6 +42,8 @@ function layoutDiv() {
40
42
 
41
43
  el += '</nav>';
42
44
  el += '</div>';
45
+ el += '</div>';
46
+ el += '</div>';
43
47
  return el;
44
48
  }
45
49
  %>
@@ -83,10 +83,11 @@ function div_default() {
83
83
  });
84
84
  }
85
85
  if (cats.length > 0) {
86
- let cat = cats.shift();
87
- el += '<span class="cap breadcrumb"' + category_color(cat) + '>';
86
+ let str = cats.join(' / ');
87
+ let lastCat = cats.pop();
88
+ el += '<span class="cap breadcrumb"' + category_color(lastCat) + '>';
88
89
  el += icon('default:category')
89
- el += `<span>${cat}</span>`
90
+ el += `<span>${str}</span>`
90
91
  el += '</span>';
91
92
  }
92
93
  }
@@ -1,4 +1,4 @@
1
- <div class='float-panel blur'>
1
+ <div class='float-panel'>
2
2
  <button type='button' style='display:none' class='laptop-only rightbar-toggle mobile' onclick='sidebar.rightbar()'>
3
3
  <%- icon('default:rightbar') %>
4
4
  </button>
@@ -172,7 +172,7 @@
172
172
  status = 1;
173
173
  }
174
174
  if (response.ok) {
175
- return response.json();
175
+ return response;
176
176
  }
177
177
  throw new Error('Network response was not ok.');
178
178
  }).then(function (data) {
package/layout/layout.ejs CHANGED
@@ -46,7 +46,7 @@ if (theme.style.prefers_theme === 'auto') {
46
46
  html += `<body>`
47
47
  html += site_background
48
48
  html += partial('_partial/cover/index')
49
- html += `<div class="l_body ${page_type} ${article_type}" id="start" layout="${page.layout}" ${indent ? 'text-indent' : ''}>`
49
+ html += `<div class="l_body ${page_type}" id="start" layout="${page.layout}" type="${article_type}" ${indent ? 'text-indent' : ''}>`
50
50
  html += `<aside class="l_left">`
51
51
  html += `<div class="leftbar-container${theme.style.leftbar?.blur ? ' leftbar-blur' : ''}">`
52
52
  html += partial('_partial/sidebar/index_leftbar')
package/layout/page.ejs CHANGED
@@ -50,10 +50,10 @@ function layoutDiv() {
50
50
  if (notebook) {
51
51
  el += partial('_partial/main/notebook/note_tags', { notebook: notebook })
52
52
  }
53
+ el += `</article>`
53
54
  if (layout === 'post' || page.wiki || notebook) {
54
55
  el += partial('_partial/main/article/article_footer')
55
56
  }
56
- el += `</article>`
57
57
  if (layout === 'post' || page.wiki) {
58
58
  el += partial('_partial/main/article/read_next')
59
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-stellar",
3
- "version": "1.30.1",
3
+ "version": "1.30.3",
4
4
  "description": "Elegant and powerful theme for Hexo.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -26,6 +26,9 @@ hexo.extend.tag.register('kbd', function(args) {
26
26
  hexo.extend.tag.register('psw', function(args) {
27
27
  return `<psw>${args.join(' ')}</psw>`
28
28
  })
29
+ hexo.extend.tag.register('blur', function(args) {
30
+ return `<blur>${args.join(' ')}</blur>`
31
+ })
29
32
  hexo.extend.tag.register('sup', function(args) {
30
33
  args = hexo.args.map(args, ['color'], ['text'])
31
34
  var el = ''
@@ -1,10 +1,10 @@
1
1
  /**
2
- * okr.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
2
+ * okr.js v2 | https://github.com/xaoxuu/hexo-theme-stellar/
3
3
  *
4
- * {% okr o1 percent:0.5 status:delay %}
4
+ * {% okr o1 percent:50 status:in_track/at_risk/off_track/finished/unfinished %}
5
5
  * title (only one line)
6
6
  * note
7
- * <!-- okr kr1 percent:1 -->
7
+ * <!-- okr kr1 percent:100 status:in_track/at_risk/off_track/finished/unfinished -->
8
8
  * title (only one line)
9
9
  * note
10
10
  * {% endokr %}
@@ -54,7 +54,7 @@ function generateKRList(ctx, contentArray) {
54
54
  }
55
55
 
56
56
  function layoutItem(ctx, type, index, title, note, color, label, percent) {
57
- const percentStr = (percent * 100).toString().replace(/\.\d*/, '')
57
+ const percentStr = percent.toString().replace(/\.\d*/, '')
58
58
  return `
59
59
  <div class="okr-item ${type}" id="okr-${index.toLowerCase()}">
60
60
  <div class="okr-left">
@@ -102,7 +102,7 @@ module.exports = ctx => function(args, content = '') {
102
102
  status = statusList[krMeta.status]
103
103
  }
104
104
  if (status == null) {
105
- if (krPercent >= 1) {
105
+ if (krPercent >= 100) {
106
106
  status = statusList['finished']
107
107
  } else {
108
108
  status = statusList['in_track']
@@ -122,7 +122,7 @@ module.exports = ctx => function(args, content = '') {
122
122
  status = statusList[args.status]
123
123
  }
124
124
  if (status == null) {
125
- if (oPercent >= 1) {
125
+ if (oPercent >= 100) {
126
126
  status = statusList['finished']
127
127
  } else {
128
128
  status = statusList['in_track']
@@ -16,17 +16,20 @@ module.exports = ctx => function (args) {
16
16
  args.el = 'p'
17
17
  }
18
18
 
19
- var type = ''
20
- if (args.icon || args.prefix || args.suffix) {
21
- type = ' type="icon"'
22
- } else {
23
- type = ' type="text"'
24
- }
25
19
  function content() {
26
- const cfg = ctx.theme.config.tag_plugins.quot[args.icon]
20
+ const cfg = ctx.theme.config.tag_plugins.quot[args.icon || 'default']
27
21
  var el = ''
28
- var prefix = args.prefix || cfg?.prefix
29
- var suffix = args.suffix || cfg?.suffix
22
+ var prefix = null
23
+ var suffix = null
24
+ if (args.prefix || args.suffix) {
25
+ // 临时设定的样式
26
+ prefix = args.prefix
27
+ suffix = args.suffix
28
+ } else {
29
+ // yml中配置的样式
30
+ prefix = cfg?.prefix
31
+ suffix = cfg?.suffix
32
+ }
30
33
  if (prefix) {
31
34
  el += ctx.utils.icon(prefix, 'class="icon prefix"')
32
35
  } else {
@@ -40,18 +43,16 @@ module.exports = ctx => function (args) {
40
43
  }
41
44
  return el
42
45
  }
46
+ el += `<div class="tag-plugin quot ${args.el}">`
43
47
  if (args.el.includes('h')) {
44
- el += '<div' + ' class="tag-plugin quot">'
45
- el += '<' + args.el + ' class="content" id="' + args.text + '"' + type + '>'
48
+ el += `<${args.el} class="content" id="${args.text}">`
46
49
  el += content()
47
50
  el += '</' + args.el + '>'
48
- el += '</div>'
49
51
  } else {
50
- el += '<div' + ' class="tag-plugin quot">'
51
- el += '<' + args.el + ' class="content"' + type + '>'
52
+ el += `<${args.el} class="content">`
52
53
  el += content()
53
54
  el += '</' + args.el + '>'
54
- el += '</div>'
55
55
  }
56
+ el += '</div>'
56
57
  return el
57
58
  }
@@ -29,7 +29,7 @@ li
29
29
 
30
30
 
31
31
  ul,ol
32
- padding-left: 1.5rem
32
+ padding-left: var(--fsp)
33
33
 
34
34
 
35
35
  // table
@@ -2,9 +2,20 @@ blockquote
2
2
  display: block
3
3
  margin-left: 0
4
4
  margin-right: 0
5
- padding: 0.25rem 0.75rem
6
- background: var(--block)
5
+ padding: 0 var(--fsp)
7
6
  $bd-left = 4px
8
- border-left: $bd-left solid var(--text-meta)
9
- border-radius: $bd-left $border-card $border-card $bd-left
10
- color: var(--text-p2)
7
+ color: var(--text-p3)
8
+ position: relative
9
+ &:before
10
+ trans1 all
11
+ content: ''
12
+ position: absolute
13
+ top: 0
14
+ bottom: 0
15
+ width 4px
16
+ border-radius: 1px
17
+ left: 0
18
+ opacity: 0.5
19
+ background: var(--text-meta)
20
+ &:hover:before
21
+ background: $color-theme
@@ -6,8 +6,8 @@ blur-effect()
6
6
  background: var(--blur-bg)
7
7
  @supports ((-webkit-backdrop-filter:blur(var(--blur-px))) or (backdrop-filter:blur(var(--blur-px))))
8
8
  background: var(--blur-bg) !important
9
- backdrop-filter: saturate(200%) blur(var(--blur-px))
10
- -webkit-backdrop-filter: saturate(200%) blur(var(--blur-px))
9
+ backdrop-filter: saturate(300%) blur(var(--blur-px))
10
+ -webkit-backdrop-filter: saturate(300%) blur(var(--blur-px))
11
11
  &:hover
12
12
  background: var(--card)
13
13
 
@@ -10,35 +10,32 @@
10
10
  .float-panel
11
11
  position: sticky
12
12
  grid-column-end: span 3
13
+ padding: 4px
14
+ --inset: 2rem
13
15
  right: 0
14
- bottom: 2rem
16
+ bottom: calc(var(--inset) * 2)
17
+ margin-left: auto
18
+ margin-right: var(--inset)
15
19
  float: right
16
20
  z-index: 10
17
21
  display: flex
22
+ justify-content: center
18
23
  flex-direction: column
19
- border-radius: $border-bar
20
- margin-left: auto
21
- margin-right: 1rem
24
+ border-radius: 64px
22
25
  @media screen and (min-width: $device-mobile-max)
23
- margin-right: 2rem
26
+ margin-right: 3rem
24
27
  overflow: hidden
25
- --blur-px: 16px
26
- --blur-bg: alpha(#fff, .4)
27
28
  trans1: all
28
- ondark()
29
- --blur-bg: alpha(#000, .4)
30
- :root[data-theme="dark"] &
31
- ondark()
32
- :root:not([data-theme]) &
33
- @media (prefers-color-scheme: dark)
34
- ondark()
29
+ newblur()
30
+
35
31
 
36
32
  // 侧边栏弹出按钮
37
33
  .float-panel button
38
34
  cursor: pointer
39
35
  color: var(--text)
40
36
  background: none
41
- padding: 8px
37
+ width: 40px
38
+ height: 40px
42
39
  line-height: 0
43
40
  font-size: 28px
44
41
  margin: 0
@@ -53,9 +50,6 @@
53
50
  .l_body[leftbar] .float-panel, .l_body[rightbar] .float-panel
54
51
  box-shadow: 0 0 4px -1px $color-theme, 0 0 16px -4px $color-theme, 0 0 32px -12px $color-theme, 0 0 128px -32px $color-theme
55
52
 
56
- .l_body[leftbar] .float-panel button.leftbar-toggle
57
- background: var(--alpha100)
58
-
59
53
  .l_body[leftbar] .float-panel button.leftbar-toggle
60
54
  color: $color-theme
61
55
  border-color: var(--block-border)
@@ -70,9 +64,6 @@
70
64
  .l_body .l_right:empty+.float-panel button.rightbar-toggle
71
65
  display: none !important
72
66
 
73
- .l_body[rightbar] .float-panel button.rightbar-toggle
74
- background: var(--alpha100)
75
-
76
67
  .l_body[rightbar] .float-panel button.rightbar-toggle
77
68
  color: $color-theme
78
69
  border-color: var(--block-border)
@@ -2,5 +2,6 @@ pre:not([class]):has(>code)
2
2
  display: block
3
3
  padding: 1rem
4
4
  overflow: auto
5
+ scrollbar(0,0)
5
6
  code
6
7
  padding: 0
@@ -35,11 +35,13 @@
35
35
  .l_right
36
36
  top: 8px
37
37
  position: fixed
38
- max-height: calc(100% - 8px * 2)
39
38
  transform: translateX(320px)
40
39
  transition: transform .38s ease-out
41
40
  margin: 0
42
- right: 8px
41
+ --inset: 8px
42
+ right: var(--inset)
43
+ top: var(--inset)
44
+ max-height: 'calc(%s - 96px)' % (100vh)
43
45
  box-shadow: $boxshadow-card-float
44
46
  z-index: 10
45
47
  background: var(--site-bg)
@@ -66,7 +68,13 @@
66
68
  transform: translateX(-320px)
67
69
  transition: transform .38s ease-out
68
70
  margin: 0
69
- left: 8px
71
+ --inset: 8px
72
+ left: var(--inset)
73
+ top: var(--inset)
74
+ max-height: 'calc(%s - 96px)' % (100vh)
75
+ .leftbar-container
76
+ --inset: 8px
77
+ height: 'calc(%s - 96px)' % (100vh)
70
78
  box-shadow: $boxshadow-card-float
71
79
  z-index: 10
72
80
  .l_main
@@ -75,7 +83,7 @@
75
83
  .l_left
76
84
  transform: translateX(0px)
77
85
  .main-mask
78
- opacity 1
86
+ // opacity 1
79
87
  pointer-events: inherit
80
88
 
81
89
 
@@ -32,10 +32,13 @@
32
32
  --img-br: 100%
33
33
  --img-sat: 100%
34
34
  --blur-px: 1em
35
+ --blur-height: 128px
35
36
  --blur-sat: 120%
36
37
  &:hover
37
38
  --img-br: 75%
38
39
  --img-sat: 120%
40
+ // --blur-px: 0
41
+ // --blur-height: 0
39
42
  --blur-sat: 200%
40
43
  img
41
44
  filter: brightness(var(--img-br)) saturate(var(--img-sat))
@@ -115,7 +118,7 @@
115
118
  position: absolute
116
119
  left: 0
117
120
  right: 0
118
- height: 128px
121
+ height: var(--blur-height)
119
122
  backdrop-filter: saturate(var(--blur-sat)) blur(var(--blur-px))
120
123
  trans1 all
121
124
  &[position=top]:before
@@ -19,26 +19,6 @@
19
19
  padding-bottom: 2rem
20
20
  overflow: hidden
21
21
 
22
- .l_body[text-indent] .md-text.content
23
- // 应用缩进效果
24
- p:not([class])
25
- text-indent: 'calc(%s * 2)' % var(--fsp)
26
- text-align: justify
27
- a
28
- text-indent: 0
29
- ol,ul
30
- margin-left: 0.5em
31
- h1,h2,h3,h4,h5,h6
32
- text-align: center
33
- >a:first-child
34
- display: none
35
- h2
36
- margin: 2em 0 1.5em
37
- // 取消缩进效果
38
- blockquote, .poetry, .okr, .timeline, li, .article-footer
39
- p:not([class])
40
- text-indent: 0
41
- text-align: convert(hexo-config('style.text-align'))
42
22
 
43
23
  .md-text
44
24
  ul:not(:last-child),
@@ -68,27 +48,6 @@
68
48
 
69
49
  // titles
70
50
  .md-text.content
71
- h1,h2,h3,h4,h5,h6
72
- color: var(--text)
73
- line-height: 1.8
74
- >a:first-child
75
- background: $color-theme
76
- border-radius: 2px
77
- margin-right: 8px
78
- trans1 background
79
- &:hover
80
- background: $color-hover
81
- &:before
82
- content: ''
83
- color: white
84
- font-weight: 700
85
- padding: 0 2px
86
- font-size: $fs-12
87
- h2
88
- font-weight: 500
89
- >a:first-child:before
90
- content: ':'
91
-
92
51
  blockquote, .tag-plugin
93
52
  h2,h3,h4,h5,h6
94
53
  margin-top: 0.25em
@@ -114,22 +73,21 @@
114
73
  .md-text>div
115
74
  margin: var(--gap-p) 0
116
75
 
117
-
76
+ // 图片样式
118
77
  .md-text img
119
78
  border-radius: $border-image
120
79
  margin: auto
121
80
  display: block
122
81
 
82
+ // 链接样式
123
83
  li:not([class]) a:not([class])
124
84
  p:not([class]) a:not([class])
125
85
  table a:not([class])
126
86
  position: relative
127
87
  text-decoration: none
128
88
  trans1 all
129
- padding: 0 2px
130
89
  border-radius: 0
131
- color: inherit
132
- background: linear-gradient(0deg,var(--theme-link),var(--theme-link)) no-repeat left 100%/100% 1px
90
+ background: linear-gradient(0deg,var(--block-border),var(--block-border)) no-repeat left 100%/100% 2px
133
91
  &:hover
134
92
  text-decoration: none
135
93
  color: var(--theme-link)
@@ -137,6 +95,5 @@ table a:not([class])
137
95
  background: linear-gradient(0deg,var(--theme-link-opa),var(--theme-link-opa)) no-repeat left 100%/100% 100%
138
96
  &:has(img)
139
97
  background: none
140
- padding: 0
141
98
  &:hover
142
99
  background: none