hexo-theme-stellar 1.26.3 → 1.26.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/_config.yml +18 -13
  2. package/layout/_partial/cover/index.ejs +3 -3
  3. package/layout/_partial/main/article/article_footer.ejs +1 -1
  4. package/layout/_partial/main/footer.ejs +2 -2
  5. package/layout/_partial/main/navbar/article_banner.ejs +54 -0
  6. package/layout/_partial/main/navbar/article_top_area.ejs +2 -2
  7. package/layout/_partial/main/navbar/author_banner.ejs +1 -1
  8. package/layout/_partial/main/navbar/dateinfo.ejs +9 -10
  9. package/layout/_partial/main/navbar/nav_tabs_blog.ejs +1 -1
  10. package/layout/_partial/main/navbar/nav_tabs_wiki.ejs +1 -1
  11. package/layout/_partial/main/post_list/post_card.ejs +1 -1
  12. package/layout/_partial/sidebar/index.ejs +1 -1
  13. package/layout/_partial/sidebar/menu.ejs +1 -7
  14. package/layout/layout.ejs +8 -0
  15. package/layout/page.ejs +1 -11
  16. package/package.json +1 -1
  17. package/scripts/helpers/icon.js +2 -2
  18. package/scripts/tags/lib/link.js +2 -2
  19. package/scripts/tags/lib/note.js +1 -1
  20. package/source/css/_common/base.styl +4 -2
  21. package/source/css/_common/button.styl +31 -29
  22. package/source/css/_common/cap.styl +1 -1
  23. package/source/css/_common/device.styl +1 -1
  24. package/source/css/_common/html.styl +1 -0
  25. package/source/css/_common/input.styl +1 -1
  26. package/source/css/_common/title.styl +9 -8
  27. package/source/css/_common/toast.styl +1 -0
  28. package/source/css/_custom.styl +8 -4
  29. package/source/css/_defines/const.styl +2 -1
  30. package/source/css/_defines/theme.styl +6 -4
  31. package/source/css/_layout/layout.styl +3 -2
  32. package/source/css/_layout/list.styl +14 -9
  33. package/source/css/_layout/main.styl +19 -3
  34. package/source/css/_layout/md.styl +49 -85
  35. package/source/css/_layout/pages/archives.styl +3 -3
  36. package/source/css/_layout/partial/article-banner.styl +57 -0
  37. package/source/css/_layout/partial/article-footer.styl +15 -3
  38. package/source/css/_layout/partial/bread-nav.styl +22 -18
  39. package/source/css/_layout/partial/cover.styl +2 -11
  40. package/source/css/_layout/partial/footer.styl +2 -2
  41. package/source/css/_layout/partial/navbar.styl +16 -8
  42. package/source/css/_layout/partial/related.styl +5 -3
  43. package/source/css/_layout/sidebar/footer.styl +1 -0
  44. package/source/css/_layout/sidebar/logo.styl +1 -1
  45. package/source/css/_layout/sidebar/search.styl +4 -3
  46. package/source/css/_layout/sidebar/sidebar.styl +13 -10
  47. package/source/css/_layout/tag-plugins/banner.styl +23 -19
  48. package/source/css/_layout/tag-plugins/common.styl +4 -4
  49. package/source/css/_layout/tag-plugins/copy.styl +2 -1
  50. package/source/css/_layout/tag-plugins/folders.styl +4 -3
  51. package/source/css/_layout/tag-plugins/folding.styl +4 -2
  52. package/source/css/_layout/tag-plugins/hashtag.styl +2 -1
  53. package/source/css/_layout/tag-plugins/image.styl +1 -1
  54. package/source/css/_layout/tag-plugins/link.styl +1 -1
  55. package/source/css/_layout/tag-plugins/mark.styl +1 -1
  56. package/source/css/_layout/tag-plugins/note.styl +5 -3
  57. package/source/css/_layout/tag-plugins/poetry.styl +5 -5
  58. package/source/css/_layout/tag-plugins/quot.styl +3 -3
  59. package/source/css/_layout/tag-plugins/tabs.styl +4 -3
  60. package/source/css/_layout/tag-plugins/timeline.styl +24 -9
  61. package/source/css/_layout/widgets/ghuser.styl +1 -1
  62. package/source/css/_layout/widgets/markdown.styl +2 -2
  63. package/source/css/_layout/widgets/timeline.styl +1 -1
  64. package/source/css/_layout/widgets/toc_common.styl +1 -5
  65. package/source/css/_layout/widgets/toc_wiki.styl +3 -3
  66. package/source/css/_layout/widgets/widgets.styl +2 -2
  67. package/source/css/_plugins/swiper.styl +1 -1
  68. package/source/css/_plugins/tianli_gpt.styl +2 -2
