hexo-theme-stellar 1.26.4 → 1.26.5

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 (43) hide show
  1. package/_config.yml +7 -2
  2. package/_data/icons.yml +13 -5
  3. package/layout/_partial/main/navbar/dateinfo.ejs +3 -0
  4. package/layout/_partial/main/navbar/nav_tabs_blog.ejs +2 -2
  5. package/layout/_partial/main/navbar/nav_tabs_wiki.ejs +2 -2
  6. package/layout/_partial/main/post_list/post_card.ejs +3 -2
  7. package/layout/_partial/widgets/related.ejs +1 -1
  8. package/layout/categories.ejs +1 -1
  9. package/package.json +1 -1
  10. package/scripts/events/lib/utils.js +16 -0
  11. package/scripts/helpers/icon.js +1 -12
  12. package/scripts/tags/index.js +1 -0
  13. package/scripts/tags/lib/icon.js +27 -0
  14. package/scripts/tags/lib/navbar.js +1 -1
  15. package/scripts/tags/lib/quot.js +15 -12
  16. package/source/css/_common/base.styl +2 -3
  17. package/source/css/_common/device.styl +15 -4
  18. package/source/css/_common/title.styl +8 -7
  19. package/source/css/_custom.styl +15 -11
  20. package/source/css/_layout/list.styl +20 -14
  21. package/source/css/_layout/md.styl +6 -14
  22. package/source/css/_layout/pages/archives.styl +9 -1
  23. package/source/css/_layout/partial/article-banner.styl +3 -2
  24. package/source/css/_layout/partial/article-footer.styl +3 -3
  25. package/source/css/_layout/partial/navbar.styl +7 -5
  26. package/source/css/_layout/partial/related.styl +4 -4
  27. package/source/css/_layout/sidebar/search.styl +14 -12
  28. package/source/css/_layout/sidebar/sidebar.styl +1 -1
  29. package/source/css/_layout/tag-plugins/banner.styl +18 -8
  30. package/source/css/_layout/tag-plugins/common.styl +4 -0
  31. package/source/css/_layout/tag-plugins/folders.styl +2 -2
  32. package/source/css/_layout/tag-plugins/folding.styl +2 -2
  33. package/source/css/_layout/tag-plugins/hashtag.styl +1 -1
  34. package/source/css/_layout/tag-plugins/icon.styl +12 -0
  35. package/source/css/_layout/tag-plugins/navbar.styl +9 -22
  36. package/source/css/_layout/tag-plugins/note.styl +2 -2
  37. package/source/css/_layout/tag-plugins/poetry.styl +2 -2
  38. package/source/css/_layout/tag-plugins/quot.styl +21 -21
  39. package/source/css/_layout/tag-plugins/tabs.styl +1 -1
  40. package/source/css/_layout/tag-plugins/timeline.styl +4 -5
  41. package/source/css/_layout/widgets/ghuser.styl +1 -1
  42. package/source/css/_layout/widgets/timeline.styl +11 -8
  43. package/source/css/_layout/widgets/widgets.styl +1 -1
package/_config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  ######## Stellar info ########
2
2
  stellar:
3
- version: '1.26.4'
3
+ version: '1.26.5'
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
@@ -122,7 +122,7 @@ article:
122
122
  # 如果没有指定横幅,是否根据 tags 作为关键词搜索横幅图片?
123
123
  auto_banner: false # search from https://source.unsplash.com/
124
124
  # 如果没有指定 excerpt 和 description,将自动取多长的内容作为文章摘要?
125
- auto_excerpt: 200
125
+ auto_excerpt: 128
126
126
  # 分类颜色
127
127
  category_color:
128
128
  '探索号': '#f44336'
@@ -294,6 +294,8 @@ tag_plugins:
294
294
  suffix: https://bu.dusays.com/2022/10/24/63567d3e0ab55.png
295
295
  hashtag:
296
296
  prefix: https://bu.dusays.com/2022/10/24/63567d3e07da3.png
297
+ question:
298
+ prefix: ph:seal-question-fill
297
299
  # {% emoji %}
298
300
  emoji:
299
301
  default: https://gcore.jsdelivr.net/gh/cdn-x/emoji/qq/${name}.gif
@@ -302,6 +304,9 @@ tag_plugins:
302
304
  aru: https://gcore.jsdelivr.net/gh/cdn-x/emoji/aru-l/${name}.gif
303
305
  tieba: https://gcore.jsdelivr.net/gh/cdn-x/emoji/tieba/${name}.png
304
306
  blobcat: https://gcore.jsdelivr.net/gh/norevi/waline-blobcatemojis@1.0/blobs/${name}.png
307
+ icon:
308
+ # 留空时,图标和文字颜色相同
309
+ default_color: accent # theme, accent, red, orange, yellow, green, cyan, blue, purple
305
310
  # {% image %}
306
311
  image:
307
312
  fancybox: false # true, false
package/_data/icons.yml CHANGED
@@ -1,3 +1,7 @@
1
+ # 小技巧
2
+ # - 如果更换了图标之后变得很大,请把原本的 class 复制到新的图标中
3
+ # - 如果更换了图标之后视觉轻微偏移,可以通过 style="xx" 来修正
4
+
1
5
 
2
6
  solar:documents-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="M5.879 2.879C5 3.757 5 5.172 5 8v8c0 2.828 0 4.243.879 5.121C6.757 22 8.172 22 11 22h2c2.828 0 4.243 0 5.121-.879C19 20.243 19 18.828 19 16V8c0-2.828 0-4.243-.879-5.121C17.243 2 15.828 2 13 2h-2c-2.828 0-4.243 0-5.121.879M8.25 17a.75.75 0 0 1 .75-.75h3a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75M9 12.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5zM8.25 9A.75.75 0 0 1 9 8.25h6a.75.75 0 0 1 0 1.5H9A.75.75 0 0 1 8.25 9" clip-rule="evenodd"/><path fill="currentColor" d="M5.235 4.058C5 4.941 5 6.177 5 8v8c0 1.823 0 3.058.235 3.942L5 19.924c-.975-.096-1.631-.313-2.121-.803C2 18.243 2 16.828 2 14v-4c0-2.829 0-4.243.879-5.121c.49-.49 1.146-.707 2.121-.803zm13.53 15.884C19 19.058 19 17.822 19 16V8c0-1.823 0-3.059-.235-3.942l.235.018c.975.096 1.631.313 2.121.803C22 5.757 22 7.17 22 9.999v4c0 2.83 0 4.243-.879 5.122c-.49.49-1.146.707-2.121.803z" opacity=".5"/></svg>
3
7
  solar:chat-square-like-bold-duotone: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="m13.629 20.472l-.542.916c-.483.816-1.69.816-2.174 0l-.542-.916c-.42-.71-.63-1.066-.968-1.262c-.338-.197-.763-.204-1.613-.219c-1.256-.021-2.043-.098-2.703-.372a5 5 0 0 1-2.706-2.706C2 14.995 2 13.83 2 11.5v-1c0-3.273 0-4.91.737-6.112a5 5 0 0 1 1.65-1.651C5.59 2 7.228 2 10.5 2h3c3.273 0 4.91 0 6.113.737a5 5 0 0 1 1.65 1.65C22 5.59 22 7.228 22 10.5v1c0 2.33 0 3.495-.38 4.413a5 5 0 0 1-2.707 2.706c-.66.274-1.447.35-2.703.372c-.85.015-1.275.022-1.613.219c-.338.196-.548.551-.968 1.262" opacity=".5"/><path fill="currentColor" d="M10.99 14.308c-1.327-.978-3.49-2.84-3.49-4.593c0-2.677 2.475-3.677 4.5-1.609c2.025-2.068 4.5-1.068 4.5 1.609c0 1.752-2.163 3.615-3.49 4.593c-.454.335-.681.502-1.01.502c-.329 0-.556-.167-1.01-.502"/></svg>
