hexo-theme-stellar 1.30.0 → 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 (60) hide show
  1. package/_config.yml +36 -31
  2. package/_data/icons.yml +3 -1
  3. package/layout/_partial/main/article/article_footer.ejs +1 -1
  4. package/layout/_partial/main/post_list/post_card.ejs +19 -14
  5. package/layout/_partial/scripts/utils.ejs +1 -1
  6. package/layout/layout.ejs +1 -1
  7. package/layout/page.ejs +1 -1
  8. package/package.json +1 -1
  9. package/scripts/tags/inline-labels.js +3 -0
  10. package/scripts/tags/lib/friends.js +4 -4
  11. package/scripts/tags/lib/okr.js +6 -6
  12. package/scripts/tags/lib/quot.js +16 -15
  13. package/scripts/tags/lib/sites.js +1 -1
  14. package/source/css/_common/base.styl +1 -1
  15. package/source/css/_common/blockquote.styl +16 -5
  16. package/source/css/_common/pre.styl +1 -0
  17. package/source/css/_components/list.styl +44 -12
  18. package/source/css/_components/md.styl +3 -46
  19. package/source/css/_components/pages/article-indent.styl +6 -0
  20. package/source/css/_components/pages/article-story.styl +120 -0
  21. package/source/css/_components/pages/article-tech.styl +35 -0
  22. package/source/css/_components/partial/article-banner.styl +32 -13
  23. package/source/css/_components/partial/article-footer.styl +24 -14
  24. package/source/css/_components/partial/related.styl +1 -1
  25. package/source/css/_components/sidebar/sidebar.styl +1 -0
  26. package/source/css/_components/tag-plugins/button.styl +11 -11
  27. package/source/css/_components/tag-plugins/common.styl +7 -4
  28. package/source/css/_components/tag-plugins/friends.styl +1 -2
  29. package/source/css/_components/tag-plugins/friends_posts.styl +160 -0
  30. package/source/css/_components/tag-plugins/inline-labels.styl +5 -0
  31. package/source/css/_components/tag-plugins/link.styl +2 -1
  32. package/source/css/_components/tag-plugins/mark.styl +1 -1
  33. package/source/css/_components/tag-plugins/mdrender.styl +15 -0
  34. package/source/css/_components/tag-plugins/note.styl +4 -1
  35. package/source/css/_components/tag-plugins/poetry.styl +2 -0
  36. package/source/css/_components/tag-plugins/quot.styl +51 -25
  37. package/source/css/_components/tag-plugins/sites.styl +22 -8
  38. package/source/css/_components/tag-plugins/tabs.styl +8 -10
  39. package/source/css/_components/tag-plugins/timeline.styl +12 -20
  40. package/source/css/_components/widgets/ghuser.styl +1 -1
  41. package/source/css/_components/widgets/markdown.styl +4 -3
  42. package/source/css/_components/widgets/related.styl +1 -1
  43. package/source/css/_components/widgets/tagcloud.styl +1 -1
  44. package/source/css/_components/widgets/timeline.styl +1 -1
  45. package/source/css/_custom.styl +6 -2
  46. package/source/css/_defines/const.styl +3 -0
  47. package/source/css/_defines/func.styl +10 -0
  48. package/source/css/_defines/theme.styl +9 -0
  49. package/source/js/services/artalk_latest_comment.js +2 -1
  50. package/source/js/services/fcircle.js +2 -1
  51. package/source/js/services/friends.js +2 -1
  52. package/source/js/services/friends_and_posts.js +58 -0
  53. package/source/js/services/ghinfo.js +2 -1
  54. package/source/js/services/giscus_latest_comment.js +2 -1
  55. package/source/js/services/mdrender.js +5 -2
  56. package/source/js/services/memos.js +2 -1
  57. package/source/js/services/sites.js +13 -5
  58. package/source/js/services/timeline.js +2 -1
  59. package/source/js/services/waline_latest_comment.js +2 -1
  60. 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.0'
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:
@@ -145,7 +145,7 @@ notebook:
145
145
  auto_excerpt: 128
146
146
  # 可以为某个 tag 设定图标(显示在标签树中)。