package/_config.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  ######## Stellar info ########
2
2
  stellar:
3
- version: '1.26.3'
3
+ version: '1.26.4'
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
@@ -313,7 +313,7 @@ tag_plugins:
313
313
  max-height: 80vh
314
314
  # {% mark %}
315
315
  mark:
316
- default_color: dark # light, dark, red, orange, yellow, green, cyan, blue, purple, warning, error
316
+ default_color: yellow # light, dark, red, orange, yellow, green, cyan, blue, purple, warning, error
317
317
  # {% hashtag %}
318
318
  hashtag:
319
319
  default_color: # red, orange, yellow, green, cyan, blue, purple
@@ -470,9 +470,9 @@ style:
470
470
  darkmode: auto # auto / always / false
471
471
  smooth_scroll: false # true / false 开启时如果目录过长可能无法准确定位
472
472
  font-size:
473
- root: 16px
474
- body: 1rem # 16px
475
- code: 85% # 14px
473
+ root: 16px # 改这个会影响全局所有文字的字号
474
+ body: 17px # 影响正文区域的字号,如果改成 px 则不受 root 影响
475
+ code: 85% # 相较于其所在行的文本大小,建议用百分比
476
476
  codeblock: 0.8125rem # 13px
477
477
  font-family:
478
478
  logo: 'system-ui, "Microsoft Yahei", "Segoe UI", -apple-system, Roboto, Ubuntu, "Helvetica Neue", Arial, "WenQuanYi Micro Hei", sans-serif'
@@ -480,10 +480,12 @@ style:
480
480
  code: 'Menlo, Monaco, Consolas, system-ui, "Courier New", monospace, sans-serif'
481
481
  codeblock: 'Menlo, Monaco, Consolas, system-ui, "Courier New", monospace, sans-serif'
482
482
  text-align: left
483
+ prefix:
484
+ h2: https://api.iconify.design/ci:heading-h2.svg
483
485
  border-radius:
484
486
  card: 12px
485
487
  block: 12px
486
- bar: 12px
488
+ bar: 8px
487
489
  image: 6px
488
490
  color:
489
491
  # 动态颜色(会根据明暗主题重设明度值,只用关心色相和饱和度即可)
@@ -497,8 +499,6 @@ style:
497
499
  link: 'hsl(207 90% 54%)' # 超链接颜色
498
500
  button: 'hsl(192 98% 55%)' # 按钮颜色
499
501
  hover: 'hsl(14 100% 57%)' # 按钮高亮颜色
500
- link:
501
- underline: true # true / false
502
502
  animated_avatar:
503
503
  animate: auto # auto, always
504
504
  background: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/rainbow64@3x.webp
@@ -513,15 +513,20 @@ style:
513
513
  search: 'linear-gradient(to right, #04F3FF, #08FFC6, #DDF730, #FFBD19, #FF1FE0, #C418FF, #04F3FF)'
514
514
  sidebar:
515
515
  # 可以设置:纯色/渐变色/图片作为背景