@@ -10,16 +14,17 @@ default:goback: <svg aria-hidden="true" viewBox="0 0 16 16" fill="currentColor">
10
14
  # 必须包含 class="loading"
11
15
  default:loading: <svg class="loading" style="vertical-align:middle;fill:currentColor;overflow:hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2709"><path d="M832 512c0-176-144-320-320-320V128c211.2 0 384 172.8 384 384h-64zM192 512c0 176 144 320 320 320v64C300.8 896 128 723.2 128 512h64z" p-id="2710"></path></svg>
12
16
 
13
- # 必须包含 class="icon search-icon"
14
- default:search: <svg t="1705074644177" class="icon search-icon" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1560" width="200" height="200"><path d="M1008.839137 935.96571L792.364903 719.491476a56.783488 56.783488 0 0 0-80.152866 0 358.53545 358.53545 0 1 1 100.857314-335.166073 362.840335 362.840335 0 0 1-3.689902 170.145468 51.248635 51.248635 0 1 0 99.217358 26.444296 462.057693 462.057693 0 1 0-158.255785 242.303546l185.930047 185.725053a51.248635 51.248635 0 0 0 72.568068 0 51.248635 51.248635 0 0 0 0-72.978056z" p-id="1561"></path><path d="M616.479587 615.969233a50.428657 50.428657 0 0 0-61.498362-5.534852 174.655348 174.655348 0 0 1-177.525271 3.484907 49.403684 49.403684 0 0 0-58.833433 6.76482l-3.074918 2.869923a49.403684 49.403684 0 0 0 8.609771 78.10292 277.767601 277.767601 0 0 0 286.992355-5.739847 49.403684 49.403684 0 0 0 8.404776-76.667958z" p-id="1562"></path></svg>
17
+ default:search: <svg t="1705074644177" viewBox="0 0 1025 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1560" width="200" height="200"><path d="M1008.839137 935.96571L792.364903 719.491476a56.783488 56.783488 0 0 0-80.152866 0 358.53545 358.53545 0 1 1 100.857314-335.166073 362.840335 362.840335 0 0 1-3.689902 170.145468 51.248635 51.248635 0 1 0 99.217358 26.444296 462.057693 462.057693 0 1 0-158.255785 242.303546l185.930047 185.725053a51.248635 51.248635 0 0 0 72.568068 0 51.248635 51.248635 0 0 0 0-72.978056z" p-id="1561"></path><path d="M616.479587 615.969233a50.428657 50.428657 0 0 0-61.498362-5.534852 174.655348 174.655348 0 0 1-177.525271 3.484907 49.403684 49.403684 0 0 0-58.833433 6.76482l-3.074918 2.869923a49.403684 49.403684 0 0 0 8.609771 78.10292 277.767601 277.767601 0 0 0 286.992355-5.739847 49.403684 49.403684 0 0 0 8.404776-76.667958z" p-id="1562"></path></svg>
15
18
  default:rss: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M5 21q-.825 0-1.412-.587T3 19q0-.825.588-1.412T5 17q.825 0 1.413.588T7 19q0 .825-.587 1.413T5 21m13.5 0q-.65 0-1.088-.475T16.9 19.4q-.275-2.425-1.312-4.537T12.9 11.1q-1.65-1.65-3.762-2.687T4.6 7.1q-.65-.075-1.125-.512T3 5.5q0-.65.45-1.062t1.075-.363q3.075.275 5.763 1.563t4.737 3.337q2.05 2.05 3.338 4.738t1.562 5.762q.05.625-.363 1.075T18.5 21m-6 0q-.625 0-1.075-.437T10.85 19.5q-.225-1.225-.787-2.262T8.65 15.35q-.85-.85-1.888-1.412T4.5 13.15q-.625-.125-1.062-.575T3 11.5q0-.65.45-1.075t1.075-.325q1.825.25 3.413 1.063t2.837 2.062q1.25 1.25 2.063 2.838t1.062 3.412q.1.625-.325 1.075T12.5 21"/></svg>
16
19
 
17
20
  # 必须包含 class="active-icon"
18
21
  default:bookmark.active: <svg class="active-icon" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M21 11.098v4.993c0 3.096 0 4.645-.734 5.321c-.35.323-.792.526-1.263.58c-.987.113-2.14-.907-4.445-2.946c-1.02-.901-1.529-1.352-2.118-1.47a2.225 2.225 0 0 0-.88 0c-.59.118-1.099.569-2.118 1.47c-2.305 2.039-3.458 3.059-4.445 2.945a2.238 2.238 0 0 1-1.263-.579C3 20.736 3 19.188 3 16.091v-4.994C3 6.81 3 4.666 4.318 3.333C5.636 2 7.758 2 12 2c4.243 0 6.364 0 7.682 1.332C21 4.665 21 6.81 21 11.098" opacity=".5"/><path fill="currentColor" d="M9 5.25a.75.75 0 0 0 0 1.5h6a.75.75 0 0 0 0-1.5z"/></svg>
19
22
 
