hexo-theme-stellar 1.11.0 → 1.13.0

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 (78) hide show
  1. package/README.md +7 -7
  2. package/_config.yml +22 -37
  3. package/_data/links.yml +7 -0
  4. package/_data/widgets.yml +30 -6
  5. package/languages/zh-CN.yml +4 -4
  6. package/languages/zh-TW.yml +4 -4
  7. package/layout/_partial/head.ejs +2 -0
  8. package/layout/_partial/main/article/read_next.ejs +16 -17
  9. package/layout/_partial/main/navbar/breadcrumb.ejs +1 -1
  10. package/layout/_partial/main/navbar/list_post.ejs +57 -34
  11. package/layout/_partial/main/post_list/post_card.ejs +25 -15
  12. package/layout/_partial/main/post_list/wiki_card.ejs +1 -1
  13. package/layout/_partial/scripts/index.ejs +1 -0
  14. package/layout/_partial/sidebar/header.ejs +2 -26
  15. package/layout/_partial/sidebar/logo.ejs +2 -2
  16. package/layout/_partial/sidebar/menu.ejs +27 -0
  17. package/layout/_partial/sidebar/widgets/ghissues.ejs +45 -0
  18. package/layout/_partial/sidebar/widgets/ghrepo.ejs +3 -3
  19. package/layout/_partial/sidebar/widgets/ghuser.ejs +4 -0
  20. package/layout/_partial/sidebar/widgets/markdown.ejs +1 -1
  21. package/layout/_partial/sidebar/widgets/recent.ejs +8 -11
  22. package/layout/_partial/sidebar/widgets/{wiki_more.ejs → related.ejs} +7 -7
  23. package/layout/_partial/sidebar/widgets/tagcloud.ejs +24 -0
  24. package/layout/_partial/sidebar/widgets/timeline.ejs +27 -0
  25. package/layout/_partial/sidebar/widgets/toc.ejs +1 -5
  26. package/layout/index.ejs +1 -1
  27. package/layout/page.ejs +19 -10
  28. package/package.json +1 -1
  29. package/scripts/events/lib/config.js +1 -1
  30. package/scripts/events/lib/doc_tree.js +3 -0
  31. package/scripts/helpers/related_posts.js +11 -39
  32. package/scripts/tags/about.js +10 -7
  33. package/scripts/tags/{grid.js → border.js} +4 -4
  34. package/scripts/tags/friends.js +36 -75
  35. package/scripts/tags/link.js +11 -9
  36. package/scripts/tags/navbar.js +1 -1
  37. package/scripts/tags/sites.js +40 -79
  38. package/scripts/tags/split.js +51 -0
  39. package/scripts/tags/timeline.js +6 -4
  40. package/source/css/_common/base.styl +2 -2
  41. package/source/css/_common/blur.styl +3 -0
  42. package/source/css/_common/device.styl +2 -0
  43. package/source/css/_common/highlight.styl +1 -1
  44. package/source/css/_common/loading.styl +16 -3
  45. package/source/css/_common/title.styl +0 -13
  46. package/source/css/_custom.styl +4 -4
  47. package/source/css/_layout/list.styl +40 -12
  48. package/source/css/_layout/main.styl +1 -1
  49. package/source/css/_layout/md.styl +1 -4
  50. package/source/css/_layout/partial/navbar.styl +1 -1
  51. package/source/css/_layout/partial/related.styl +62 -93
  52. package/source/css/_layout/sidebar/footer.styl +4 -2
  53. package/source/css/_layout/sidebar/ghrepo.styl +11 -5
  54. package/source/css/_layout/sidebar/ghuser.styl +19 -1
  55. package/source/css/_layout/sidebar/sidebar.styl +11 -96
  56. package/source/css/_layout/sidebar/toc_common.styl +5 -3
  57. package/source/css/_layout/sidebar/widgets.styl +103 -0
  58. package/source/css/_layout/tag-plugins/about.styl +21 -18
  59. package/source/css/_layout/tag-plugins/common.styl +36 -31
  60. package/source/css/_layout/tag-plugins/link.styl +41 -27
  61. package/source/css/_layout/tag-plugins/navbar.styl +10 -4
  62. package/source/css/_layout/tag-plugins/quot.styl +1 -1
  63. package/source/css/_layout/tag-plugins/split.styl +32 -0
  64. package/source/css/_layout/tag-plugins/timeline.styl +40 -14
  65. package/source/css/_plugins/comments/twikoo.styl +11 -5
  66. package/source/css/_plugins/comments/waline.styl +5 -1
  67. package/source/css/_plugins/index.styl +0 -2
  68. package/source/js/main.js +15 -9
  69. package/source/js/plugins/fcircle.js +92 -0
  70. package/source/js/plugins/friends.js +3 -2
  71. package/source/js/plugins/ghinfo.js +14 -2
  72. package/source/js/plugins/linkcard.js +124 -0
  73. package/source/js/plugins/sites.js +4 -3
  74. package/source/js/plugins/timeline.js +58 -40
  75. package/layout/_partial/plugins/comments/valine/layout.ejs +0 -19
  76. package/layout/_partial/plugins/comments/valine/script.ejs +0 -48
  77. package/scripts/tags/issues.js +0 -30
  78. package/source/css/_plugins/comments/valine.styl +0 -218