516
- # background: 'linear-gradient(to bottom, #abc3, #abc3)'
517
- # background: 'linear-gradient(to bottom, #20E2D744, #F9FEA544)'
518
- background: 'url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.13/image/sidebar-bg1@small.jpg)'
519
- # 在图片上层增加高斯模糊效果(同时附带饱和度增强效果)
520
- blur: true
516
+ # background: var(--sidebar-bg)
517
+ # background-image: 'linear-gradient(to bottom, var(--sidebar-bg), var(--sidebar-bg))'
518
+ background-image: url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.13/image/sidebar-bg1@small.jpg)
519
+ blur-px: 100px
520
+ blur-bg: var(--alpha60)
521
521
  paginator:
522
522
  prev: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/arrow/f049bbd4e88ec.svg
523
523
  next: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/arrow/064b95430caf4.svg
524
524
  error_page: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/404/1c830bfcd517d.svg
525
+ site:
526
+ background-image: #'url(https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.14/image/site-bg1@small.webp)' # 未完全适配,慎用
527
+ blur-px: 100px
528
+ blur-bg: var(--alpha75)
529
+
525
530
 
526
531
  default:
527
532
  avatar: https://gcore.jsdelivr.net/gh/cdn-x/placeholder@1.0.12/avatar/round/3442075.svg
@@ -3,9 +3,9 @@ function layoutCover() {
3
3
  if (page.wiki) {
4
4
  return partial('wiki_cover')
5
5
  }
6
- if (page.layout === 'post') {
7
- return partial('post_cover')
8
- }
6
+ // if (page.layout === 'post') {
7
+ // return partial('post_cover')
8
+ // }
9
9
  return ''
10
10
  }
11
11
  %>