147
147
  tagcons:
148
- '': solar:hashtag-linear
148
+ '': solar:hashtag-square-bold
149
149
  # 每页显示多少篇笔记。0 表示不分页,null 则 fallback 到 hexo 的配置。
150
150
  # 可以在笔记本 yaml 的 per_page 字段中覆盖此参数。
151
151
  per_page: null
@@ -173,7 +173,9 @@ article:
173
173
  # 如果没有指定封面,是否根据 tags 作为关键词搜索封面图片?
174
174
  auto_cover: false # search from https://source.unsplash.com/
175
175
  # 封面图宽高比
176
- cover_ratio: 2.4
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
@@ -356,11 +358,11 @@ tag_plugins:
356
358
  interactive: false # enable interactive for user
357
359
  # {% quot %}
358
360
  quot:
359
- default: # 可以自行配置多种图标方案
360
- prefix: https://bu.dusays.com/2022/10/24/63567d3e092ff.png
361
- suffix: https://bu.dusays.com/2022/10/24/63567d3e0ab55.png
361
+ default: # 可以自行配置多种图标方案,支持icons.yml中配置的图片key,也支持直接设置svg/png等文件链接
362
+ prefix: bxs:quote-left
363
+ suffix: bxs:quote-right
362
364
  hashtag:
363
- prefix: https://bu.dusays.com/2022/10/24/63567d3e07da3.png
365
+ prefix: solar:hashtag-square-bold
364
366
  question:
365
367
  prefix: ph:seal-question-fill
366
368
  # {% emoji %}
@@ -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
  # 内置服务,按需加载(页面内用到了就会加载,没有用到就不会加载)
@@ -446,6 +448,8 @@ data_services:
446
448
  js: /js/services/sites.js
447
449
  friends:
448
450
  js: /js/services/friends.js
451
+ friends_and_posts:
452
+ js: /js/services/friends_and_posts.js
449
453
  # 列表布局类
450
454
  timeline:
451
455
  js: /js/services/timeline.js
@@ -486,13 +490,13 @@ plugins:
486
490
  preload:
487
491
  enable: true
488
492
  service: flying_pages # flying_pages
489
- 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
490
494
 
491
495
  # lazyload
492
496
  # https://www.npmjs.com/package/vanilla-lazyload
493
497
  lazyload:
494
498
  enable: true # [hexo clean && hexo s] is required after changing this value.
495
- 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
496
500
  transition: fade # blur, fade
497
501
 
498
502
  # https://fancyapps.com/docs/ui/fancybox/
@@ -500,8 +504,8 @@ plugins:
500
504
  fancybox:
501
505
  enable: true
502
506
  loader: /js/plugins/fancybox-loader.js
503
- js: https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.umd.js
504
- 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
505
509
  # 让 md 语法图片支持放大可以这样写: .md-text img:not([class]), .md-text .image img
506
510
  # 可以处理评论区的图片(不支持 iframe 类评论系统)例如:
507
511
  # 使用 twikoo 评论可以写: .tk-content img:not([class*="emo"])
@@ -511,13 +515,13 @@ plugins:
511
515
  # swiper
512
516
  swiper:
513
517
  enable: true
514
- css: https://unpkg.com/swiper@10.3.1/swiper-bundle.min.css
515
- 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
516
520
 
517
521
  # https://scrollrevealjs.org/api/reveal.html
518
522
  scrollreveal:
519
523
  enable: #true
520
- 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
521
525
  distance: 16px
522
526
  duration: 800 # ms
523
527
  interval: 100 # ms
@@ -550,7 +554,7 @@ plugins:
550
554
  katex:
551
555
  enable: #true # hexo-renderer-markdown-it-plus 默认开启 katex,此选项仅用于引入样式
552
556
  inject: |
553
- <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">
554
558
 
555
559
  # MathJax
556
560
  # 需在Markdown文件开头加入mathjax: true
@@ -572,7 +576,7 @@ plugins:
572
576
  enable: # true # 可以在特定文章的 front-matter 中设置 mermaid: true 来开启,也可以在这里设置全局开启
573
577
  style_optimization: false # use custom style in stellar