20
- # 必须包含 class="icon"
21
- default:sidebar: <svg t="1705412886951" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8331" width="200" height="200"><path d="M638.72 970.666667h-256c-118.186667 0-198.272-25.002667-251.946667-78.72S52.053333 758.186667 52.053333 640V384c0-118.186667 25.002667-198.272 78.72-251.946667S264.533333 53.333333 382.72 53.333333h256c118.186667 0 198.272 25.002667 251.946667 78.72S969.386667 265.813333 969.386667 384v256c0 118.186667-25.002667 198.272-78.72 251.946667S756.906667 970.666667 638.72 970.666667z m-256-853.333334c-100.096 0-165.802667 19.2-206.72 59.946667S116.053333 283.904 116.053333 384v256c0 100.096 19.072 165.802667 59.946667 206.72S282.624 906.666667 382.72 906.666667h256c100.096 0 165.802667-19.072 206.72-59.946667S905.386667 740.096 905.386667 640V384c0-100.096-19.072-165.802667-59.946667-206.72S738.816 117.333333 638.72 117.333333z" p-id="8332"></path><path d="M638.72 970.666667a32 32 0 0 1-32-32V85.333333a32 32 0 0 1 32-32 32 32 0 0 1 32 32v853.333334a32 32 0 0 1-32 32zM340.053333 653.226667a31.914667 31.914667 0 0 1-22.613333-9.386667 32 32 0 0 1 0-45.269333L404.053333 512 317.44 425.386667a32 32 0 0 1 0-45.226667 32 32 0 0 1 45.226667 0l109.226666 109.226667a32 32 0 0 1 0 45.269333L362.666667 643.84a31.914667 31.914667 0 0 1-22.613334 9.386667z" p-id="8333"></path></svg>
23
+ # 侧边栏弹出按钮
24
+ default:sidebar: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="1.5"><path d="M2 11c0-3.771 0-5.657 1.172-6.828C4.343 3 6.229 3 10 3h4c3.771 0 5.657 0 6.828 1.172C22 5.343 22 7.229 22 11v2c0 3.771 0 5.657-1.172 6.828C19.657 21 17.771 21 14 21h-4c-3.771 0-5.657 0-6.828-1.172C2 18.657 2 16.771 2 13z"/><path id="sep" stroke-linecap="round" d="M5.5 10h6m-5 4h4m4.5 7V3"/></g></svg>
22
25
  default:pin: <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="m12 16.068l-3.771 3.905c-.54.559-.81.839-1.04.935c-.52.22-1.099.032-1.373-.448c-.12-.21-.158-.59-.232-1.35c-.043-.43-.064-.644-.128-.824a1.433 1.433 0 0 0-.835-.864c-.173-.067-.38-.089-.795-.133c-.734-.077-1.101-.116-1.305-.24c-.463-.284-.646-.883-.433-1.422c.094-.237.364-.517.904-1.076L5.456 12l1.238-1.238zl5.306-5.306L18.544 12l2.464 2.55c.54.56.81.84.904 1.076c.213.54.03 1.139-.433 1.423c-.204.124-.57.163-1.305.24c-.414.044-.622.066-.795.133c-.389.149-.69.462-.835.864c-.064.18-.085.394-.128.823c-.075.76-.112 1.14-.232 1.351c-.274.48-.853.669-1.374.448c-.228-.096-.498-.376-1.038-.935z" opacity=".5"/><path fill="currentColor" fill-rule="evenodd" d="M12 16a7 7 0 1 0 0-14a7 7 0 0 0 0 14m0-10c-.284 0-.474.34-.854 1.023l-.098.176c-.108.194-.162.29-.246.354c-.085.064-.19.088-.4.135l-.19.044c-.738.167-1.107.25-1.195.532c-.088.283.164.577.667 1.165l.13.152c.143.167.215.25.247.354c.032.104.021.215 0 .438l-.02.203c-.076.785-.114 1.178.115 1.352c.23.174.576.015 1.267-.303l.178-.082c.197-.09.295-.135.399-.135c.104 0 .202.045.399.135l.178.082c.691.319 1.037.477 1.267.303c.23-.174.191-.567.115-1.352l-.02-.203c-.021-.223-.032-.334 0-.438c.032-.103.104-.187.247-.354l.13-.152c.503-.588.755-.882.667-1.165c-.088-.282-.457-.365-1.195-.532l-.19-.044c-.21-.047-.315-.07-.4-.135c-.084-.064-.138-.16-.246-.354l-.098-.176C12.474 6.34 12.284 6 12 6" clip-rule="evenodd"/></svg>
26
+ default:calendar: <svg style="margin-bottom:2px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M6.94 2c.416 0 .753.324.753.724v1.46c.668-.012 1.417-.012 2.26-.012h4.015c.842 0 1.591 0 2.259.013v-1.46c0-.4.337-.725.753-.725s.753.324.753.724V4.25c1.445.111 2.394.384 3.09 1.055c.698.67.982 1.582 1.097 2.972L22 9H2v-.724c.116-1.39.4-2.302 1.097-2.972c.697-.67 1.645-.944 3.09-1.055V2.724c0-.4.337-.724.753-.724"/><path fill="currentColor" d="M22 14v-2c0-.839-.004-2.335-.017-3H2.01c-.013.665-.01 2.161-.01 3v2c0 3.771 0 5.657 1.172 6.828C4.343 22 6.228 22 10 22h4c3.77 0 5.656 0 6.828-1.172C22 19.658 22 17.772 22 14" opacity=".5"/><path fill="currentColor" d="M18 17a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m-5 4a1 1 0 1 1-2 0a1 1 0 0 1 2 0m0-4a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></svg>
27
+ default:category: <svg style="margin-bottom:1px" xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="currentColor" d="M2 6.95c0-.883 0-1.324.07-1.692A4 4 0 0 1 5.257 2.07C5.626 2 6.068 2 6.95 2c.386 0 .58 0 .766.017a4 4 0 0 1 2.18.904c.144.119.28.255.554.529L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .848.352C14.098 6 14.675 6 15.828 6h.374c2.632 0 3.949 0 4.804.77c.079.07.154.145.224.224c.77.855.77 2.172.77 4.804V14c0 3.771 0 5.657-1.172 6.828C19.657 22 17.771 22 14 22h-4c-3.771 0-5.657 0-6.828-1.172C2 19.657 2 17.771 2 14z" opacity=".5"/><path fill="currentColor" d="M20 6.238c0-.298-.005-.475-.025-.63a3 3 0 0 0-2.583-2.582C17.197 3 16.965 3 16.5 3H9.988c.116.104.247.234.462.45L11 4c.816.816 1.224 1.224 1.712 1.495a4 4 0 0 0 .849.352C14.098 6 14.675 6 15.829 6h.373c1.78 0 2.957 0 3.798.238"/><path fill="currentColor" fill-rule="evenodd" d="M12.25 10a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-5a.75.75 0 0 1-.75-.75" clip-rule="evenodd"/></svg>
23
28
 
24
29
  github:logo: <svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1em" height="1em" fill="currentColor" style="display:inline-block;user-select:none;vertical-align:text-bottom;overflow:visible"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"></path></svg>
25
30
  github:repo: <svg aria-hidden="true" role="img" class="color-icon-primary" viewBox="0 0 16 16" width="1em" height="1em" fill="currentColor" style="user-select:none;overflow:visible"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg>
@@ -30,4 +35,7 @@ github:tag: <svg aria-hidden="true" role="img" class="color-icon-primary" viewBo
30
35
  share:wechat: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/b32ef3da1162a.svg
31
36
  share:weibo: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/80c07e4dbb303.svg
32
37
  share:email: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/a1b00e20f425d.svg
33
- share:link: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/8411ed322ced6.svg
38
+ share:link: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/social/8411ed322ced6.svg
39
+
40
+ # quot icons
41
+ 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>
@@ -15,6 +15,9 @@ function layoutDiv() {
15
15
  }
16
16
  // 发布日期
17
17
  el += `<span class="text created">`
18
+ if (!author) {
19
+ el += `${__("meta.created") + __("symbol.colon")}`
20
+ }
18
21
  el += `<time datetime="${date_xml(page.date)}">${date(page.date, config.date_format)}</time>`
19
22
  el += `</span>`
20
23
  // 更新日期
@@ -1,8 +1,8 @@
1
1
  <%
