hexo-theme-stellar 1.30.1 → 1.30.2

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 (56) hide show
  1. package/_config.yml +28 -25
  2. package/layout/_partial/main/article/article_footer.ejs +1 -1
  3. package/layout/_partial/main/post_list/post_card.ejs +4 -3
  4. package/layout/_partial/scripts/utils.ejs +1 -1
  5. package/layout/layout.ejs +1 -1
  6. package/layout/page.ejs +1 -1
  7. package/package.json +1 -1
  8. package/scripts/tags/inline-labels.js +3 -0
  9. package/scripts/tags/lib/okr.js +6 -6
  10. package/scripts/tags/lib/quot.js +16 -15
  11. package/source/css/_common/base.styl +1 -1
  12. package/source/css/_common/blockquote.styl +16 -5
  13. package/source/css/_common/pre.styl +1 -0
  14. package/source/css/_components/list.styl +4 -1
  15. package/source/css/_components/md.styl +3 -46
  16. package/source/css/_components/pages/article-indent.styl +6 -0
  17. package/source/css/_components/pages/article-story.styl +120 -0
  18. package/source/css/_components/pages/article-tech.styl +35 -0
  19. package/source/css/_components/partial/article-banner.styl +12 -7
  20. package/source/css/_components/partial/article-footer.styl +24 -14
  21. package/source/css/_components/partial/related.styl +1 -1
  22. package/source/css/_components/sidebar/sidebar.styl +1 -0
  23. package/source/css/_components/tag-plugins/button.styl +11 -11
  24. package/source/css/_components/tag-plugins/common.styl +7 -4
  25. package/source/css/_components/tag-plugins/friends_posts.styl +2 -2
  26. package/source/css/_components/tag-plugins/inline-labels.styl +5 -0
  27. package/source/css/_components/tag-plugins/link.styl +2 -1
  28. package/source/css/_components/tag-plugins/mark.styl +1 -1
  29. package/source/css/_components/tag-plugins/mdrender.styl +15 -0
  30. package/source/css/_components/tag-plugins/note.styl +4 -1
  31. package/source/css/_components/tag-plugins/poetry.styl +2 -0
  32. package/source/css/_components/tag-plugins/quot.styl +51 -25
  33. package/source/css/_components/tag-plugins/sites.styl +1 -0
  34. package/source/css/_components/tag-plugins/tabs.styl +8 -10
  35. package/source/css/_components/tag-plugins/timeline.styl +12 -20
  36. package/source/css/_components/widgets/ghuser.styl +1 -1
  37. package/source/css/_components/widgets/markdown.styl +4 -3
  38. package/source/css/_components/widgets/related.styl +1 -1
  39. package/source/css/_components/widgets/tagcloud.styl +1 -1
  40. package/source/css/_components/widgets/timeline.styl +1 -1
  41. package/source/css/_custom.styl +6 -2
  42. package/source/css/_defines/const.styl +3 -0
  43. package/source/css/_defines/func.styl +10 -0
  44. package/source/css/_defines/theme.styl +9 -0
  45. package/source/js/services/artalk_latest_comment.js +2 -1
  46. package/source/js/services/fcircle.js +2 -1
  47. package/source/js/services/friends.js +2 -1
  48. package/source/js/services/friends_and_posts.js +2 -1
  49. package/source/js/services/ghinfo.js +2 -1
  50. package/source/js/services/giscus_latest_comment.js +2 -1
  51. package/source/js/services/mdrender.js +5 -2
  52. package/source/js/services/memos.js +2 -1
  53. package/source/js/services/sites.js +2 -1
  54. package/source/js/services/timeline.js +2 -1
  55. package/source/js/services/waline_latest_comment.js +2 -1
  56. 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.2'
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: 加载失败,请稍后重试。
@@ -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 = '';
@@ -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
  }