@@ -122,7 +122,7 @@ function layoutDiv() {
122
122
  function qrcode() {
123
123
  if (theme.article.share.includes('wechat')) {
124
124
  return `
125
- <div class="qrcode" id="qrcode-wechat" style="visibility:hidden;height:0">
125
+ <div class="qrcode" id="qrcode-wechat" style="opacity:0;height:0">
126
126
  <img src="https://api.qrserver.com/v1/create-qr-code/?size=256x256&data=${page.permalink}"/>
127
127
  </div>
128
128
  `
@@ -2,7 +2,7 @@
2
2
  const content = theme.footer.content?.replace('${author.name}', (config.author || 'Anonymity'))?.replace('${theme.name}', stellar_info('name'))?.replace('${theme.version}', stellar_info('version'))?.replace('${theme.tree}', stellar_info('tree'))
3
3
  function layoutDiv() {
4
4
  var el = ''
5
- el += `<footer class="page-footer${scrollreveal(' ')} fs12">`
5
+ el += `<footer class="page-footer${scrollreveal(' ')} footnote">`
6
6
  el += '<hr>'
7
7
  // sitemap
8
8
  if (theme.footer.sitemap && Object.keys(theme.footer.sitemap).length > 0) {
@@ -13,7 +13,7 @@ function layoutDiv() {
13
13
  continue
14
14
  }
15
15
  el += '<div class="sitemap-group">'
16
- el += '<span class="fs14">' + group + '</span>'
16
+ el += '<span class="fs15">' + group + '</span>'
17
17
  items.forEach((item, i) => {
18
18
  el += '<a href="' + url_for(md_link(item)) + '">'
19
19
  el += __(md_text(item))
@@ -0,0 +1,54 @@
1
+ <%
2
+
3
+ var banner_url = page.banner || ''
4
+
5
+ function layoutTitle() {
6
+ const title = page.h1 != null ? page.h1 : page.title
7
+ if (title && title.length > 0) {
8
+ return `<h1 class="text title"><span>${title}</span></h1>`
9
+ } else {
10
+ return ''
11
+ }
12
+ }
13
+
14
+ function layoutBottom() {
15
+ const article_title = layoutTitle()
16
+ if (article_title.length > 0) {
17
+ return `
18
+ <div class="bottom">
19
+ <div class="text-area">
20
+ ${article_title}
21
+ </div>
22
+ </div>
23
+ `
24
+ } else {
25
+ return ``
26
+ }
27
+ }
28
+
29
+ function layoutDiv() {
30
+ const top = partial('article_top_area')
31
+ const bottom = layoutBottom()
32
+ if (top.trim().length == 0 && bottom.length == 0) {
33
+ return ``
34
+ }
35
+ var style = ``
36
+ var el = ``
37
+ el += `<div class="article banner top">`
38
+ if (banner_url.length > 0) {
39
+ el += `<img class="bg" src="${banner_url}">`
40
+ if (page.poster?.color) {
41
+ style += ' style="--text-banner:' + page.poster?.color + '"'
42
+ }
43
+ }
44
+ el += `
45
+ <div class="content"${style}>
46
+ ${top}
47
+ ${bottom}
48
+ </div>
49
+ `
50
+ el += `</div>`
51
+ return el
52
+ }
53
+ %>
54
+ <%- layoutDiv() %>
@@ -5,11 +5,11 @@ function layoutDiv() {
5
5
  }
6
6
  var el = ''
7
7
  // 1.main
8
- el += `<div class="bread-nav fs12">`
8
+ el += `<div class="top bread-nav footnote">`
9
9
  // 2.left
10
10
  el += `<div class="left">`
11
11
  // 3.left.top: 面包屑导航
12
- el += `<div id="breadcrumb">`
12
+ el += `<div class="flex-row" id="breadcrumb">`
13
13
  // 首页
14
14
  el += `<a class="cap breadcrumb" href="${url_for(config.root)}">${__("btn.home")}</a>`
15
15
  if (theme.wiki.tree[page.wiki]) {
@@ -2,7 +2,7 @@
2
2
  function layoutDiv() {
3
3
  const author = page.author
4
4
  var el = ``
5
- el += `<div class="tag-plugin banner author">`
5
+ el += `<div class="banner author top">`
6
6
  if (author.banner) {
7
7
  el += `<img class="bg" src="${author.banner}">`
8
8
  }
@@ -1,27 +1,26 @@
1
1
  <%
2
2
  function layoutDiv() {
3
3
  // 作者
4
- const author = theme.authors ? (theme.authors[page.author] || theme.default_author) : null
5
4
  var el = ''
6
- el += `<div id="post-meta">`
5
+ el += `<div class="flex-row" id="post-meta">`
7
6
  if (page.wiki) {
8
- el += `<span class="author">${__("meta.updated") + __("symbol.colon")}</span>`
7
+ el += `<span class="text created">${__("meta.updated") + __("symbol.colon")}`
9
8
  el += `<time datetime="${date_xml(page.updated)}">${date(page.updated, config.date_format)}</time>`
10
9
  el += `</span>`
11
10
  } else {
11
+ const author = theme.authors ? (theme.authors[page.author] || theme.default_author) : null
12
12
  if (author) {
13
- const link = `<a href="${url_for(author.path)}">${author.name}</a>`
14
- el += `<span class="author">${__("meta.created_author", link) + __("symbol.colon")}</span>`
15
- } else {
16
- el += `<span class="author">${__("meta.created") + __("symbol.colon")}</span>`
13
+ el += `<a class="author" href="${url_for(author.path)}">${author.name}</a>`
14
+ el += `<span class="sep"></span>`
17
15
  }
18
16
  // 发布日期
19
- el += `<span class="created">`
17
+ el += `<span class="text created">`
20
18
  el += `<time datetime="${date_xml(page.date)}">${date(page.date, config.date_format)}</time>`
21
19
  el += `</span>`
22
20
  // 更新日期
23
- el += `<span class="updated">`
24
- el += `${__("symbol.comma") + __("meta.updated") + __("symbol.colon")}`
21
+ el += `<span class="sep updated"></span>`
22
+ el += `<span class="text updated">`
23
+ el += `${__("meta.updated") + __("symbol.colon")}`
25
24
  el += `<time datetime="${date_xml(page.updated)}">${date(page.updated, config.date_format)}</time>`
26
25
  el += `</span>`
27
26
  }
@@ -2,7 +2,7 @@
2
2
  function layoutDiv() {
3
3
  var el = '';
4
4
  el += '<div class="nav-wrap">';
5
- el += '<nav class="sub post cap">';
5
+ el += '<nav class="sub 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 {
@@ -2,7 +2,7 @@
2
2
  function layoutDiv() {
3
3
  var el = '';
4
4
  el += '<div class="nav-wrap">';
5
- el += '<nav class="sub wiki cap">';
5
+ el += '<nav class="sub wiki">';
6
6
  // 所有项目
7
7
  el += '<a';
8
8
  if (page.filter === false) {
@@ -71,7 +71,7 @@ function div_default() {
71
71
  el += '<span class="cap" id="post-meta">';
72
72
 
73
73
  // time
74
- el += __("meta.created") + '&nbsp;' + '<time datetime="' + date_xml(post.date) + '">' + date(post.date, config.date_format) + '</time>';
74
+ el += `<time datetime="${date_xml(post.date)}">${date(post.date, config.date_format)}</time>`
75
75
  el += '</span>';
76
76
  // cat
77
77
  if (post.categories && post.categories.length > 0) {
@@ -115,7 +115,7 @@ function layoutFooterDiv() {
115
115
  el += ' onclick="' + item.onclick + '"';
116
116
  }
117
117
  el += '>';
118
- el += item.icon;
118
+ el += icon(item.icon, 'no-lazy')
119
119
  el += '</a>';
120
120
  }
121
121
  }
@@ -12,13 +12,7 @@ function layoutDiv() {
12
12
  }
13
13
  el += `>`
14
14
  if (item.icon?.length > 0) {
15
- if (item.icon.startsWith('<')) {
16
- el += item.icon
17
- } else if (theme.icons[item.icon]) {
18
- el += theme.icons[item.icon]
19
- } else {
20
- el += `<img no-lazy src="${item.icon}">`
21
- }
15
+ el += icon(item.icon, 'no-lazy')
22
16
  } else {
23
17
  el += `<span>${__(item.title)}</span>`
24
18
  }
package/layout/layout.ejs CHANGED
@@ -25,10 +25,18 @@ if (page.indent != null) {
25
25
  indent = article_type === 'story'
26
26
  }
27
27
 
28
+ var site_background = ''
29
+ if (theme.style.site && theme.style.site['background-image']) {
30
+ site_background += `<div class="sitebg">`
31
+ site_background += `<div class="siteblur"></div>`
32
+ site_background += `</div>`
33
+ }
34
+
28
35
  var html = `<!DOCTYPE html>`
29
36
  html += `<html lang="${page.lang}">`
30
37
  html += partial('_partial/head')
31
38
  html += `<body>`
39
+ html += site_background
32
40
  html += partial('_partial/cover/index')
33
41
  html += `<div class="l_body ${page_type} ${article_type}" id="start" layout="${page.layout}" ${indent ? 'text-indent' : ''}>`
34
42
  html += `<aside class="l_left">`
package/layout/page.ejs CHANGED
@@ -22,15 +22,6 @@ if (page.title == null) {
22
22
  }
23
23
  }
24
24
 
25
- function layoutTitle() {
26
- const title = page.h1 != null ? page.h1 : page.title
27
- if (title && title.length > 0) {
28
- return `<h1 class="article-title"><span>${title}</span></h1>`
29
- } else {
30
- return ''
31
- }
32
- }
33
-
34
25
  function articleClass() {
35
26
  var str = `md-text content${scrollreveal(' ')}`
36
27
  if (isUsingHeti) {
@@ -48,10 +39,9 @@ function layoutDiv() {
48
39
  el += partial('_partial/main/navbar/nav_tabs_blog')
49
40
  }
50
41
  if (page.h1 || page.title || (page.content && page.content.length > 0)) {
51
- el += partial('_partial/main/navbar/article_top_area')
42
+ el += partial('_partial/main/navbar/article_banner')
52
43
  }
53
44
  el += `<article class="${articleClass()}">`
54
- el += layoutTitle()
55
45
  if (page.content && page.content.length > 0) {
56
46
  el += page.content
57
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hexo-theme-stellar",
3
- "version": "1.26.3",
3
+ "version": "1.26.4",
4
4
  "description": "Elegant and powerful theme for Hexo.",
5
5
  "main": "package.json",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- hexo.extend.helper.register('icon', function(key) {
3
+ hexo.extend.helper.register('icon', function(key, args) {
4
4
  const { icons } = hexo.theme.config
5
5
  var result = ''
6
6
  if (icons[key]) {
@@ -9,7 +9,7 @@ hexo.extend.helper.register('icon', function(key) {
9
9
  result = key
10
10
  }
11
11
  if (result.startsWith('/') || result.startsWith('https://') || result.startsWith('http://')) {
12
- return `<img src="${result}" />`
12
+ return `<img ${args?.length > 0 ? args : ''} src="${result}" />`
13
13
  } else {
14
14
  return result
15
15
  }
@@ -45,10 +45,10 @@ module.exports = ctx => function(args) {
45
45
  return '<span class="title">' + (args.title || args.url) + '</span>'
46
46
  }
47
47
  function loadDesc() {
48
- return '<span class="cap desc fs12"></span>'
48
+ return '<span class="cap desc footnote"></span>'
49
49
  }
50
50
  function loadLink() {
51
- return '<span class="cap link fs12">' + full_url_for(args.url) + '</span>'
51
+ return '<span class="cap link footnote">' + full_url_for(args.url) + '</span>'
52
52
  }
53
53
 
54
54
  if (args.desc) {
@@ -24,7 +24,7 @@ module.exports = ctx => function(args) {
24
24
  el += '>'
25
25
  // title
26
26
  if (title && title.length > 0) {
27
- el += '<div class="title">' + title + '</div>'
27
+ el += `<div class="title">${title}</div>`
28
28
  }
29
29
  // content
30
30
  el += '<div class="body">'
@@ -25,7 +25,8 @@ img
25
25
 
26
26
 
27
27
  li
28
- font-size: $fs-15
28
+ --fsp: var(--fsp1)
29
+ font-size: var(--fsp)
29
30
 
30
31
 
31
32
  ul,ol
@@ -40,7 +41,8 @@ table:not([class])
40
41
  margin: 1rem 0
41
42
  max-width: 100%
42
43
  vertical-align: text-top
43
- font-size: $fs-14
44
+ --fsp: var(--fsp2)
45
+ font-size: var(--fsp)
44
46
  th
45
47
  background: var(--block)
46
48
  td,th
@@ -26,34 +26,36 @@ a[onclick]:hover
26
26
  cursor: pointer
27
27
 
28
28
  a.button.start.gradient
29
- transition: 0.38s ease-out
30
29
  position relative
31
- z-index: 0
32
- background: convert(hexo-config('style.gradient.start'))
33
- background-size: 1000%
34
- color: white
35
- text-shadow: 0 0 1px rgba(0,0,0,0.12)
36
- animation: glow 60s linear infinite
37
- @keyframes glow {
38
- from {
39
- background-position: 0%
40
- }
41
- to {
42
- background-position: 1000%
43
- }
44
- }
45
- &:after
46
- content: ''
47
- position absolute
48
- left: 0
49
- right: 0
50
- top: 0
51
- bottom: 0
52
- border-radius: 100px
53
- background: inherit
54
- z-index -1
55
- filter: blur(36px)
30
+ @media (prefers-color-scheme: dark)
56
31
  transition: 0.38s ease-out
57
- opacity 0
58
- &:hover:after
59
- opacity 1
32
+ z-index: 0
33
+ background: convert(hexo-config('style.gradient.start'))
34
+ background-size: 1000%
35
+ color: white
36
+ text-shadow: 0 0 1px rgba(0,0,0,0.12)
37
+ animation: glow 60s linear infinite
38
+ @keyframes glow {
39
+ from {
40
+ background-position: 0%
41
+ }
42
+ to {
43
+ background-position: 1000%
44
+ }
45
+ }
46
+ &:after
47
+ content: ''
48
+ position absolute
49
+ left: 0
50
+ right: 0
51
+ top: 0
52
+ bottom: 0
53
+ border-radius: 100px
54
+ background: inherit
55
+ z-index -1
56
+ filter: blur(12px)
57
+ opacity: 0.5
58
+ transition: 0.38s ease-out
59
+ &:hover:after
60
+ filter: blur(36px)
61
+ opacity 1
@@ -1,6 +1,6 @@
1
1
  .cap
2
2
  font-weight: 500
3
- font-size: $fs-12
3
+ font-size: $fs-13
4
4
  scrollbar-width: none
5
5
  color: var(--text-p2)
6
6
  &.blue
@@ -28,7 +28,7 @@
28
28
 
29
29
  .sidebar-toggle.mobile
30
30
  cursor: pointer
31
- color: var(--text-p0)
31
+ color: var(--text)
32
32
  background: none
33
33
  padding: 8px
34
34
  line-height: 0
@@ -5,6 +5,7 @@ html
5
5
  font-size: $fs-root
6
6
  -webkit-text-size-adjust: 100%
7
7
  -ms-text-size-adjust: 100%
8
+ scroll-padding-top: 8px
8
9
  if hexo-config('style.smooth_scroll')
9
10
  scroll-behavior: smooth
10
11
  body
@@ -5,6 +5,6 @@ input
5
5
  input.copy-area
6
6
  display: block
7
7
  font-family: $ff-code
8
- font-size: $fs-12
8
+ font-size: $fs-13
9
9
  font-weight: 700
10
10
  color: var(--text-p3)
@@ -15,15 +15,16 @@ h6
15
15
  font-size: $fs-h6
16
16
 
17
17
  // 次级段落字号
18
+ .fs15
19
+ --fsp: $fs-15
20
+ font-size: var(--fsp)
18
21
  .fs14
19
- font-size: $fs-14
20
- p
21
- font-size: $fs-14 !important
22
- li
23
- font-size: $fs-14 !important
24
- // 脚标字号
25
- .fs12
26
- font-size: $fs-12
22
+ --fsp: $fs-14
23
+ font-size: var(--fsp)
24
+
25
+ .footnote
26
+ --fsp: $fs-13
27
+ font-size: var(--fsp)
27
28
 
28
29
  .widgets
29
30
  .post-title
@@ -20,6 +20,7 @@ div.toast
20
20
  visibility: visible
21
21
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2s
22
22
  animation: fadein 0.5s, fadeout 0.5s 2s
23
+ animation-fill-mode: forwards
23
24
 
24
25
  @-webkit-keyframes fadein
25
26
  from {top: -64px; opacity: 0;}
@@ -65,10 +65,14 @@ $border-button = 4px
65
65
  :root
66
66
  --width-left: 288px
67
67
  --width-main: 720px
68
- --fs-p: $fs-body
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)
69
73
  --gap-l: 16px
70
- --gap-p: 1rem // gap for paragraph
71
- --gap-p-compact: 0.75rem
74
+ --gap-p: 'calc(%s + 4px)' % $fs-body // gap for paragraph
75
+ --gap-p-compact: 'calc(%s * 0.75)' % $fs-body
72
76
  // desktop 2k or larger
73
77
  @media screen and (min-width: $device-2k)
74
78
  --gap-l: 32px
@@ -87,7 +91,7 @@ $border-button = 4px
87
91
 
88
92
  // 文章布局风格
89
93
  .l_body.story
90
- --fs-p: 'calc(%s + 2px)' % $fs-body
94
+ --fsp: 'calc(%s + 2px)' % $fs-body
91
95
  --gap-p: 1.5rem
92
96
  .tag-plugin,p>img
93
97
  margin-top: 2.4rem
@@ -42,7 +42,8 @@ $color-google-red = #E8453C
42
42
 
43
43
  $c-red = #F44336
44
44
  $c-orange = #FA6400
45
- $c-yellow = #FFBD2B
45
+ $c-amber = #FFBD2B
46
+ $c-yellow = #f2e03d
46
47
  $c-green = #3DC550
47
48
  $c-cyan = #1BCDFC
48
49
  $c-blue = #2196f3
@@ -15,7 +15,7 @@ $color-text-s = saturation($color-text)
15
15
  $color-text-l = lightness($color-text)
16
16
 
17
17
  set_text_dark()
18
- --text-p0: hsl($color-text-h, $color-text-s, 0)
18
+ --text: hsl($color-text-h, $color-text-s, 0)
19
19
  --text-p1: hsl($color-text-h, $color-text-s, $color-text-l)
20
20
  --text-p2: hsl($color-text-h, $color-text-s, $color-text-l / 0.5 * 0.75)
21
21
  --text-p3: hsl($color-text-h, $color-text-s, $color-text-l / 0.5 * 1.25)
@@ -24,7 +24,7 @@ set_text_dark()
24
24
  --text-code: hsl($color-code-h, $color-code-s, $color-code-l)
25
25
 
26
26
  set_text_light()
27
- --text-p0: hsl($color-text-h, $color-text-s, 100)
27
+ --text: hsl($color-text-h, $color-text-s, 100)
28
28
  --text-p1: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 0.5)
29
29
  --text-p2: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 0.75)
30
30
  --text-p3: hsl($color-text-h, $color-text-s, 100 - $color-text-l / 0.5 * 1.2)
@@ -38,8 +38,9 @@ set_text_light()
38
38
  --alpha20: rgba(white, 0.2)
39
39
  --alpha50: rgba(white, 0.5)
40
40
  --alpha60: rgba(white, 0.6)
41
+ --alpha75: rgba(white, 0.75)
41
42
  --alpha100: white
42
- --sidebar-bg: rgba(white, 0.5)
43
+ --sidebar-bg: hsl($color-block-h, $color-block-s, 90)
43
44
  --block: hsl($color-block-h, $color-block-s, 95)
44
45
  --block-border: hsl($color-block-h, $color-block-s, 90)
45
46
  --block-hover: hsl($color-block-h, $color-block-s, 92)
@@ -56,8 +57,9 @@ set_darkmode()
56
57
  --alpha20: rgba(black, 0.2)
57
58
  --alpha50: rgba(black, 0.5)
58
59
  --alpha60: rgba(black, 0.6)
60
+ --alpha75: rgba(black, 0.75)
59
61
  --alpha100: black
60
- --sidebar-bg: rgba(black, 0.64)
62
+ --sidebar-bg: hsl($color-block-h, $color-block-s, 24)
61
63
  set_text_light()
62
64
  @media screen and (max-width: $device-mobile-max)
63
65
  --site-bg: black
@@ -3,6 +3,7 @@
3
3
  margin: auto
4
4
  padding: 0 var(--gap-l)
5
5
  justify-content: center
6
+ font-size: var(--fsp)
6
7
 
7
8
  .l_body .l_left
8
9
  z-index: 8
@@ -27,7 +28,7 @@
27
28
  left: 0
28
29
  width: 100%
29
30
  height: 100%
30
- background: rgba(black, 0.5)
31
+ background: rgba(black, 0.2)
31
32
  z-index: 9
32
33
  opacity 0
33
34
  trans1 opacity
@@ -47,7 +48,7 @@
47
48
  max-width: 100%
48
49
  .l_body.mobile
49
50
  .l_left
50
- transition: transform .3s ease-out
51
+ transition: transform .38s ease-out
51
52
  .l_body.mobile.sidebar
52
53
  .l_left
53
54
  transform: translateX(0px)