2
2
  function layoutDiv() {
3
3
  var el = '';
4
- el += '<div class="nav-wrap">';
5
- el += '<nav class="sub post">';
4
+ el += '<div class="navbar top">';
5
+ el += '<nav class="post">';
6
6
  if (is_home()) {
7
7
  el += '<a class="active" href="' + url_for(config.index_generator.path) + '">' + __("btn.recent_publish") + '</a>';
8
8
  } else {
@@ -1,8 +1,8 @@
1
1
  <%
2
2
  function layoutDiv() {
3
3
  var el = '';
4
- el += '<div class="nav-wrap">';
5
- el += '<nav class="sub wiki">';
4
+ el += '<div class="navbar top">';
5
+ el += '<nav class="wiki">';
6
6
  // 所有项目
7
7
  el += '<a';
8
8
  if (page.filter === false) {
@@ -69,7 +69,7 @@ function div_default() {
69
69
  // meta
70
70
  el += '<div class="meta cap">';
71
71
  el += '<span class="cap" id="post-meta">';
72
-
72
+ el += icon('default:calendar')
73
73
  // time
74
74
  el += `<time datetime="${date_xml(post.date)}">${date(post.date, config.date_format)}</time>`
75
75
  el += '</span>';
@@ -85,7 +85,8 @@ function div_default() {
85
85
  if (cats.length > 0) {
86
86
  let cat = cats.shift();
87
87
  el += '<span class="cap breadcrumb"' + category_color(cat) + '>';
88
- el += cat;
88
+ el += icon('default:category')
89
+ el += `<span>${cat}</span>`
89
90
  el += '</span>';
90
91
  }
91
92
  }
@@ -10,7 +10,7 @@ function relatedPostsInTopic() {
10
10
  var el = ''
11
11
  el += `<widget class="widget-wrapper${scrollreveal(' ')} post-list">`
12
12
  el += `<div class="widget-header dis-select">`
13
- el += `<span class="name">${__('btn.topic') + __('symbol.colon') + topic.name}</span>`
13
+ el += `<span class="name">${__('btn.topic') + __('symbol.colon') + (topic.name || topic.title)}</span>`
14
14
  el += `</div>`
15
15
  el += `<div class="widget-body">`
16
16
  for (let post of topic.pages) {
@@ -13,7 +13,7 @@ if (page.menu_id == undefined) {
13
13
  <% site.categories.sort('path').each(function(category){ %>
14
14
  <div>
15
15
  <a class="<%= category.parent ? 'cat child' : 'cat'%>" href="<%= url_for(category.path) %>">
16
- <span class='name'><%- category.name %></span>
16
+ <span class='name'><%- icon('default:category') %><%- category.name %></span>
17
17
  <span class='badge'>(<%- category.posts.length %>)</span>
18
18
  </a>
19
19
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-stellar",
3
- "version": "1.26.4",
3
+ "version": "1.26.5",
4
4
  "description": "Elegant and powerful theme for Hexo.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -70,4 +70,20 @@ module.exports = hexo => {
70
70
  return ret.join('&');
71
71
  }
72
72
  };
73
+ hexo.utils = {
74
+ icon: (key, args) => {
75
+ const { icons } = hexo.theme.config
76
+ var result = ''
77
+ if (icons[key]) {
78
+ result = icons[key]
79
+ } else {
80
+ result = key
81
+ }
82
+ if (result.startsWith('/') || result.startsWith('https://') || result.startsWith('http://')) {
83
+ return `<img ${args?.length > 0 ? args : ''} src="${result}" />`
84
+ } else {
85
+ return result
86
+ }
87
+ }
88
+ };
73
89
  };
@@ -1,16 +1,5 @@
1
1
  'use strict';
2
2
 
3
3
  hexo.extend.helper.register('icon', function(key, args) {
4
- const { icons } = hexo.theme.config
5
- var result = ''
6
- if (icons[key]) {
7
- result = icons[key]
8
- } else {
9
- result = key
10
- }
11
- if (result.startsWith('/') || result.startsWith('https://') || result.startsWith('http://')) {
12
- return `<img ${args?.length > 0 ? args : ''} src="${result}" />`
13
- } else {
14
- return result
15
- }
4
+ return hexo.utils.icon(key, args)
16
5
  })
@@ -29,6 +29,7 @@ hexo.extend.tag.register('checkbox', require('./lib/checkbox')(hexo, 'checkbox')
29
29
  hexo.extend.tag.register('radio', require('./lib/checkbox')(hexo, 'radio'))
30
30
  hexo.extend.tag.register('copy', require('./lib/copy')(hexo))
31
31
  hexo.extend.tag.register('emoji', require('./lib/emoji')(hexo))
32
+ hexo.extend.tag.register('icon', require('./lib/icon')(hexo))
32
33
  hexo.extend.tag.register('frame', require('./lib/frame')(hexo))
33
34
  hexo.extend.tag.register('image', require('./lib/image')(hexo))
34
35
  hexo.extend.tag.register('link', require('./lib/link')(hexo))
@@ -0,0 +1,27 @@
1
+ /**
2
+ * icon.js v1.0 | https://github.com/xaoxuu/hexo-theme-stellar/
3
+ * 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
4
+ *
5
+ * {% icon key [color:color] [style:css] %}
6
+ *
7
+ */
8
+
9
+ 'use strict'
10
+
11
+ module.exports = ctx => function(args) {
12
+ args = ctx.args.map(args, ['color', 'style'], ['key'])
13
+ if (args.color == null) {
14
+ args.color = ctx.theme.config.tag_plugins.icon.default_color
15
+ }
16
+ var el = ''
17
+ el += '<span class="tag-plugin colorful icon"'
18
+ el += ' ' + ctx.args.joinTags(args, ['color']).join(' ')
19
+ el += '>'
20
+ var more = ''
21
+ if (args.style) {
22
+ more += `style="${args.style}"`
23
+ }
24
+ el += ctx.utils.icon(args.key, more)
25
+ el += '</span>'
26
+ return el
27
+ }
@@ -18,7 +18,7 @@ module.exports = ctx => function(args) {
18
18
  if (args.links) {
19
19
  args.links = args.links.split(' ')
20
20
  }
21
- var el = `<div class="tag-plugin navbar"><nav class="cap">`
21
+ var el = `<div class="tag-plugin navbar"><nav>`
22
22
  for (let link of args.links) {
23
23
  const matches = link.match(/\[(.*?)\]\((.*?)\)/i)
24
24
  if (matches?.length > 2) {
@@ -3,7 +3,7 @@
3
3
  * 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
4
4
  *
5
5
  * quot:
6
- * {% quot [el:h2] [icon:default] text %}
6
+ * {% quot [el:h2] [icon:default] [prefix:icon] text [suffix:icon] %}
7
7
  *
8
8
  */
9
9
 
@@ -11,29 +11,32 @@
11
11
 
12
12
  module.exports = ctx => function(args) {
13
13
  var el = ''
14
- args = ctx.args.map(args, ['el', 'icon'], ['text'])
14
+ args = ctx.args.map(args, ['el', 'icon', 'prefix', 'suffix'], ['text'])
15
15
  if (!args.el) {
16
16
  args.el = 'p'
17
17
  }
18
18
 
19
19
  var type = ''
20
- if (args.icon && args.icon != 'square' && args.icon != 'quotes') {
20
+ if (args.icon || args.prefix || args.suffix) {
21
21
  type = ' type="icon"'
22
22
  } else {
23
23
  type = ' type="text"'
24
24
  }
25
25
  function content() {
26
- if (!args.icon) {
27
- return args.text
28
- }
29
- var el = ''
30
26
  const cfg = ctx.theme.config.tag_plugins.quot[args.icon]
31
- if (cfg && cfg.prefix) {
32
- el += '<img class="icon prefix" src="' + cfg.prefix + '" />'
27
+ var el = ''
28
+ var prefix = args.prefix || cfg?.prefix
29
+ var suffix = args.suffix || cfg?.suffix
30
+ if (prefix) {
31
+ el += ctx.utils.icon(prefix, 'class="icon prefix"')
32
+ } else {
33
+ el += `<span class="empty"></span>`
33
34
  }
34
- el += args.text
35
- if (cfg && cfg.suffix) {
36
- el += '<img class="icon suffix" src="' + cfg.suffix + '" />'
35
+ el += `<span class="text">${args.text}</span>`
36
+ if (suffix) {
37
+ el += ctx.utils.icon(suffix, 'class="icon prefix"')
38
+ } else {
39
+ el += `<span class="empty"></span>`
37
40
  }
38
41
  return el
39
42
  }
@@ -25,8 +25,7 @@ img
25
25
 
26
26
 
27
27
  li
28
- --fsp: var(--fsp1)
29
- font-size: var(--fsp)
28
+ font-size: 'calc(%s - 1px)' % var(--fsp)
30
29
 
31
30
 
32
31
  ul,ol
@@ -41,7 +40,7 @@ table:not([class])
41
40
  margin: 1rem 0
42
41
  max-width: 100%
43
42
  vertical-align: text-top
44
- --fsp: var(--fsp2)
43
+ --fsp: $fsp2
45
44
  font-size: var(--fsp)
46
45
  th
47
46
  background: var(--block)
@@ -26,20 +26,31 @@
26
26
  if hexo-config('style.darkmode') == 'always'
27
27
  --blur-bg: alpha(#000, .4)
28
28
 
29
+ // 侧边栏弹出按钮
29
30
  .sidebar-toggle.mobile
30
31
  cursor: pointer
31
32
  color: var(--text)
32
33
  background: none
33
34
  padding: 8px
34
35
  line-height: 0
35
- font-size: 24px
36
+ font-size: 28px
36
37
  margin: 0
38
+ display: flex
39
+ >*
40
+ path#sep
41
+ trans1 transform
42
+ width: auto
43
+ height: 28px
44
+ // 侧边栏弹出后
45
+ .l_body.mobile.sidebar .sidebar-toggle.mobile
46
+ svg g
47
+ fill: currentColor
48
+ fill-opacity: 0.3
49
+ path#sep
50
+ transform: translateX(2px)
37
51
 
38
52
 
39
53
  .l_body.mobile.sidebar
40
- .float-panel
41
- box-shadow: $boxshadow-float
42
- transform: translateY(-2px)
43
54
  .sidebar-toggle.mobile
44
55
  background: var(--card)
45
56
  color: $color-hover
@@ -1,18 +1,19 @@
1
1
  h1,.h1
2
- font-size: $fs-h1
2
+ font-size: var(--fsh2)
3
3
  font-weight: 700
4
4
  @media screen and (max-width: $device-mobile)
5
- font-size: $fs-h1
5
+ font-size: var(--fsh2)
6
6
  h2,.h2
7
- font-size: $fs-h2
7
+ font-size: var(--fsh2)
8
+ margin-top: 1.5em
8
9
  h3,.h3
9
- font-size: $fs-h3
10
+ font-size: var(--fsh3)
10
11
  h4,.h4
11
- font-size: $fs-h4
12
+ font-size: var(--fsh4)
12
13
  h5
13
- font-size: $fs-h5
14
+ font-size: 'calc(%s + 1px)' % var(--fsp)
14
15
  h6
15
- font-size: $fs-h6
16
+ font-size: 'calc(%s + 0px)' % var(--fsp)
16
17
 
17
18
  // 次级段落字号
18
19
  .fs15
@@ -44,16 +44,20 @@ $fs-14 = .875rem
44
44
  $fs-13 = .8125rem
45
45
  $fs-12 = .75rem
46
46
 
47
- $fs-h1 = 2rem // 32px
48
- $fs-h2 = 1.75rem // 28px
49
- $fs-h3 = 1.375rem // 22px
50
- $fs-h4 = 1.125rem // 18px
51
- $fs-h5 = $fs-15
52
- $fs-h6 = $fs-12
53
47
  $fs-body = convert(hexo-config('style.font-size.body'))
54
48
  $fs-code = convert(hexo-config('style.font-size.code'))
55
49
  $fs-codeblock = convert(hexo-config('style.font-size.codeblock'))
56
50
 
51
+ $fsh1 = 'calc(%s + 11px)' % $fs-body
52
+ $fsh2 = 'calc(%s + 11px)' % $fs-body
53
+ $fsh3 = 'calc(%s + 7px)' % $fs-body
54
+ $fsh4 = 'calc(%s + 4px)' % $fs-body
55
+ $fsh5 = 'calc(%s + 2px)' % $fs-body
56
+
57
+ $fsp0 = 'calc(%s - 0px)' % $fs-body
58
+ $fsp1 = 'calc(%s - 1px)' % $fs-body
59
+ $fsp2 = 'calc(%s - 2px)' % $fs-body
60
+ $fsp3 = 'calc(%s - 3px)' % $fs-body
57
61
 
58
62
  $border-card = convert(hexo-config('style.border-radius.card'))
59
63
  $border-block = convert(hexo-config('style.border-radius.block'))
@@ -65,11 +69,11 @@ $border-button = 4px
65
69
  :root
66
70
  --width-left: 288px
67
71
  --width-main: 720px
68
- --fs-body: $fs-body
69
- --fsp: var(--fs-body)
70
- --fsp1: 'calc(%s - 1px)' % var(--fsp)
71
- --fsp2: 'calc(%s - 2px)' % var(--fsp)
72
- --fsp3: 'calc(%s - 3px)' % var(--fsp)
72
+ --fsp: $fs-body
73
+ --fsh2: 'calc(%s + 11px)' % var(--fsp)
74
+ --fsh3: 'calc(%s + 7px)' % var(--fsp)
75
+ --fsh4: 'calc(%s + 4px)' % var(--fsp)
76
+
73
77
  --gap-l: 16px
74
78
  --gap-p: 'calc(%s + 4px)' % $fs-body // gap for paragraph
75
79
  --gap-p-compact: 'calc(%s * 0.75)' % $fs-body
@@ -9,12 +9,12 @@
9
9
  font-weight: 500
10
10
  margin: 1.25rem 0 .75rem 0
11
11
  line-height: 1.2
12
- font-size: $fs-h3
12
+ font-size: $fsh4
13
13
  border-bottom: none
14
14
  color: var(--text)
15
15
  trans1 color
16
16
  @media screen and (max-width: $device-mobile)
17
- font-size: $fs-h4
17
+ font-size: $fsh5
18
18
  margin: 0.5rem 0
19
19
  .wiki .post-title
20
20
  margin-top: 0.5rem
@@ -46,20 +46,26 @@
46
46
  margin: 0.5rem 0
47
47
  line-height: 1.5
48
48
  .meta.cap
49
- display: flex
49
+ &,span
50
+ display: flex
51
+ align-items: center
50
52
  flex-wrap: wrap
51
- align-items: center
52
- margin: 0.25rem 0
53
- line-height: 1.5
54
- span+span
55
- margin-left: 0.5rem
56
- span.pin
53
+ margin: 0
54
+ line-height: 2
55
+ --fsp: $fsp1
56
+ font-size: var(--fsp)
57
+ svg
58
+ height: 1em
59
+ width: auto
57
60
  line-height: 0
61
+ transform: scale(1.2)
62
+ margin-right: 8px
63
+ >span+span
64
+ margin-left: 1.5rem
65
+ span.pin
58
66
  img
59
67
  object-fit: contain
60
- height: 1.5em
61
68
  svg
62
- height: 1.5rem
63
69
  color: $c-red
64
70
 
65
71
  .post-list.post .post-card:hover
@@ -121,18 +127,18 @@
121
127
  color: unset
122
128
  .title
123
129
  font-weight: 500
124
- font-size: $fs-h3
130
+ font-size: $fsh3
125
131
  @media screen and (max-width: $device-mobile)
126
132
  padding: 1rem
127
133
  div+div
128
134
  margin-top: 2px
129
135
  .title
130
- font-size: $fs-h4
136
+ font-size: $fsh4
131
137
  .cap
132
138
  font-size: $fs-12
133
139
  h2
134
140
  margin: .25rem 0
135
- font-size: $fs-h4
141
+ font-size: $fsh4
136
142
 
137
143
 
138
144
  // wiki
@@ -22,13 +22,13 @@
22
22
  .l_body[text-indent] .md-text.content
23
23
  >p
24
24
  text-indent: 'calc(%s * 2)' % var(--fsp)
25
- text-align: convert(hexo-config('style.text-align'))
25
+ text-align: justify
26
26
  h1,h2,h3,h4,h5,h6
27
27
  text-align: center
28
28
  a.headerlink
29
29
  display: none
30
- >h2:not([class])
31
- border-bottom: none
30
+ h2
31
+ margin: 2em 0 1.5em
32
32
 
33
33
  .md-text
34
34
  ul:not(:last-child),
@@ -37,7 +37,7 @@
37
37
  margin: 0
38
38
  blockquote,ul,ol
39
39
  p,ul,ol
40
- --fsp: var(--fsp1)
40
+ --fsp: $fsp1
41
41
  font-size: var(--fsp)
42
42
  line-height: 1.5
43
43
  code
@@ -59,7 +59,6 @@
59
59
  // titles
60
60
  .md-text.content
61
61
  h1,h2,h3,h4,h5,h6
62
- margin-bottom: var(--gap-p)
63
62
  color: var(--text)
64
63
  line-height: 1.8
65
64
  blockquote, .tag-plugin
@@ -81,17 +80,10 @@
81
80
  padding: 0 2px
82
81
  font-size: $fs-12
83
82
  h2
84
- margin-top: 'calc(%s + 1rem)' % var(--gap-p)
85
- font-weight: 400
83
+ font-weight: 500
86
84
  a.headerlink:before
87
85
  content: ':'
88
- h3
89
- margin-top: 'calc(%s + 0.75rem)' % var(--gap-p)
90
- font-weight: 400
91
- h4,h5,h6
92
- margin-top: 'calc(%s + 0.5rem)' % var(--gap-p)
93
- font-weight: 500
94
-
86
+
95
87
  .md-text.content:first-child .tag-plugin:first-child
96
88
  margin-top: 0
97
89
 
@@ -52,7 +52,15 @@
52
52
  align-items: center
53
53
  justify-content: space-between
54
54
  font-weight: 500
55
- font-size: $fs-14
55
+ font-size: $fsp2
56
+ span
57
+ display: flex
58
+ align-items: center
59
+ svg
60
+ height: 1em
61
+ width: auto
62
+ transform: scale(1.2)
63
+ margin-right: 8px
56
64
  .badge
57
65
  font-weight: 700
58
66
  font-family: $ff-code
@@ -15,7 +15,7 @@
15
15
  align-items: flex-start
16
16
  margin: 1rem 'calc(1rem - 4px)'
17
17
  .title
18
- font-size: $fs-h1
18
+ font-size: $fsh1
19
19
  color: var(--text-banner)
20
20
  .bottom
21
21
  padding: 1.5rem 1rem
@@ -23,7 +23,8 @@
23
23
  line-height: 1.2
24
24
  margin: 0
25
25
 
26
-
26
+ .l_body[text-indent] .article.banner .content .bottom
27
+ justify-content: center
27
28
 
28
29
 
29
30
  // 动画配置
@@ -9,9 +9,9 @@
9
9
  .header
10
10
  font-weight: 500
11
11
  color: var(--text-p2)
12
- font-size: $fs-h4
12
+ font-size: $fsh5
13
13
  .body
14
- --fsp: var(--fsp2)
14
+ --fsp: $fsp2
15
15
  input.copy-area
16
16
  margin: 0.75rem 0
17
17
  padding: 0
@@ -29,7 +29,7 @@
29
29
  line-height: 1.2
30
30
  word-break: break-all
31
31
  p
32
- --fsp: var(--fsp2)
32
+ --fsp: $fsp2
33
33
  a
34
34
  text-decoration: none
35
35
  color: unset
@@ -1,4 +1,4 @@
1
- .nav-wrap
1
+ .navbar
2
2
  padding: 0 1rem
3
3
  z-index: 8
4
4
  top: 0
@@ -13,15 +13,15 @@
13
13
  margin-top: -8px
14
14
  &:after
15
15
  content: ''
16
- width: 'calc(100% - 2 * %s)' % 1rem
17
16
  height: 2px
18
17
  border-radius: 2px
19
18
  position: absolute
20
19
  bottom: 0
21
20
  left: 1rem
21
+ right: 1rem
22
22
  background: var(--block-hover)
23
23
 
24
- nav.sub
24
+ .navbar nav
25
25
  display: flex
26
26
  overflow: scroll visible
27
27
  scrollbar(0, 0)
@@ -29,7 +29,7 @@ nav.sub
29
29
  >p
30
30
  margin: 0
31
31
  a
32
- padding: .25rem 0.75rem
32
+ padding: 2px 0.75rem
33
33
  if hexo-config('style.site') && hexo-config('style.site.background-image')
34
34
  margin: 10px 0.25rem 8px 0
35
35
  else
@@ -57,13 +57,15 @@ nav.sub
57
57
  &.active
58
58
  background: var(--card)
59
59
  box-shadow: $boxshadow-button
60
+ cursor default
61
+ pointer-events: none
60
62
  &.active:after
61
63
  content: ''
62
64
  a+a
63
65
  margin-left: 4px
64
66
 
65
67
  @media screen and (max-width: $device-mobile-max)
66
- .nav-wrap
68
+ .navbar.top
67
69
  margin-top: 0
68
70
  padding-left: 0
69
71
  padding-right: 0
@@ -31,7 +31,7 @@ article.md-text.content+.related-wrap
31
31
  .title
32
32
  color: var(--text-p1)
33
33
  font-weight: 500
34
- --fsp: var(--fsp1)
34
+ --fsp: $fsp1
35
35
  font-size: var(--fsp)
36
36
  trans2 color border
37
37
  position: relative
@@ -40,7 +40,7 @@ article.md-text.content+.related-wrap
40
40
  line-height: 1.6
41
41
  .excerpt
42
42
  color: var(--text-p3)
43
- --fsp: var(--fsp3)
43
+ --fsp: $fsp3
44
44
  font-size: var(--fsp)
45
45
  margin-top: 0.5rem
46
46
  display: -webkit-box
@@ -74,7 +74,7 @@ article.md-text.content+.related-wrap
74
74
  margin: 0
75
75
  line-height: 1.2
76
76
  color: var(--text-p1)
77
- font-size: $fs-h4
77
+ font-size: $fsh5
78
78
  &:hover
79
79
  color: $color-hover !important
80
80
  #next
@@ -82,7 +82,7 @@ article.md-text.content+.related-wrap
82
82
  .wiki+.related-wrap#read-next
83
83
  .item
84
84
  a
85
- font-size: $fs-h3
85
+ font-size: $fsh3
86
86
  &#prev a
87
87
  color: var(--text-p3)
88
88
 
@@ -18,29 +18,31 @@
18
18
  background: var(--alpha100)
19
19
  .search-input
20
20
  width: 100%
21
- line-height: 16px
22
21
  box-sizing: border-box
23
22
  font-family: $ff-body
24
- font-size: $fs-13
23
+ font-size: $fs-14
25
24
  padding: 12px 0
26
25
  color: var(--text)
27
26
  .search-button
28
27
  border-radius: $border-bar
29
- line-height: 40px
30
- .search-icon
31
- width: 44px
32
- margin-left: 4px
33
- color: var(--text-p2)
34
- margin-bottom: 2px
35
- path[p-id="1562"]
36
- color: $color-theme
28
+ display: flex
29
+ align-items: center
30
+ height: 40px
31
+ svg
32
+ height: 1rem
33
+ width: 40px
34
+ margin-left: 4px
35
+ color: var(--text-p2)
36
+ fill: currentColor
37
+ path[p-id="1562"]
38
+ color: $color-theme
37
39
 
38
40
  &[searching='true']
39
- .search-icon
41
+ .search-button
40
42
  path[p-id="1562"]
41
43
  color: $c-green
42
44
  &.noresult[searching='true']
43
- .search-icon
45
+ .search-button
44
46
  path[p-id="1562"]
45
47
  color: $c-red
46
48
 
@@ -1,5 +1,5 @@
1
1
  .l_left
2
- margin-right: 8px
2
+ margin: 8px 8px 8px 0
3
3
  height: 'calc(%s - 16px)' % 100vh
4
4
  border-radius: $border-card
5
5
  overflow: hidden
@@ -24,24 +24,34 @@
24
24
  align-items: center
25
25
  line-height: 1
26
26
  margin: 1rem
27
- .navbar
27
+ .tag-plugin.navbar
28
28
  margin: 0
29
- nav.cap
30
- border-radius: 6px
31
- background: rgba(black, 0.2)
29
+ border-radius: 6px
30
+ padding: 2px
31
+ background: rgba(black, 0.2)
32
+ overflow: hidden
33
+ &:after
34
+ content: none
32
35
  .link
36
+ margin: 0
37
+ border-radius: 4px
33
38
  color: rgba(white, 0.8)
34
39
  padding: 2px 6px
35
- border-radius: 4px
36
40
  background: none
37
41
  line-height: 1.5
38
42
  font-size: $fs-15
39
- &.active
43
+ text-shadow: 0 0 1px rgba(0,0,0,0.12)
44
+ &+.link
45
+ margin-left: 2px
46
+ &:after
47
+ content: none
48
+ &:hover
40
49
  color: white
41
50
  background: rgba(white, 0.25)
42
- &:hover
51
+ &.active
43
52
  color: white
44
- background: rgba(black, 0.5) !important
53
+ background: rgba(white, 0.25)
54
+
45
55
  .back
46
56
  background: none
47
57
  padding: 0
@@ -40,6 +40,10 @@ set_dynamic_color($theme)
40
40
  set_dynamic_color($c-blue)
41
41
  .colorful[color='purple']
42
42
  set_dynamic_color($c-purple)
43
+ .colorful[color='theme']
44
+ set_dynamic_color($color-theme)
45
+ .colorful[color='accent']
46
+ set_dynamic_color($color-accent)
43
47
 
44
48
  .colorful[color='light']
45
49
  --theme-block: white
@@ -1,6 +1,6 @@
1
1
  .tag-plugin.folders
2
2
  margin: var(--gap-p) 0
3
- --fsp: var(--fsp2)
3
+ --fsp: $fsp2
4
4
  font-size: var(--fsp)
5
5
  border-top: 1px solid var(--block-border)
6
6
  overflow: hidden
@@ -43,7 +43,7 @@
43
43
  content: '-'
44
44
 
45
45
  >div.body
46
- --fsp: var(--fsp1)
46
+ --fsp: $fsp1
47
47
  >:first-child
48
48
  margin-top: 1rem
49
49
  >:last-child
@@ -11,7 +11,7 @@ details.folding
11
11
  margin: -1rem
12
12
  color: var(--text-p2)
13
13
  font-weight: 500
14
- --fsp: var(--fsp2)
14
+ --fsp: $fsp2
15
15
  font-size: var(--fsp)
16
16
  position: relative
17
17
  line-height: 1.2
@@ -45,7 +45,7 @@ details.folding[open]
45
45
  padding: 0 1rem 1rem
46
46
  margin: 0 -1rem -1rem
47
47
  color: var(--text-p1)
48
- --fsp: var(--fsp1)
48
+ --fsp: $fsp1
49
49
  >:first-child
50
50
  margin-top: 1rem
51
51
  >:last-child
@@ -6,7 +6,7 @@
6
6
  margin: 2px 0
7
7
  display: inline-flex
8
8
  align-items: center
9
- --fsp: var(--fsp2)
9
+ --fsp: $fsp2
10
10
  font-size: var(--fsp)
11
11
  font-weight: 500
12
12
  trans2 background color
@@ -0,0 +1,12 @@
1
+ span.tag-plugin.icon
2
+ display: inline-block
3
+ margin: -4px 1px 0
4
+ vertical-align: middle
5
+ svg,img
6
+ display: block
7
+ height: 1.5em
8
+ width: auto
9
+ svg
10
+ color: var(--theme)
11
+ img
12
+ object-fit: contain
@@ -1,22 +1,9 @@
1
- .md-text .tag-plugin.navbar
2
- text-align: center
3
- nav.cap
4
- margin: 0
5
- padding: 1px
6
- background: var(--card)
7
- box-shadow: $boxshadow-button
8
- border-radius: 6px
9
- display: inline-flex
10
- max-width: 100%
11
- a
12
- margin: 1px
13
- padding: 0.25em 0.75rem
14
- color: var(--text-p2)
15
- &:after
16
- display: none
17
- &:hover
18
- background: var(--block)
19
- &.active
20
- background: var(--block)
21
- box-shadow: none
22
- color: var(--text-p1)
1
+ .tag-plugin.navbar
2
+ padding: 0
3
+ &:after
4
+ left: 0
5
+ right: 0
6
+
7
+ @media screen and (min-width: $device-mobile-max)
8
+ .tag-plugin.navbar nav a
9
+ margin-top: 2px
@@ -8,7 +8,7 @@
8
8
  border: 1px solid var(--theme-border)
9
9
  color: var(--text-p1)
10
10
  >.title
11
- --fsp: var(--fsp1)
11
+ --fsp: $fsp1
12
12
  font-size: var(--fsp)
13
13
  line-height: 1.5
14
14
  margin-top: var(--gap-p-compact)
@@ -16,7 +16,7 @@
16
16
  color: var(--text)
17
17
  >.body
18
18
  &,p
19
- --fsp: var(--fsp2)
19
+ --fsp: $fsp2
20
20
  font-size: var(--fsp)
21
21
  line-height: 1.5
22
22
  margin-top: var(--gap-p-compact)
@@ -8,7 +8,7 @@
8
8
  margin-top: var(--gap-p)
9
9
  >.meta
10
10
  color: var(--text-p2)
11
- --fsp: var(--fsp3)
11
+ --fsp: $fsp3
12
12
  font-size: var(--fsp)
13
13
  font-weight: 500
14
14
  span+span
@@ -22,7 +22,7 @@
22
22
  font-style: italic
23
23
  color: var(--text-p4)
24
24
  margin: var(--gap-p) 0
25
- --fsp: var(--fsp3)
25
+ --fsp: $fsp3
26
26
  font-size: var(--fsp)
27
27
 
28
28
  // 描边修饰
@@ -3,36 +3,34 @@
3
3
  align-items: center
4
4
  display: flex
5
5
  flex-direction: column
6
-
6
+ --gap-p: 2rem
7
+ margin: var(--gap-p) 1rem
7
8
  .content
8
9
  display: flex
9
10
  align-items: center
10
11
  border-bottom: none
11
12
  font-weight: 700
12
- padding: 16px 24px
13
+ padding: 0 24px
13
14
  a.headerlink
14
15
  display: none
15
16
  @media screen and (max-width: $device-mobile)
16
- padding: 12px 20px
17
+ padding: 0 20px
17
18
  line-height: 1.2
18
19
 
19
20
  .md-text .tag-plugin.quot .content
20
- max-width 500px
21
21
  position: relative
22
22
  // override
23
23
  .md-text.content .tag-plugin.quot
24
- h1
25
- font-size: $fs-h1
24
+ h1,h2
25
+ font-size: $fsh2
26
26
  font-weight: 900
27
- padding: 20px 32px 12px 32px
27
+ padding: 4px 32px 0
28
28
  @media screen and (max-width: $device-mobile)
29
- padding: 20px 24px 12px
30
- h2,h3,h4,h5,h6
31
- font-size: $fs-h3
32
- margin-top: 1em
33
- margin-bottom: 0
29
+ padding: 4px 24px 0
30
+ h3,h4,h5,h6
31
+ font-size: $fsh3
34
32
  p
35
- font-size: $fs-h4
33
+ --fsp: $fsh4
36
34
  color: var(--text)
37
35
 
38
36
  // type=text
@@ -44,13 +42,13 @@
44
42
  width: 8px
45
43
  height: 14px
46
44
  &:before
47
- top: 8px
45
+ top: -8px
48
46
  left: 0
49
47
  border-top: 6px solid $color-accent
50
48
  border-left: 6px solid $color-accent
51
49
  &:after
52
50
  right: 0
53
- bottom: 8px
51
+ bottom: -8px
54
52
  border-right: 6px solid $color-accent
55
53
  border-bottom: 6px solid $color-accent
56
54
  h1.content[type=text]
@@ -61,13 +59,15 @@
61
59
 
62
60
  // type=icon
63
61
  .md-text .tag-plugin.quot .content[type=icon]
64
- .icon
62
+ img,svg
65
63
  height: 1.5em
66
64
  display: inline-block
67
65
  color: $color-accent
68
66
  border-radius: 0
69
- &.prefix
70
- margin-left: -0.5rem
71
- margin-right: .5rem
72
- &.suffix
73
- margin-left: .5rem
67
+ flex-shrink: 0
68
+ span.text
69
+ margin: 0 .5rem
70
+ padding-top: 1px
71
+ span.empty
72
+ padding: 0 8px
73
+
@@ -42,7 +42,7 @@
42
42
  display: block
43
43
  cursor: pointer
44
44
  padding: .25rem .75rem
45
- --fsp: var(--fsp3)
45
+ --fsp: $fsp3
46
46
  font-size: var(--fsp)
47
47
  line-height: inherit
48
48
  font-weight: 500
@@ -1,6 +1,5 @@
1
1
  .md-text .tag-plugin.timeline
2
2
  position: relative
3
- margin-top: 0
4
3
  padding-left: 16px
5
4
  &:before
6
5
  content: ''
@@ -102,7 +101,7 @@
102
101
  margin-top: 4px
103
102
  box-shadow: $boxshadow-block
104
103
  p
105
- --fsp: var(--fsp1)
104
+ --fsp: $fsp1
106
105
  img
107
106
  display: block
108
107
  &:empty
@@ -123,7 +122,7 @@
123
122
  color: var(--text-p1)
124
123
  line-height: 1.25
125
124
  padding: 0.75rem 1rem
126
- --fsp: var(--fsp1)
125
+ --fsp: $fsp1
127
126
  font-size: var(--fsp)
128
127
 
129
128
 
@@ -142,7 +141,7 @@
142
141
  trans1 all
143
142
  &:hover
144
143
  border-bottom: 2px solid $color-hover
145
- p:first-child:not([class]) a:not([class])
144
+ >p:first-child:not([class]) a:not([class])
146
145
  padding: 0
147
146
  margin: 0
148
147
  color: inherit
@@ -205,7 +204,7 @@
205
204
  padding: 0 0.5rem
206
205
  margin: 0.75rem 0
207
206
  p
208
- --fsp: var(--fsp2)
207
+ --fsp: $fsp2
209
208
  margin: 0.25rem
210
209
 
211
210
  .tag-plugin.timeline .body
@@ -22,7 +22,7 @@
22
22
 
23
23
  p.username
24
24
  font-weight: 900
25
- font-size: $fs-h2
25
+ font-size: $fsh2
26
26
  color: var(--text)
27
27
  margin: 0
28
28
  p.bio
@@ -1,6 +1,15 @@
1
1
  .widget-wrapper.timeline
2
2
  .widget-body
3
3
  margin-top: 0.5rem
4
+ .body
5
+ a
6
+ trans1 all
7
+ border-bottom: 1px solid var(--text)
8
+ color: var(--text-p1)
9
+ --fsp: $fsp2
10
+ &:hover
11
+ color: $color-hover
12
+ border-bottom: 1px solid $color-hover
4
13
  .tag-plugin.timeline .timenode
5
14
  .header
6
15
  margin: 0.5rem 16px
@@ -20,14 +29,8 @@
20
29
  border-radius: $border-card
21
30
  background: var(--alpha50)
22
31
  box-shadow: none
23
-
24
- a
25
- trans1 all
26
- border-bottom: 1px solid var(--text)
27
- color: var(--text-p1)
28
- &:hover
29
- color: $color-hover
30
- border-bottom: 1px solid $color-hover
32
+ p,li
33
+ --fsp: $fsp3
31
34
  code
32
35
  background: none
33
36
  padding: 0
@@ -36,7 +36,7 @@
36
36
  trans2: opacity background
37
37
  border-radius: 4px
38
38
  padding: 6px
39
- margin-right: -5px
39
+ margin-right: -6px
40
40
  svg
41
41
  height: 1em
42
42
  width: auto