@@ -1,96 +1,57 @@
1
1
  /**
2
- * sites.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
2
+ * sites.js v2 | https://github.com/xaoxuu/hexo-theme-stellar/
3
3
  * 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
4
4
  *
5
- * {% sites [only:group1] [not:group2] %}
5
+ * {% sites [group] [repo:owner/repo] [api:http] %}
6
6
  */
7
7
 
8
8
  'use strict';
9
9
 
10
10
  hexo.extend.tag.register('sites', function(args) {
11
- args = hexo.args.map(args, ['only', 'not', 'repo', 'api']);
12
- if (args.only) {
13
- args.only = args.only.split(',');
11
+ args = hexo.args.map(args, ['repo', 'api'], ['group']);
12
+ var links = hexo.locals.get('data').links;
13
+ if (links == undefined) {
14
+ links = {};
14
15
  }
15
- if (args.not) {
16
- args.not = args.not.split(',');
17
- }
18
- var sites = hexo.locals.get('data').sites;
19
- if (sites == undefined) {
20
- sites = {};
21
- }
22
- if (args.repo) {
23
- sites = {
24
- group: {
25
- api: args.api,
26
- repo: args.repo
27
- }
28
- }
16
+ var api;
17
+ if (args.api) {
18
+ api = args.api;
19
+ } else if (args.repo) {
20
+ api = 'https://raw.github.xaoxuu.com/' + args.repo + '/output/v2/data.json';
29
21
  }
22
+
30
23
  var el = '<div class="tag-plugin sites-wrap">';
31
- function groupHeader(group) {
32
- var header = '<div class="group-header">';
33
- if (group.title) {
34
- header += hexo.render.renderSync({text: group.title, engine: 'markdown'}).split('\n').join('');
35
- }
36
- if (group.description) {
37
- header += hexo.render.renderSync({text: group.description, engine: 'markdown'}).split('\n').join('');
38
- }
39
- header += '</div>';
40
- return header;
41
- }
42
- function cell(site) {
43
- if (site.url && site.title) {
44
- var cell = '<div class="site-card">';
45
- cell += '<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="' + site.url + '">';
46
- cell += '<img src="' + (site.screenshot || ('https://image.thum.io/get/width/1024/crop/768/' + site.url)) + '" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;' + hexo.theme.config.default.cover + '&quot;;"/>';
47
- cell += '<div class="info">';
48
- cell += '<img src="' + (site.avatar || hexo.theme.config.default.link) + '" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;' + hexo.theme.config.default.link + '&quot;;"/>';
49
- cell += '<span class="title">' + site.title + '</span>';
50
- cell += '<span class="desc">' + (site.description || site.url) + '</span>';
51
- cell += '</div>';
52
- cell += '</a></div>'
53
- return cell;
54
- } else {
55
- return '';
56
- }
57
- }
58
- for (let groupId of Object.keys(sites)) {
59
- function f() {
60
- if (args.not && args.not.includes(groupId)) {
61
- return;
62
- }
63
- if (groupId in sites) {
64
- let group = sites[groupId];
65
- if ((typeof group == 'object') && group.constructor == Array) {
66
- group = {items: group};
67
- }
68
- if (group.title || group.description) {
69
- el += groupHeader(group);
70
- }
71
- if (group.repo) {
72
- el += '<div class="stellar-sites-api"';
73
- el += ' api="' + (group.api || 'https://issues-api.xaoxuu.com') + '/v1/' + group.repo + '"';
74
- el += '>';
75
- el += '<div class="group-body"></div>';
76
- el += '</div>';
77
- } else if (group.items) {
78
- el += '<div class="group-body">';
79
- group.items.forEach((site, i) => {
80
- el += cell(site);
81
- });
82
- el += '</div>';
83
- }
24
+ if (api) {
25
+ el += '<div class="stellar-sites-api"';
26
+ el += ' api="' + api + '"';
27
+ el += '>';
28
+ el += '<div class="group-body"></div>';
29
+ el += '</div>';
30
+ } else if (args.group) {
31
+ function cell(item) {
32
+ if (item.url && item.title) {
33
+ var cell = '<div class="site-card">';
34
+ cell += '<a class="card-link" target="_blank" rel="external nofollow noopener noreferrer" href="' + item.url + '">';
35
+ cell += '<img src="' + (item.screenshot || ('https://screenshot-api.xaoxuu.com/api?url=' + item.url + '&width=1280&height=720')) + '" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;' + hexo.theme.config.default.cover + '&quot;;"/>';
36
+ cell += '<div class="info">';
37
+ cell += '<img src="' + (item.avatar || hexo.theme.config.default.link) + '" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;' + hexo.theme.config.default.link + '&quot;;"/>';
38
+ cell += '<span class="title">' + item.title + '</span>';
39
+ cell += '<span class="desc">' + (item.description || item.url) + '</span>';
40
+ cell += '</div>';
41
+ cell += '</a></div>'
42
+ return cell;
43
+ } else {
44
+ return '';
84
45
  }
85
46
  }
86
- if (args.only) {
87
- if (args.only.includes(groupId)) {
88
- f();
89
- }
90
- } else {
91
- f();
92
- }
47
+ el += '<div class="group-body">';
48
+ const items = links[args.group] || [];
49
+ items.forEach((item, i) => {
50
+ el += cell(item);
51
+ });
52
+ el += '</div>';
93
53
  }
54
+
94
55
  el += '</div>';
95
56
  return el;
96
57
  });
@@ -0,0 +1,51 @@
1
+ /**
2
+ * split.js v1.0 | https://github.com/xaoxuu/hexo-theme-stellar/
3
+ * 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
4
+ *
5
+ * {% split [style:block/card] %}
6
+ * <!-- cell -->
7
+ * left body
8
+ * <!-- cell -->
9
+ * right body
10
+ * {% endsplit %}
11
+ */
12
+
13
+ 'use strict';
14
+
15
+ hexo.extend.tag.register('split', function(args, content) {
16
+ args = hexo.args.map(args, ['bg']);
17
+ var el = '';
18
+ el += '<div class="tag-plugin split"';
19
+ el += ' ' + hexo.args.joinTags(args, ['bg']).join(' ');
20
+ el += '>';
21
+
22
+ var arr = content.split(/<!--\s*(.*?)\s*-->/g).filter((item, i) => {
23
+ return item.trim().length > 0;
24
+ });
25
+ if (arr.length > 0) {
26
+ var nodes = [];
27
+ arr.forEach((item, i) => {
28
+ if (item == 'cell') {
29
+ nodes.push({
30
+ header: ''
31
+ });
32
+ } else if (nodes.length > 0) {
33
+ var node = nodes[nodes.length-1];
34
+ if (node.body == undefined) {
35
+ node.body = item;
36
+ } else {
37
+ node.body += '\n' + item;
38
+ }
39
+ }
40
+ });
41
+ nodes.forEach((node, i) => {
42
+ el += '<div class="cell" index="' + (i) + '">';
43
+ el += hexo.render.renderSync({text: node.body, engine: 'markdown'}).split('\n').join('');
44
+ el += '</div>';
45
+ });
46
+ }
47
+
48
+ el += '</div>';
49
+
50
+ return el;
51
+ }, {ends: true});
@@ -36,12 +36,14 @@ function layoutNodeContent(content) {
36
36
 
37
37
 
38
38
  function postTimeline(args, content) {
39
- args = hexo.args.map(args, ['api', 'user']);
39
+ args = hexo.args.map(args, ['api', 'user', 'type', 'limit', 'hide']);
40
40
  var el = '';
41
-
41
+ if (!args.type) {
42
+ args.type = 'timeline';
43
+ }
42
44
  if (args.api && args.api.length > 0) {
43
- el += '<div class="tag-plugin timeline stellar-timeline-api"';
44
- el += ' ' + hexo.args.joinTags(args, ['api', 'user']).join(' ');
45
+ el += '<div class="tag-plugin timeline stellar-' + args.type + '-api"';
46
+ el += ' ' + hexo.args.joinTags(args, ['api', 'user', 'limit', 'hide']).join(' ');
45
47
  el += '>';
46
48
  } else {
47
49
  el += '<div class="tag-plugin timeline">';
@@ -12,8 +12,8 @@ a
12
12
  &:hover
13
13
  color: $color-hover
14
14
 
15
- p:not([class])
16
- text-align: justify
15
+ .md p:not([class])
16
+ text-align: convert(hexo-config('style.text-align'))
17
17
 
18
18
  hr
19
19
  color: var(--text-meta)
@@ -5,6 +5,9 @@ if hexo-config('style.darkmode') == 'auto'
5
5
  @media (prefers-color-scheme: dark)
6
6
  :root
7
7
  --blur-bg: alpha(black, .5)
8
+ if hexo-config('style.darkmode') == 'always'
9
+ :root
10
+ --blur-bg: alpha(black, .5)
8
11
 
9
12
  .blur
10
13
  background: var(--blur-bg)
@@ -24,6 +24,8 @@
24
24
  if hexo-config('style.darkmode') == 'auto'
25
25
  @media (prefers-color-scheme: dark)
26
26
  --blur-bg: alpha(#555, .6)
27
+ if hexo-config('style.darkmode') == 'always'
28
+ --blur-bg: alpha(#555, .6)
27
29
 
28
30
  .sidebar-toggle.mobile
29
31
  cursor: pointer
@@ -20,7 +20,7 @@ article.md .highlight, pre:not([class]):has(>code)
20
20
  font-family: $ff-code
21
21
  box-sizing: border-box
22
22
  @media screen and (min-width: $device-mobile)
23
- min-width: 280px
23
+ min-width: 180px
24
24
 
25
25
  article.md .highlight
26
26
  position: relative
@@ -15,6 +15,19 @@ svg.loading
15
15
  transform:rotate(360deg)
16
16
 
17
17
  .loading-wrap
18
- min-height: 50px
19
- margin: 2rem 0
20
- text-align: center
18
+ margin: 0
19
+ text-align: center
20
+ background: var(--block)
21
+ border-radius: $border-card
22
+ position relative
23
+ padding: 2rem
24
+ svg
25
+ margin: 4px
26
+ &:after
27
+ content: hexo-config('style.loading.loading')
28
+ color: var(--text-p1)
29
+ display: block
30
+ font-size: 14px
31
+ &.error
32
+ &:after
33
+ content: hexo-config('style.loading.error')
@@ -25,19 +25,6 @@ h6
25
25
  .fs12
26
26
  font-size: $fs-12
27
27
 
28
- .post-list
29
- .post-title
30
- font-weight: 500
31
- margin: .75rem 0 .5rem
32
- line-height: 1.2
33
- font-size: $fs-h3
34
- border-bottom: none
35
- color: var(--text-p0)
36
- trans1 color
37
- .wiki .post-title
38
- margin-top: 0.5rem
39
- font-weight: 700
40
-
41
28
  .widgets
42
29
  .post-title
43
30
  margin: 0.75rem 0
@@ -69,14 +69,14 @@ $border-image = 6px
69
69
 
70
70
  // 可以动态变化的属性
71
71
  :root
72
- --width-left: 256px
72
+ --width-left: 288px
73
73
  --width-main: 720px
74
74
  --gap-l: 16px
75
75
  --gap-p: .75rem // gap for paragraph
76
76
  // desktop 2k or larger
77
77
  @media screen and (min-width: $device-2k)
78
78
  --gap-l: 32px
79
- --width-left: 320px
79
+ --width-left: 352px
80
80
  --width-main: 780px
81
81
  // desktop 4k or larger
82
82
  @media screen and (min-width: $device-4k)
@@ -84,10 +84,10 @@ $border-image = 6px
84
84
  --gap-l: 64px
85
85
  // iPad 竖屏
86
86
  @media screen and (max-width: $device-tablet)
87
- --width-left: 220px
87
+ --width-left: 252px
88
88
  // iPad 竖屏
89
89
  @media screen and (max-width: $device-mobile-max)
90
- --width-left: 256px
90
+ --width-left: 288px
91
91
 
92
92
 
93
93
 
@@ -1,6 +1,25 @@
1
1
  // list
2
2
  .post-list
3
3
  margin: 1rem
4
+ .post-title
5
+ margin-top: 1.5rem
6
+ .post-title:first-child
7
+ margin-top: .5rem
8
+
9
+ .post-list
10
+ .post-title
11
+ font-weight: 500
12
+ margin: .75rem 0
13
+ line-height: 1.2
14
+ font-size: $fs-h3
15
+ border-bottom: none
16
+ color: var(--text-p0)
17
+ trans1 color
18
+ @media screen and (max-width: $device-mobile)
19
+ font-size: $fs-h4
20
+ margin: 0.5rem 0
21
+ .wiki .post-title
22
+ margin-top: 0.5rem
4
23
 
5
24
  // card
6
25
  .post-list .post-card
@@ -14,14 +33,18 @@
14
33
  position: relative
15
34
  .excerpt
16
35
  margin: 1rem 0
36
+ @media screen and (max-width: $device-mobile)
37
+ margin: 0.5rem 0
17
38
  >p
18
39
  margin: 1rem 0
40
+ @media screen and (max-width: $device-mobile)
41
+ margin: 0.5rem 0
19
42
  line-height: 1.5
20
43
  .meta.cap
21
44
  display: flex
22
45
  flex-wrap: wrap
23
46
  align-items: center
24
- margin: .5rem 0
47
+ margin: 0.25rem 0
25
48
  line-height: 1.5
26
49
  span+span
27
50
  margin-left: 0.5rem
@@ -37,10 +60,11 @@
37
60
  // common article
38
61
  .post-list article.md
39
62
  padding: 1rem
63
+ @media screen and (max-width: $device-mobile)
64
+ padding: 0.5rem 1rem
40
65
  p
41
66
  color: var(--text-p2)
42
- @media screen and (min-width: $device-mobile)
43
- font-size: $fs-14
67
+ font-size: $fs-14
44
68
 
45
69
 
46
70
  // posts
@@ -51,6 +75,7 @@
51
75
  margin-left: -1rem
52
76
  margin-top: -1rem
53
77
  margin-right: -1rem
78
+ background: var(--block)
54
79
  &:not(.lazy)
55
80
  trans1: transform 1s
56
81
  img
@@ -76,28 +101,31 @@
76
101
  img
77
102
  width: 100%
78
103
  .cover-info
79
- padding: 1rem
104
+ padding: 1.5rem 1rem
80
105
  position: absolute
81
106
  line-height: 1.2
82
107
  width: 'calc(100% - %s * 2)' % 1rem
83
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2)
84
- color: white
108
+ color: var(--text-p0)
85
109
  &[position=top]
86
110
  top: 0
87
- background-image: linear-gradient(rgba(0,0,0,0.4),rgba(0,0,0,0.3),rgba(0,0,0,0))
88
111
  &[position=bottom]
89
112
  bottom: 0
90
- background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.3),rgba(0,0,0,0.4))
91
113
  div+div
92
- margin-top: 8px
93
- @media screen and (max-width: $device-mobile)
94
- margin-top: 4px
114
+ margin-top: 4px
95
115
  .cap
96
- color: white
97
116
  font-size: $fs-13
117
+ color: unset
98
118
  .title
99
119
  font-weight: 500
100
120
  font-size: $fs-h3
121
+ @media screen and (max-width: $device-mobile)
122
+ padding: 1rem
123
+ div+div
124
+ margin-top: 2px
125
+ .title
126
+ font-size: $fs-h4
127
+ .cap
128
+ font-size: $fs-12
101
129
  h2
102
130
  margin: .25rem 0
103
131
  font-size: $fs-h4
@@ -5,7 +5,7 @@
5
5
  margin-left: "calc(2 * %s)" % var(--gap-l)
6
6
  margin-right: "calc(2 * %s + %s / 2)" % (var(--gap-l) var(--width-left))
7
7
  @media screen and (min-width: $device-mobile-max)
8
- padding-top: "calc(2 * %s)" % var(--gap-l)
8
+ padding-top: "calc(1 * %s)" % var(--gap-l)
9
9
  header
10
10
  margin: 4rem 1rem 2rem
11
11
  .logo-wrap
@@ -24,7 +24,7 @@ article.md.content
24
24
  &.indent
25
25
  >p:not([class])
26
26
  text-indent: 'calc(%s * 2)' % $fs-p
27
- text-align: justify
27
+ text-align: convert(hexo-config('style.text-align'))
28
28
  a
29
29
  text-indent: 0
30
30
  h1,h2,h3,h4,h5,h6
@@ -68,9 +68,6 @@ article.md.content
68
68
  .tag-plugin,iframe
69
69
  margin-top: var(--gap-p)
70
70
  margin-bottom: var(--gap-p)
71
- p,.tag-plugin
72
- .highlight,table
73
- --gap-p: 1rem
74
71
  iframe
75
72
  display: block
76
73
 
@@ -1,7 +1,7 @@
1
1
  .nav-wrap
2
2
  position: sticky
3
3
  position: -webkit-sticky
4
- margin-top: 1.75rem
4
+ margin-top: .75rem
5
5
  top: -2px
6
6
  background: var(--site-bg)
7
7
  padding: 0 1rem
@@ -1,5 +1,6 @@
1
1
  .related-wrap
2
- padding: 2rem 1rem
2
+ padding: 1rem
3
+ margin: 2rem 0
3
4
  &:empty
4
5
  display: none
5
6
  section.header
@@ -18,108 +19,76 @@
18
19
  color: var(--text-p1)
19
20
 
20
21
 
21
- .related-wrap#related-posts
22
- .related-posts
23
- width: 100%
24
- display: flex
25
- margin: 1rem 0
26
- overflow-x: scroll
27
- align-items: flex-start
28
- scrollbar(8px, 4px)
29
- padding-bottom: 8px
30
- border-radius: $border-block
31
- a
32
- flex-grow: 0
33
- flex-shrink: 0
34
- background: var(--card)
35
- border-radius: $border-block
36
- padding-bottom: 1rem
37
- line-height: 1.2
38
- display: flex
39
- flex-direction: column
22
+
23
+ .related-posts
24
+ width: 100%
25
+ margin: 1rem 0
26
+ .item
27
+ line-height: 1.2
28
+ display: block
29
+ border-left: 0
30
+ margin-top: 1rem
31
+ .title
32
+ color: var(--text-p1)
33
+ font-weight: 500
34
+ font-size: 1rem
35
+ trans1 color
36
+ position: relative
37
+ padding-bottom: 4px
38
+ &:after
39
+ content: ''
40
+ position: absolute
41
+ left: 0
42
+ width: 0
43
+ height: 2px
44
+ bottom: 0
45
+ border-radius: 2px
46
+ background: $color-hover
47
+ trans1 width
48
+ .excerpt
49
+ color: var(--text-p3)
50
+ font-size: $fs-12
51
+ margin-top: 0.5rem
52
+ display: -webkit-box
53
+ -webkit-box-orient: vertical
40
54
  overflow: hidden
41
- min-width: 280px
42
- width: 40vw
43
- max-width: 460px
44
- border: 1px solid var(--block-hover)
45
- z-index: 1
46
- .img
47
- min-width: 100%
48
- min-height: 140px
49
- height: "calc(%s * 0.5)" % @width
50
- max-height: 230px
51
- overflow: hidden
52
- img
53
- width: 100%
54
- height: 100%
55
- object-fit: cover
56
- &:not(.lazy)
57
- trans1: transform 1s
58
- @media screen and (max-width: $device-tablet)
59
- width: 70vw
60
- .img
61
- height: "calc(%s * 0.5)" % @width
55
+ -webkit-line-clamp: 2
56
+ &:hover
62
57
  .title
63
- color: var(--text-p1)
64
- font-weight: 500
65
- font-size: $fs-15
66
- margin: .75rem .75rem 0 .75rem
67
- display: -webkit-box
68
- -webkit-box-orient: vertical
69
- overflow: hidden
70
- -webkit-line-clamp: 2
71
- .excerpt
72
- color: var(--text-p2)
73
- font-size: $fs-13
74
- margin: 0.4rem .75rem 0 .75rem
75
- display: -webkit-box
76
- -webkit-box-orient: vertical
77
- overflow: hidden
78
- -webkit-line-clamp: 3
79
- &:hover
80
- img
81
- transform: scale(1.04)
82
- a+a
83
- margin-left: 1rem
58
+ color: $color-hover
59
+ &:after
60
+ width: 100%
84
61
 
85
62
 
86
63
  .related-wrap#read-next
87
64
  .body
88
- background: var(--block)
89
- border-radius: $border-block
90
- border: 1px solid var(--block-border)
91
- margin-top: 1rem
92
- overflow: hidden
93
- .line
94
- margin: 0
95
- height: 1px
96
- background: var(--block-border)
97
- &+.line,&:first-child,&:last-child
98
- display: none
99
- >a
100
- display: flex
65
+ display: grid
66
+ grid-gap: 16px
67
+ grid-template-columns: repeat(auto-fill, "calc((100% - 1 * %s) / 2)" % 16px)
68
+ .item
69
+ border-top: 1px dashed var(--block-border)
70
+ border-bottom: 1px dashed var(--block-border)
71
+ padding: 1rem 0
72
+ .note
73
+ margin-bottom: 0.75rem
74
+ font-size: $fs-12
75
+ color: var(--text-p4)
76
+ font-weight: 500
77
+ a
101
78
  margin: 0
102
79
  line-height: 1.2
103
- padding: 0.75rem 0.5rem
104
- color: var(--text-p3)
105
- justify-content: space-between
106
- align-items: center
107
- font-weight: 500
108
- font-size: $fs-12
109
- &:first-child
110
- color: var(--text-p1)
111
- font-size: $fs-h4
112
- font-weight: 400
113
- .note
114
- flex-shrink: 0
115
- margin-left: 4px
116
- font-size: $fs-12
117
- color: var(--text-p4)
118
- font-weight: 500
80
+ color: var(--text-p1)
81
+ font-size: $fs-h4
119
82
  &:hover
120
83
  color: $color-hover !important
121
- background: var(--card)
122
-
84
+ #next
85
+ text-align: right
86
+ .wiki+.related-wrap#read-next
87
+ .item
88
+ a
89
+ font-size: $fs-h3
90
+ &#prev a
91
+ color: var(--text-p3)
123
92
 
124
93
 
125
94
  .related-wrap#comments
@@ -1,5 +1,5 @@
1
- .l_left .footer
2
- margin-top: .5rem
1
+ .l_left>.footer
2
+ margin: 0.5rem var(--gap-l) 0
3
3
  @media screen and (max-width: $device-tablet)
4
4
  margin-bottom: 1rem
5
5
 
@@ -26,6 +26,8 @@
26
26
  if hexo-config('style.darkmode') == 'auto'
27
27
  @media (prefers-color-scheme: dark)
28
28
  box-shadow: none
29
+ if hexo-config('style.darkmode') == 'always'
30
+ box-shadow: none
29
31
 
30
32
  .proj-wrap
31
33
  display: grid