574
578
  # js: https://unpkg.com/mermaid@9.0.0/dist/mermaid.min.js
575
- 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
576
580
  # Available themes: default | dark | forest | neutral
577
581
  theme: neutral
578
582
 
@@ -587,8 +591,8 @@ plugins:
587
591
  # https://github.com/sivan/heti
588
592
  heti:
589
593
  enable: false # 此插件会和代码块冲突,仅适用于纯中文博主。
590
- css: https://unpkg.com/heti@0.9.2/umd/heti.min.css
591
- 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
592
596
 
593
597
 
594
598
 
@@ -609,8 +613,9 @@ style:
609
613
  prefix:
610
614
  h2: https://api.iconify.design/ci:heading-h2.svg
611
615
  border-radius:
612
- card-l: 16px # 侧边栏、文章横幅位置的圆角
613
- card: 12px # 文章内大部分卡片的圆角
616
+ card-l: 24px # 侧边栏、文章横幅位置的圆角
617
+ card: 16px # 文章内大部分卡片的圆角
618
+ card-s: 12px # 文章内小型卡片的圆角
614
619
  bar: 8px # 横条类元素的圆角
615
620
  image: 12px # 图片圆角
616
621
  color:
@@ -629,7 +634,7 @@ style:
629
634
  background: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/rainbow64@3x.webp
630
635
  codeblock:
631
636
  scrollbar: 4px
632
- 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
633
638
  loading:
634
639
  loading: 正在加载
635
640
  error: 加载失败,请稍后重试。
package/_data/icons.yml CHANGED
@@ -8,7 +8,7 @@ solar:chat-square-like-bold-duotone: <svg xmlns="http://www.w3.org/2000/svg" wid
8
8
  solar:planet-bold-duotone: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M20 12a8 8 0 1 1-16 0a8 8 0 0 1 16 0" opacity=".5"/><path fill="currentColor" d="M17.712 5.453c1.047-.193 2.006-.259 2.797-.152c.77.103 1.536.393 1.956 1.064c.446.714.312 1.542-.012 2.258c-.33.728-.918 1.499-1.672 2.268c-1.516 1.547-3.836 3.226-6.597 4.697c-2.763 1.472-5.495 2.484-7.694 2.92c-1.095.217-2.098.299-2.923.201c-.8-.095-1.6-.383-2.032-1.075c-.47-.752-.296-1.63.07-2.379c.375-.768 1.032-1.586 1.872-2.403L4 12.416c0 .219.083.71.168 1.146c.045.23.09.444.123.596c-.652.666-1.098 1.263-1.339 1.756c-.277.567-.208.825-.145.925c.072.116.305.305.937.38c.609.073 1.44.018 2.455-.183c2.02-.4 4.613-1.351 7.28-2.772c2.667-1.42 4.85-3.015 6.23-4.423c.694-.707 1.15-1.334 1.377-1.836c.233-.515.167-.75.107-.844c-.07-.112-.289-.294-.883-.374c-.542-.072-1.272-.041-2.163.112L16.87 5.656c.338-.101.658-.17.842-.203"/></svg>