@@ -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.2",
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
@@ -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
@@ -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
@@ -0,0 +1,6 @@
1
+ .l_body[text-indent] article.content
2
+ p:not([class])
3
+ text-indent: 'calc(%s * 2)' % var(--fsp)
4
+ text-align: justify
5
+ a
6
+ text-indent: 0
@@ -0,0 +1,120 @@
1
+ .l_body[type=story] .md-text.content
2
+ --fsp: 'calc(%s + 1px)' % $fs-body
3
+ // 段落标题
4
+ h1,h2,h3,h4,h5,h6
5
+ color: var(--text)
6
+ line-height: 1.2
7
+ >a:first-child
8
+ background: $color-theme
9
+ border-radius: 2px
10
+ margin-right: 8px
11
+ padding: 0 2px
12
+ trans1 all
13
+ &:hover
14
+ background: $color-hover
15
+ &:before,&:after
16
+ color: white
17
+ font-weight: 700
18
+ &:before
19
+ content: ''
20
+ font-size: 0.5em
21
+ &:after
22
+ font-size: 0.25em
23
+ h2:not([class])
24
+ &:before,&:after
25
+ content: ''
26
+ display: inline-block
27
+ width: 12px
28
+ height: 1.2em
29
+ background: $cDeepOrange
30
+ transform: skewX(-20deg)
31
+ margin: 0 0.5em
32
+ vertical-align: top
33
+ position: relative
34
+
35
+ h3:not([class])
36
+ &:before,&:after
37
+ color: hsla($color-theme, 0.5)
38
+ margin: 0 8px
39
+ trans1 all
40
+ &:before
41
+ content: '⏵'
42
+ &:after
43
+ content: '⏴'
44
+ &:hover
45
+ &:before,&:after
46
+ color: hsla($color-theme, 1)
47
+
48
+ h4:not([class])
49
+ position: relative
50
+ &:before
51
+ content: ''
52
+ position: absolute
53
+ width: 32px
54
+ height: 32px
55
+ margin-left: -16px
56
+ margin-top: -12px
57
+ background: hsla($color-theme, 0.3)
58
+ border-radius: 50%
59
+ filter: blur(12px)
60
+ pointer-events: none
61
+ z-index: -1
62
+ trans1 all
63
+ &:hover:before
64
+ background: hsla($color-theme, 0.6)
65
+
66
+ ol,ul
67
+ margin-left: 'calc(%s * 2)' % var(--fsp)
68
+ h1,h2,h3,h4,h5,h6
69
+ text-align: center
70
+ margin: 2em 0 1.5em
71
+ >a:first-child
72
+ display: none
73
+ // 修正缩进效果
74
+ >blockquote
75
+ text-align: center
76
+ --inset: calc(var(--fsp) * 2)
77
+ margin-left: var(--inset)
78
+ margin-right: var(--inset)
79
+ background: var(--block)
80
+ padding: 1rem 2rem
81
+ border-radius: $border-card
82
+ &:before,&:after
83
+ position: absolute
84
+ font-size: 2rem
85
+ background-color: hsla($color-theme, 0.25)
86
+ top: -0.3em
87
+ width: 1em
88
+ height: 1em
89
+ content: ''
90
+ opacity 1
91
+ trans1 all
92
+ &:before
93
+ left: -0.3em
94
+ svg-mask-icon($iQuoteLeft)
95
+ &:after
96
+ right: -0.3em
97
+ svg-mask-icon($iQuoteRight)
98
+ p:not([class])
99
+ color: var(--text-p2)
100
+ font-size: $fs-body
101
+ text-indent: 2em
102
+ &:hover
103
+ &:before,&:after
104
+ background-color: hsla($color-theme, 0.5)
105
+ // 取消缩进效果
106
+ .poetry, .okr, .timeline, li, .article-footer
107
+ p:not([class])
108
+ text-indent: 0
109
+ text-align: convert(hexo-config('style.text-align'))
110
+
111
+
112
+
113
+ .l_body[type=story] .article.banner .content .bottom.only-title
114
+ justify-content: center
115
+
116
+
117
+ .l_body[text-indent] .tag-plugin.tabs .tab-content .tab-pane>p:not([class])
118
+ text-indent: 'calc(%s * 2)' % var(--fsp)
119
+ a
120
+ text-indent: 0
@@ -0,0 +1,35 @@
1
+ .l_body[type='tech'] .md-text
2
+ h1,h2,h3,h4,h5,h6
3
+ color: var(--text)
4
+ line-height: 1.8
5
+ >a:first-child
6
+ background: $color-theme
7
+ border-radius: 2px
8
+ margin-right: 8px
9
+ padding: 0 2px
10
+ trans1 all
11
+ &:hover
12
+ background: $color-hover
13
+ &:before,&:after
14
+ color: white
15
+ font-weight: 700
16
+ &:before
17
+ content: ''
18
+ font-size: 0.5em
19
+ &:after
20
+ font-size: 0.25em
21
+ h2
22
+ font-weight: 500
23
+ >a:first-child
24
+ &:before
25
+ content: '⌘'
26
+ h3
27
+ >a:first-child:before
28
+ content: '='
29
+ h4
30
+ >a:first-child:before
31
+ content: '|'
32
+ h5
33
+ >a:first-child:before
34
+ content: ':'
35
+