9
9
  solar:notebook-bookmark-bold-duotone: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" d="M14.25 4.48v3.057c0 .111 0 .27.02.406a.936.936 0 0 0 .445.683a.96.96 0 0 0 .783.072c.13-.04.272-.108.378-.159L17 8.005l1.124.534c.106.05.248.119.378.16a.958.958 0 0 0 .783-.073a.936.936 0 0 0 .444-.683c.021-.136.021-.295.021-.406V3.031c.113-.005.224-.01.332-.013C21.154 2.98 22 3.86 22 4.933v11.21c0 1.112-.906 2.01-2.015 2.08c-.97.06-2.108.179-2.985.41c-1.082.286-1.99 1.068-3.373 1.436c-.626.167-1.324.257-1.627.323V5.174c.32-.079 1.382-.203 1.674-.371c.184-.107.377-.216.576-.323m5.478 8.338a.75.75 0 0 1-.546.91l-4 1a.75.75 0 0 1-.364-1.456l4-1a.75.75 0 0 1 .91.546" clip-rule="evenodd"/><path fill="currentColor" d="M18.25 3.151c-.62.073-1.23.18-1.75.336a8.2 8.2 0 0 0-.75.27v3.182l.75-.356l.008-.005a1.13 1.13 0 0 1 .492-.13c.047 0 .094.004.138.01c.175.029.315.1.354.12l.009.005l.749.356V3.647z"/><path fill="currentColor" d="M12 5.214c-.334-.064-1.057-.161-1.718-.339C8.938 4.515 8.05 3.765 7 3.487c-.887-.234-2.041-.352-3.018-.412C2.886 3.007 2 3.9 2 4.998v11.146c0 1.11.906 2.01 2.015 2.079c.97.06 2.108.179 2.985.41c.486.129 1.216.431 1.873.726c1.005.451 2.052.797 3.127 1.034z" opacity=".5"/><path fill="currentColor" d="M4.273 12.818a.75.75 0 0 1 .91-.545l4 1a.75.75 0 1 1-.365 1.455l-4-1a.75.75 0 0 1-.545-.91m.909-4.545a.75.75 0 1 0-.364 1.455l4 1a.75.75 0 0 0 .364-1.455z"/></svg>
10
10
  solar:pin-linear: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><path d="m15.9894 4.9502.5306-.53006zm3.0822 3.08542-.5306.53006zm-10.33323 11.39338-.5306.5301zm-4.11668-4.1209.5306-.53zm12.94521-.3138-.2637-.7021zm-1.9171.7203.2638.7021zm-7.3176-7.33283-.70422-.25802zm.69445-1.89541.70422.25802zm-3.18161 4.18714.19934.723zm1.45663-.5384-.43821-.60864zm.37415-.34472.57083.48642zm6.57518 6.59012.491.567zm-.8704 1.8207-.7232-.199zm.5363-1.4546-.6094-.4372zm-11.19844-3.9914-.74998.0048zm.21199-.8031-.64992-.3743zm8.37475 9.391.0012-.75zm.7881-.2084-.3718-.6514zm-.396-19.09864.1615.73239zm-10.2279 19.43384c-.29274.2931-.2925.768.00054 1.0607s.76792.2925 1.06066-.0005zm5.71443-3.5978c.29274-.293.2925-.7679-.00054-1.0607-.29305-.2927-.76792-.2925-1.06066.0006zm8.27497-12.39184 3.0822 3.08542 1.0612-1.06012-3.0822-3.08542zm-6.18983 13.41864-4.11668-4.1208-1.0612 1.0601 4.11668 4.1209zm8.03423-4.6067-1.9172.7203.5276 1.4042 1.9171-.7203zm-8.26678-5.65241.69445-1.89541-1.40844-.51604-.69445 1.89541zm-2.99204 2.75671c.71145-.1962 1.25281-.334 1.69549-.6527l-.87641-1.21734c-.17293.12451-.39745.19782-1.21776.42398zm1.5836-3.27275c-.29296.79957-.3846 1.01778-.52299 1.18016l1.14166.97289c.35376-.41505.53565-.94343.78977-1.63701zm.11189 2.62005c.18709-.1347.35725-.2915.50678-.467l-1.14166-.97289c-.07129.08366-.15239.15838-.24153.22255zm7.64613 4.2687c-.689.2589-1.2144.4446-1.626.801l.982 1.134c.1608-.1393.3772-.2323 1.1716-.5308zm-1.2823 3.3876c.2253-.8188.2984-1.0432.4226-1.2163l-1.2188-.8744c-.3173.4423-.4546.9825-.6501 1.6928zm-.3437-2.5866c-.1697.147-.3216.3134-.4525.4959l1.2188.8744c.0624-.087.1348-.1663.2157-.2363zm-8.60771-1.0354c-.64614-.6468-1.0843-1.0871-1.36863-1.4443-.28531-.3585-.31477-.5137-.31521-.5833l-1.49997.0095c.00367.5822.29279 1.0697.64154 1.5079.34974.4394.86113.9497 1.48107 1.5703zm.49341-4.82766c-.84522.23306-1.54174.42386-2.06274.63306-.51955.2085-1.0118.4897-1.30243.9943l1.29985.7486c.03462-.0601.13655-.1804.56142-.3509.42343-.17 1.02157-.3361 1.90258-.579zm-2.17725 2.80006c-.00094-.1489.03771-.2952.11193-.4241l-1.29985-.7486c-.20699.3594-.31467.7674-.31205 1.1822zm4.73932 7.2086c.62387.6245 1.13687 1.1396 1.5787 1.4915.44053.3509.93143.6416 1.51763.6425l.0023-1.5c-.0695-.0001-.225-.0287-.5854-.3158-.3592-.2861-.80177-.7274-1.45203-1.3784zm4.44963-1.9569c-.2441.8875-.4112 1.4902-.5823 1.9166-.1718.4279-.293.5299-.3536.5645l.7435 1.3028c.509-.2905.7923-.7857 1.0021-1.3086.2105-.5243.4023-1.2259.6366-2.0774zm-1.3533 4.0909c.4071.0006.8073-.1052 1.1609-.307l-.7435-1.3028c-.1265.0722-.2696.11-.4151.1098zm7.2369-13.52742c1.0635 1.06454 1.7993 1.80382 2.2507 2.41312.4436.5986.4946.9171.4404 1.1676l1.4661.317c.1899-.878-.16-1.6472-.7013-2.3777-.5334-.71978-1.3664-1.55084-2.3947-2.58014zm-.7103 7.13072c1.3614-.5115 2.4633-.9234 3.2464-1.358.7947-.4411 1.4312-.9968 1.6211-1.875l-1.4661-.317c-.0541.2504-.232.5191-.883.8804-.6626.3678-1.6379.7364-3.0459 1.2654zm-1.3107-11.27626c-1.0359-1.03694-1.8719-1.87661-2.5954-2.41376-.7338-.54473-1.5071-.89726-2.3889-.70271l.3231 1.46478c.2498-.0551.5689-.00515 1.1716.4423.6129.45504 1.3572 1.19726 2.4284 2.26951zm-6.78913 2.32424c.52163-1.42363.88523-2.41035 1.25033-3.08123.359-.65977.6278-.83958.8776-.8947l-.3231-1.46478c-.8817.19452-1.4352.83965-1.87208 1.64251-.43084.79175-.83674 1.90536-1.34119 3.28216zm-7.20027 15.78572 4.65323-4.658-1.0612-1.0601-4.65323 4.6579z" fill="currentColor"/></svg>
11
- solar:hashtag-linear: <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><g stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="m10 3-5 18"/><path d="m19 3-5 18"/><path d="m22 9h-18"/><path d="m20 16h-18"/></g></svg>
11
+ solar:hashtag-square-bold: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from Solar by 480 Design - https://creativecommons.org/licenses/by/4.0/ --><path fill="currentColor" d="m14.092 10.75l-.75 2.5H9.908l.75-2.5z"/><path fill="currentColor" fill-rule="evenodd" d="M3.464 3.464C2 4.93 2 7.286 2 12s0 7.071 1.464 8.535C4.93 22 7.286 22 12 22s7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536C19.072 2 16.714 2 12 2S4.929 2 3.464 3.464m7.752 2.818a.75.75 0 0 1 .502.934l-.61 2.034h3.434l.74-2.465a.75.75 0 0 1 1.436.43l-.61 2.035H18a.75.75 0 0 1 0 1.5h-2.342l-.75 2.5H17a.75.75 0 0 1 0 1.5h-2.542l-.74 2.465a.75.75 0 0 1-1.436-.43l.61-2.035H9.458l-.74 2.465a.75.75 0 1 1-1.436-.43l.61-2.035H6a.75.75 0 0 1 0-1.5h2.342l.75-2.5H7a.75.75 0 0 1 0-1.5h2.542l.74-2.465a.75.75 0 0 1 .934-.503" clip-rule="evenodd"/></svg>
12
12
 
13
13
  default:goback: <svg aria-hidden="true" viewBox="0 0 16 16" fill="currentColor"><path fill-rule="evenodd" d="M7.78 12.53a.75.75 0 01-1.06 0L2.47 8.28a.75.75 0 010-1.06l4.25-4.25a.75.75 0 011.06 1.06L4.81 7h7.44a.75.75 0 010 1.5H4.81l2.97 2.97a.75.75 0 010 1.06z"></path></svg>
14
14
 
@@ -48,3 +48,5 @@ share:link: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/8411ed
48
48
 
49
49
  # quot icons
50
50
  ph:seal-question-fill: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path fill="currentColor" d="M225.86 102.82c-3.77-3.94-7.67-8-9.14-11.57c-1.36-3.27-1.44-8.69-1.52-13.94c-.15-9.76-.31-20.82-8-28.51s-18.75-7.85-28.51-8c-5.25-.08-10.67-.16-13.94-1.52c-3.56-1.47-7.63-5.37-11.57-9.14C146.28 23.51 138.44 16 128 16s-18.27 7.51-25.18 14.14c-3.94 3.77-8 7.67-11.57 9.14c-3.25 1.36-8.69 1.44-13.94 1.52c-9.76.15-20.82.31-28.51 8s-7.8 18.75-8 28.51c-.08 5.25-.16 10.67-1.52 13.94c-1.47 3.56-5.37 7.63-9.14 11.57C23.51 109.72 16 117.56 16 128s7.51 18.27 14.14 25.18c3.77 3.94 7.67 8 9.14 11.57c1.36 3.27 1.44 8.69 1.52 13.94c.15 9.76.31 20.82 8 28.51s18.75 7.85 28.51 8c5.25.08 10.67.16 13.94 1.52c3.56 1.47 7.63 5.37 11.57 9.14c6.9 6.63 14.74 14.14 25.18 14.14s18.27-7.51 25.18-14.14c3.94-3.77 8-7.67 11.57-9.14c3.27-1.36 8.69-1.44 13.94-1.52c9.76-.15 20.82-.31 28.51-8s7.85-18.75 8-28.51c.08-5.25.16-10.67 1.52-13.94c1.47-3.56 5.37-7.63 9.14-11.57c6.63-6.9 14.14-14.74 14.14-25.18s-7.51-18.27-14.14-25.18M128 192a12 12 0 1 1 12-12a12 12 0 0 1-12 12m8-48.72v.72a8 8 0 0 1-16 0v-8a8 8 0 0 1 8-8c13.23 0 24-9 24-20s-10.77-20-24-20s-24 9-24 20v4a8 8 0 0 1-16 0v-4c0-19.85 17.94-36 40-36s40 16.15 40 36c0 17.38-13.76 31.93-32 35.28"/></svg>
51
+ bxs:quote-left: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from BoxIcons Solid by Atisa - https://creativecommons.org/licenses/by/4.0/ --><path fill="currentColor" d="M3.691 6.292C5.094 4.771 7.217 4 10 4h1v2.819l-.804.161c-1.37.274-2.323.813-2.833 1.604A2.9 2.9 0 0 0 6.925 10H10a1 1 0 0 1 1 1v7c0 1.103-.897 2-2 2H3a1 1 0 0 1-1-1v-5l.003-2.919c-.009-.111-.199-2.741 1.688-4.789M20 20h-6a1 1 0 0 1-1-1v-5l.003-2.919c-.009-.111-.199-2.741 1.688-4.789C16.094 4.771 18.217 4 21 4h1v2.819l-.804.161c-1.37.274-2.323.813-2.833 1.604A2.9 2.9 0 0 0 17.925 10H21a1 1 0 0 1 1 1v7c0 1.103-.897 2-2 2"/></svg>
52
+ bxs:quote-right: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><!-- Icon from BoxIcons Solid by Atisa - https://creativecommons.org/licenses/by/4.0/ --><path fill="currentColor" d="M20.309 17.708C22.196 15.66 22.006 13.03 22 13V5a1 1 0 0 0-1-1h-6c-1.103 0-2 .897-2 2v7a1 1 0 0 0 1 1h3.078a2.9 2.9 0 0 1-.429 1.396c-.508.801-1.465 1.348-2.846 1.624l-.803.16V20h1c2.783 0 4.906-.771 6.309-2.292m-11.007 0C11.19 15.66 10.999 13.03 10.993 13V5a1 1 0 0 0-1-1h-6c-1.103 0-2 .897-2 2v7a1 1 0 0 0 1 1h3.078a2.9 2.9 0 0 1-.429 1.396c-.508.801-1.465 1.348-2.846 1.624l-.803.16V20h1c2.783 0 4.906-.771 6.309-2.292"/></svg>
@@ -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
  }
@@ -100,26 +101,30 @@ function div_default() {
100
101
  }
101
102
  function div_photo() {
102
103
  var el = '';
103
- el += '<div class="cover">';
104
- el += '<img src="' + obj.image + '"/>';
104
+ var position = '';
105
105
  if (obj.headline || obj.topic || obj.caption) {
106
- el += '<div class="cover-info"';
107
- if (obj.color) {
108
- el += 'style="color:' + obj.color + '"';
109
- }
110
106
  if (obj.topic) {
111
- el += 'position="top">';
107
+ position = 'top';
112
108
  } else {
113
- el += 'position="bottom">';
109
+ position = 'bottom';
110
+ }
111
+ }
112
+ el += '<div class="cover" position="' + position + '">';
113
+ el += '<img src="' + obj.image + '"/>';
114
+ if (position.length > 0) {
115
+ el += '<div class="cover-info" position="' + position + '"';
116
+ if (obj.color) {
117
+ el += 'style="color:' + obj.color + '"';
114
118
  }
119
+ el += '>';
115
120
  if (obj.topic) {
116
- el += '<div class="cap">' + obj.topic + '</div>';
121
+ el += '<div class="text topic">' + obj.topic + '</div>';
117
122
  }
118
123
  if (obj.headline) {
119
- el += '<div class="title">' + obj.headline + '</div>';
124
+ el += '<div class="text headline">' + obj.headline + '</div>';
120
125
  }
121
126
  if (obj.caption) {
122
- el += '<div class="cap">' + obj.caption + '</div>';
127
+ el += '<div class="text caption">' + obj.caption + '</div>';
123
128
  }
124
129
  el += '</div>';
125
130
 
@@ -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.0",
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 = ''
@@ -2,13 +2,13 @@
2
2
  * friends.js v2 | https://github.com/xaoxuu/hexo-theme-stellar/
3
3
  * 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
4
4
  *
5
- * {% friends [group] [repo:owner/repo] [api:http] %}
5
+ * {% friends [group] [repo:owner/repo] [posts:true/false] [api:http] %}
6
6
  */
7
7
 
8
8
  'use strict'
9
9
 
10
10
  module.exports = ctx => function(args) {
11
- args = ctx.args.map(args, ['repo', 'api'], ['group'])
11
+ args = ctx.args.map(args, ['repo', 'api', 'posts'], ['group'])
12
12
  var api
13
13
  if (args.api) {
14
14
  api = args.api
@@ -16,9 +16,9 @@ module.exports = ctx => function(args) {
16
16
  api = 'https://api.vlts.cc/output_data/v2/' + args.repo
17
17
  }
18
18
 
19
- var el = '<div class="tag-plugin users-wrap">'
19
+ var el = `<div class="tag-plugin ${args.posts ? 'users-posts-wrap' : 'users-wrap'}">`
20
20
  if (api) {
21
- el += `<div class="ds-friends" ${ctx.args.joinTags(args, ['size']).join(' ')} api="${api}"><div class="grid-box"></div></div>`
21
+ el += `<div class="ds-friends${args.posts ? '_and_posts' : ''}" ${ctx.args.joinTags(args, ['size']).join(' ')} api="${api}"><div class="grid-box"></div></div>`
22
22
  } else if (args.group) {
23
23
  const links = ctx.theme.config.links || {}
24
24
  el += '<div class="grid-box">'
@@ -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
  }
@@ -30,7 +30,7 @@ module.exports = ctx => function(args) {
30
30
  if (item?.url && item?.title) {
31
31
  el += `<div class="grid-cell site-card">`
32
32
  el += `<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="${item.url}">`
33
- el += `<img src="${item.cover || item.screenshot || ('https://image.thum.io/get/width/1280/crop/720/' + item.url)}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${ctx.theme.config.default.cover}&quot;;"/>`
33
+ el += `<img src="${item.cover || item.snapshot || item.screenshot || ('https://image.thum.io/get/width/1280/crop/720/' + item.url)}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${ctx.theme.config.default.cover}&quot;;"/>`
34
34
  el += `<div class="info">`
35
35
  el += `<img src="${item.icon || item.avatar || ctx.theme.config.default.link}" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;${item.icon || item.avatar || ctx.theme.config.default.link}&quot;;"/>`
36
36
  el += `<span class="title">${item.title}</span>`
@@ -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
@@ -23,13 +23,26 @@
23
23
  .post-list .post-card
24
24
  display: block
25
25
  margin: 1rem 0
26
- border-radius: $border-card
26
+ border-radius: $border-card-l
27
27
  background: var(--card)
28
28
  hoverable-card()
29
29
  overflow: hidden
30
30
  z-index: 0
31
-
32
31
  position: relative
32
+ --img-br: 100%
33
+ --img-sat: 100%
34
+ --blur-px: 1em
35
+ --blur-height: 128px
36
+ --blur-sat: 120%
37
+ &:hover
38
+ --img-br: 75%
39
+ --img-sat: 120%
40
+ // --blur-px: 0
41
+ // --blur-height: 0
42
+ --blur-sat: 200%
43
+ img
44
+ filter: brightness(var(--img-br)) saturate(var(--img-sat))
45
+ trans1 all
33
46
  .excerpt
34
47
  margin: 1rem 0
35
48
  @media screen and (max-width: $device-mobile)
@@ -62,9 +75,6 @@
62
75
  svg
63
76
  color: $c-red
64
77
 
65
- .post-list.post .post-card:hover
66
- img
67
- filter: brightness(50%)
68
78
 
69
79
  // common article
70
80
  .post-list .md-text
@@ -100,7 +110,23 @@
100
110
  img
101
111
  width: 100%
102
112
  object-fit: cover
103
- aspect-ratio: hexo-config('article.cover_ratio')
113
+ aspect-ratio: hexo-config('article.cover_ratio')
114
+ z-index 0
115
+ &:before
116
+ content: ''
117
+ z-index 1
118
+ position: absolute
119
+ left: 0
120
+ right: 0
121
+ height: var(--blur-height)
122
+ backdrop-filter: saturate(var(--blur-sat)) blur(var(--blur-px))
123
+ trans1 all
124
+ &[position=top]:before
125
+ top: 0
126
+ mask: linear-gradient(black, rgba(black, 0.75), transparent)
127
+ &[position=bottom]:before
128
+ bottom: 0
129
+ mask: linear-gradient(transparent, rgba(black, 0.75), black)
104
130
  .cover-info
105
131
  padding: 1.5rem 1rem
106
132
  position: absolute
@@ -108,6 +134,7 @@
108
134
  width: 'calc(100% - %s * 2)' % 1rem
109
135
  --text-banner: white
110
136
  color: var(--text-banner)
137
+ z-index: 2
111
138
  &[position=top]
112
139
  top: 0
113
140
  background-image: linear-gradient(rgba(0,0,0,0.2),rgba(0,0,0,0))
@@ -116,20 +143,25 @@
116
143
  background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2))
117
144
  div+div
118
145
  margin-top: 4px
119
- .cap
120
- font-size: $fs-13
146
+ .text
121
147
  color: unset
122
- .title
148
+ trans1 all
149
+ text-shadow: 0 2px 4px rgba(0,0,0,0.2)
150
+ .topic
151
+ font-size: $fs-13
152
+ .headline
123
153
  font-weight: 500
124
154
  font-size: $fsh3
155
+ .caption
156
+ font-size: $fs-14
125
157
  @media screen and (max-width: $device-mobile)
126
158
  padding: 1rem
127
159
  div+div
128
160
  margin-top: 2px
129
- .title
161
+ .headline
130
162
  font-size: $fsh4
131
- .cap
132
- font-size: $fs-12
163
+ .caption
164
+ font-size: $fs-13
133
165
  h2
134
166
  margin: .25rem 0
135
167
  font-size: $fsh4