hexo-theme-stellar 1.12.0 → 1.14.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 (47) hide show
  1. package/README.md +7 -7
  2. package/_config.yml +10 -27
  3. package/_data/links.yml +7 -0
  4. package/_data/widgets.yml +5 -3
  5. package/layout/_partial/head.ejs +2 -0
  6. package/layout/_partial/main/navbar/list_post.ejs +57 -34
  7. package/layout/_partial/main/post_list/post_card.ejs +21 -14
  8. package/layout/_partial/scripts/index.ejs +1 -0
  9. package/layout/_partial/sidebar/widgets/ghissues.ejs +0 -1
  10. package/layout/_partial/sidebar/widgets/timeline.ejs +2 -2
  11. package/layout/index.ejs +1 -1
  12. package/layout/page.ejs +19 -10
  13. package/package.json +1 -1
  14. package/scripts/events/lib/config.js +1 -1
  15. package/scripts/tags/friends.js +36 -75
  16. package/scripts/tags/link.js +15 -3
  17. package/scripts/tags/sites.js +40 -79
  18. package/scripts/tags/timeline.js +6 -4
  19. package/source/css/_common/base.styl +1 -1
  20. package/source/css/_common/highlight.styl +1 -1
  21. package/source/css/_common/pre.styl +1 -1
  22. package/source/css/_custom.styl +1 -1
  23. package/source/css/_defines/theme.styl +18 -13
  24. package/source/css/_layout/list.styl +12 -12
  25. package/source/css/_layout/main.styl +1 -1
  26. package/source/css/_layout/md.styl +10 -16
  27. package/source/css/_layout/partial/bread-nav.styl +1 -1
  28. package/source/css/_layout/partial/navbar.styl +1 -1
  29. package/source/css/_layout/sidebar/sidebar.styl +10 -9
  30. package/source/css/_layout/sidebar/widgets.styl +1 -2
  31. package/source/css/_layout/tag-plugins/common.styl +70 -36
  32. package/source/css/_layout/tag-plugins/folding.styl +2 -2
  33. package/source/css/_layout/tag-plugins/link.styl +3 -3
  34. package/source/css/_layout/tag-plugins/quot.styl +1 -0
  35. package/source/css/_layout/tag-plugins/split.styl +10 -6
  36. package/source/css/_layout/tag-plugins/timeline.styl +41 -10
  37. package/source/css/_plugins/comments/waline.styl +4 -0
  38. package/source/css/_plugins/index.styl +0 -2
  39. package/source/css/_plugins/lazyload.styl +1 -1
  40. package/source/js/main.js +2 -2
  41. package/source/js/plugins/fcircle.js +92 -0
  42. package/source/js/plugins/linkcard.js +23 -99
  43. package/source/js/plugins/timeline.js +48 -35
  44. package/layout/_partial/plugins/comments/valine/layout.ejs +0 -19
  45. package/layout/_partial/plugins/comments/valine/script.ejs +0 -48
  46. package/scripts/tags/issues.js +0 -30
  47. package/source/css/_plugins/comments/valine.styl +0 -222
@@ -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://data.json.vlts.cc/v2/' + args.repo;
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://screenshot-api.xaoxuu.com/api?url=' + site.url + '&width=1280&height=720')) + '" 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
  });
@@ -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">';
@@ -8,7 +8,7 @@ pre
8
8
 
9
9
  a
10
10
  text-decoration: none
11
- color: $color-link
11
+ color: var(--theme-link)
12
12
  &:hover
13
13
  color: $color-hover
14
14
 
@@ -7,7 +7,7 @@ code
7
7
  p>code:not([class]),li>code:not([class])
8
8
  font-size: 85%
9
9
  background: var(--block)
10
- padding: .2em .4em
10
+ padding: .2em
11
11
  border-radius: 4px
12
12
 
13
13
  article.md .highlight, pre:not([class]):has(>code)
@@ -1,6 +1,6 @@
1
1
  pre:not([class]):has(>code)
2
2
  display: block
3
3
  padding: 1rem
4
- overflow: scroll
4
+ overflow: auto
5
5
  code
6
6
  padding: 0
@@ -64,7 +64,7 @@ $fs-p = $fs-15
64
64
  $fs-code = $fs-13
65
65
 
66
66
  $border-card = 12px
67
- $border-block = 6px
67
+ $border-block = 8px
68
68
  $border-image = 6px
69
69
 
70
70
  // 可以动态变化的属性
@@ -1,8 +1,12 @@
1
- :root
2
- --site-bg: $light-background
3
- --block: $light-block
4
- --block-border: darken($light-block, 5)
5
- --block-hover: darken($light-block, 2)
1
+ set_text_light()
2
+ --text-p0: $dark-title
3
+ --text-p1: mix($dark-text, $dark-background, 85)
4
+ --text-p2: mix($dark-text, $dark-background, 70)
5
+ --text-p3: mix($dark-text, $dark-background, 45)
6
+ --text-p4: mix($dark-text, $dark-background, 35)
7
+ --text-meta: mix($dark-text, $dark-background, 30)
8
+ --text-code: $dark-code
9
+ set_text_dark()
6
10
  --text-p0: $light-title
7
11
  --text-p1: $light-text
8
12
  --text-p2: mix($light-text, $light-background, 80)
@@ -10,24 +14,25 @@
10
14
  --text-p4: mix($light-text, $light-background, 35)
11
15
  --text-meta: mix($light-text, $light-background, 20)
12
16
  --text-code: $light-code
17
+ :root
18
+ --site-bg: $light-background
13
19
  --card: $light-card
20
+ --block: $light-block
21
+ --block-border: darken($light-block, 5)
22
+ --block-hover: darken($light-block, 2)
23
+ set_text_dark()
14
24
  --theme-highlight: darken($color-theme, 5)
15
25
  --theme-bg: mix($color-theme, $light-card, 10)
26
+ --theme-link: $color-link
16
27
 
17
28
  set_darkmode()
18
29
  :root
19
30
  --site-bg: $dark-background
31
+ --card: $dark-card
20
32
  --block: $dark-block
21
33
  --block-border: lighten($dark-block, 6)
22
34
  --block-hover: darken($dark-block, 4)
23
- --text-p0: $dark-title
24
- --text-p1: mix($dark-text, $dark-background, 85)
25
- --text-p2: mix($dark-text, $dark-background, 70)
26
- --text-p3: mix($dark-text, $dark-background, 45)
27
- --text-p4: mix($dark-text, $dark-background, 35)
28
- --text-meta: mix($dark-text, $dark-background, 30)
29
- --text-code: $dark-code
30
- --card: $dark-card
35
+ set_text_light()
31
36
  --theme-highlight: $color-theme
32
37
  --theme-bg: mix($color-theme, $dark-card, 10)
33
38
  @media screen and (max-width: $device-mobile-max)
@@ -1,15 +1,13 @@
1
1
  // list
2
2
  .post-list
3
3
  margin: 1rem
4
- .post-title
5
- margin-top: 1.5rem
6
4
  .post-title:first-child
7
5
  margin-top: .5rem
8
6
 
9
7
  .post-list
10
8
  .post-title
11
9
  font-weight: 500
12
- margin: .75rem 0
10
+ margin: 1.25rem 0 .75rem 0
13
11
  line-height: 1.2
14
12
  font-size: $fs-h3
15
13
  border-bottom: none
@@ -29,6 +27,7 @@
29
27
  box-shadow: 0 2px 8px 0px rgba(0, 0, 0, 0.02)
30
28
  trans1 box-shadow
31
29
  overflow: hidden
30
+ z-index: 0
32
31
  background: var(--card)
33
32
  position: relative
34
33
  .excerpt
@@ -53,8 +52,12 @@
53
52
  img
54
53
  object-fit: contain
55
54
  height: 1.5em
55
+
56
56
  .post-list .post-card:hover
57
57
  box-shadow: 0 1px 4px 0px rgba(0, 0, 0, 0.1), 0 4px 16px 0px rgba(0, 0, 0, 0.1)
58
+ img
59
+ transform: scale(1.02)
60
+ filter: brightness(80%)
58
61
 
59
62
 
60
63
  // common article
@@ -86,11 +89,9 @@
86
89
  @media screen and (max-width: 900px)
87
90
  height: 240px
88
91
  @media screen and (max-width: $device-tablet)
89
- height: 280px
90
- @media screen and (max-width: $device-mobile)
91
- height: 240px
92
- @media screen and (max-width: $device-mobile-425)
93
92
  height: 220px
93
+ @media screen and (max-width: $device-mobile-425)
94
+ height: 200px
94
95
  @media screen and (max-width: $device-mobile-375)
95
96
  height: 180px
96
97
 
@@ -105,19 +106,18 @@
105
106
  position: absolute
106
107
  line-height: 1.2
107
108
  width: 'calc(100% - %s * 2)' % 1rem
108
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2)
109
- color: white
109
+ color: var(--text-p0)
110
110
  &[position=top]
111
111
  top: 0
112
- background-image: linear-gradient(rgba(0,0,0,0.3),rgba(0,0,0,0.2),rgba(0,0,0,0))
112
+ background-image: linear-gradient(rgba(0,0,0,0.2),rgba(0,0,0,0))
113
113
  &[position=bottom]
114
114
  bottom: 0
115
- background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2),rgba(0,0,0,0.3))
115
+ background-image: linear-gradient(rgba(0,0,0,0),rgba(0,0,0,0.2))
116
116
  div+div
117
117
  margin-top: 4px
118
118
  .cap
119
- color: white
120
119
  font-size: $fs-13
120
+ color: unset
121
121
  .title
122
122
  font-weight: 500
123
123
  font-size: $fs-h3
@@ -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
@@ -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
 
@@ -136,30 +133,27 @@ article.md
136
133
  p:not([class]), li:not([class])
137
134
  a:not([class])
138
135
  position: relative
139
- padding: 2px
136
+ padding: 2px 0
140
137
  text-decoration: none
141
- display: inline-block
142
138
  line-height: 1.2
139
+ word-break: keep-all
143
140
  &:after
144
141
  content: ''
145
142
  position: absolute
146
143
  border-radius: 2px
147
- bottom: 1px
148
- left: 2px
149
- right: 2px
144
+ bottom: 0
145
+ left: 0
146
+ right: 0
150
147
  height: 1px
151
- opacity: 0.5
152
- background: $color-link
148
+ opacity: 0.8
149
+ background: var(--theme-link)
153
150
  trans1: all
154
151
  &:hover
155
152
  border-bottom: none
156
- color: $color-link
157
- // color: darken($color-hover, 10)
158
- // background: alpha($color-hover, 0.08)
153
+ color: var(--theme-link)
159
154
  &:after
160
155
  height: 100%
161
156
  opacity: 0.2
162
157
  bottom: 0
163
- left: 0
164
- right: 0
165
- // background-color: alpha($color-hover, 0.08)
158
+ left: -2px
159
+ right: -2px
@@ -8,7 +8,7 @@
8
8
  align-items: center
9
9
  flex-direction: row
10
10
  &:not([style]) a
11
- color: $color-link
11
+ color: var(--theme-link)
12
12
  &[style] a
13
13
  color: inherit
14
14
  span.sep
@@ -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
@@ -3,20 +3,21 @@
3
3
  flex-direction: column
4
4
  word-break: break-all
5
5
  text-align: justify
6
- padding: var(--gap-l) 0
7
- padding-top: "calc(2 * %s)" % var(--gap-l)
8
- height: "calc(100vh - 3 * %s)" % var(--gap-l)
9
- @media screen and (max-width: $device-mobile-max)
10
- padding-top: "calc(1 * %s)" % var(--gap-l)
11
- height: "calc(100% - 2 * %s)" % var(--gap-l)
6
+ height: "calc(100vh - 1 * %s)" % var(--gap-l)
12
7
  .header
13
- margin: 0 var(--gap-l)
8
+ margin: var(--gap-l) var(--gap-l) 0
9
+ @media screen and (min-width: $device-mobile-max)
10
+ >.widgets:first-child>.widget-wrap:first-child
11
+ margin-top: "calc(2 * %s)" % var(--gap-l)
12
+ @media screen and (max-width: $device-mobile-max)
13
+ height: 100vh
14
+
14
15
 
15
16
  .l_left[layout=wiki]
16
17
  padding-bottom: 0
17
- height: "calc(100vh - 2 * %s)" % var(--gap-l)
18
+ height: 100vh
18
19
  @media screen and (max-width: $device-mobile-max)
19
- height: "calc(100% - 1 * %s)" % var(--gap-l)
20
+ height: 100vh
20
21
  .widgets >:last-child
21
22
  margin-bottom: 6rem
22
23
 
@@ -100,5 +100,4 @@
100
100
  display: none
101
101
  &+.timenode
102
102
  margin-top: 0.75rem
103
- .body
104
- max-height: 40vh
103
+
@@ -1,3 +1,24 @@
1
+ set_text_white()
2
+ --text-p0: white
3
+ --text-p1: white
4
+ --text-p2: #eee
5
+ --text-p3: #ddd
6
+ --text-code: white
7
+ --card: $dark-card
8
+ --block: $dark-block
9
+ --block-border: lighten($dark-block, 6)
10
+ --block-hover: darken($dark-block, 4)
11
+ set_text_black()
12
+ --text-p0: black
13
+ --text-p1: #111
14
+ --text-p2: #333
15
+ --text-p3: #555
16
+ --text-code: white
17
+ --card: $light-card
18
+ --block: $light-block
19
+ --block-border: darken($light-block, 5)
20
+ --block-hover: darken($light-block, 2)
21
+
1
22
  .tag-plugin
2
23
  --theme: var(--text-p1)
3
24
  --theme-border: var(--block-border)
@@ -5,86 +26,99 @@
5
26
 
6
27
  .tag-plugin[color='red']
7
28
  --theme: $c-red
8
- --theme-border: mix($c-red, $light-card, 40)
9
- --theme-bg: mix($c-red, $light-card, 10)
29
+ --theme-border: mix($c-red, white, 60)
30
+ --theme-bg: mix($c-red, white, 15)
10
31
 
11
32
  .tag-plugin[color='orange']
12
33
  --theme: $c-orange
13
- --theme-border: mix($c-orange, $light-card, 40)
14
- --theme-bg: mix($c-orange, $light-card, 10)
34
+ --theme-border: mix($c-orange, white, 60)
35
+ --theme-bg: mix($c-orange, white, 15)
15
36
 
16
37
  .tag-plugin[color='yellow']
17
38
  --theme: $c-yellow
18
- --theme-border: mix($c-yellow, $light-card, 40)
19
- --theme-bg: mix($c-yellow, $light-card, 10)
39
+ --theme-border: mix($c-yellow, white, 60)
40
+ --theme-bg: mix($c-yellow, white, 20)
20
41
 
21
42
  .tag-plugin[color='green']
22
43
  --theme: $c-green
23
- --theme-border: mix($c-green, $light-card, 40)
24
- --theme-bg: mix($c-green, $light-card, 10)
44
+ --theme-border: mix($c-green, white, 60)
45
+ --theme-bg: mix($c-green, white, 15)
25
46
 
26
47
  .tag-plugin[color='cyan']
27
48
  --theme: $c-cyan
28
- --theme-border: mix($c-cyan, $light-card, 40)
29
- --theme-bg: mix($c-cyan, $light-card, 10)
49
+ --theme-border: mix($c-cyan, white, 60)
50
+ --theme-bg: mix($c-cyan, white, 15)
30
51
 
31
52
  .tag-plugin[color='blue']
32
53
  --theme: $c-blue
33
- --theme-border: mix($c-blue, $light-card, 40)
34
- --theme-bg: mix($c-blue, $light-card, 10)
54
+ --theme-border: mix($c-blue, white, 60)
55
+ --theme-bg: mix($c-blue, white, 15)
35
56
 
36
57
  .tag-plugin[color='purple']
37
58
  --theme: $c-purple
38
- --theme-border: mix($c-purple, $light-card, 40)
39
- --theme-bg: mix($c-purple, $light-card, 10)
40
-
59
+ --theme-border: mix($c-purple, white, 60)
60
+ --theme-bg: mix($c-purple, white, 15)
41
61
 
42
62
  .tag-plugin[color='light']
43
63
  --theme-bg: white
44
64
 
45
-
46
65
  .tag-plugin[color='dark']
47
- --theme-bg: #444
48
- color: var(--card) !important
66
+ --theme-bg: #333
67
+ set_text_white()
68
+
69
+ .tag-plugin.note[color='warning']
70
+ --theme: $c-yellow
71
+ --theme-border: #ffe659
72
+ --theme-bg: #ffe659
73
+ --theme-link: #ff453a
74
+
75
+ .tag-plugin.note[color='error']
76
+ --theme: $c-yellow
77
+ --theme-border: #ff453a
78
+ --theme-bg: #ff453a
79
+ --theme-link: #ffe659
80
+ set_text_white()
49
81
 
50
82
  set_darkmode_tags()
51
83
  .tag-plugin[color='red']
52
- --theme-border: mix($c-red, $dark-card, 80)
53
- --theme-bg: mix($c-red, $dark-card, 10)
84
+ --theme-border: mix($c-red, black, 70)
85
+ --theme-bg: mix($c-red, black, 20)
54
86
 
55
87
  .tag-plugin[color='orange']
56
- --theme-border: mix($c-orange, $dark-card, 80)
57
- --theme-bg: mix($c-orange, $dark-card, 10)
88
+ --theme-border: mix($c-orange, black, 70)
89
+ --theme-bg: mix($c-orange, black, 20)
58
90
 
59
91
  .tag-plugin[color='yellow']
60
- --theme-border: mix($c-yellow, $dark-card, 80)
61
- --theme-bg: mix($c-yellow, $dark-card, 10)
92
+ --theme-border: mix($c-yellow, black, 70)
93
+ --theme-bg: mix($c-yellow, black, 20)
62
94
 
63
95
  .tag-plugin[color='green']
64
- --theme-border: mix($c-green, $dark-card, 80)
65
- --theme-bg: mix($c-green, $dark-card, 10)
96
+ --theme-border: mix($c-green, black, 70)
97
+ --theme-bg: mix($c-green, black, 20)
66
98
 
67
99
  .tag-plugin[color='cyan']
68
- --theme-border: mix($c-cyan, $dark-card, 80)
69
- --theme-bg: mix($c-cyan, $dark-card, 10)
100
+ --theme-border: mix($c-cyan, black, 70)
101
+ --theme-bg: mix($c-cyan, black, 20)
70
102
 
71
103
  .tag-plugin[color='blue']
72
- --theme-border: mix($c-blue, $dark-card, 80)
73
- --theme-bg: mix($c-blue, $dark-card, 10)
104
+ --theme-border: mix($c-blue, black, 70)
105
+ --theme-bg: mix($c-blue, black, 20)
74
106
 
75
107
  .tag-plugin[color='purple']
76
- --theme-border: mix($c-purple, $dark-card, 80)
77
- --theme-bg: mix($c-purple, $dark-card, 10)
108
+ --theme-border: mix($c-purple, black, 70)
109
+ --theme-bg: mix($c-purple, black, 20)
78
110
 
79
111
  .tag-plugin[color='light']
80
112
  --theme-border: white
81
- --theme-bg: #ddd
82
- color: var(--card) !important
113
+ --theme-bg: #fff
83
114
 
84
115
  .tag-plugin[color='dark']
85
116
  --theme-border: black
86
- --theme-bg: #222
87
- color: var(--text-p1) !important
117
+ --theme-bg: #111
118
+ set_text_white()
119
+
120
+ .tag-plugin[color='warning'],.tag-plugin[color='light']
121
+ set_text_black()
88
122
 
89
123
  if hexo-config('style.darkmode') == 'auto'
90
124
  @media (prefers-color-scheme: dark)
@@ -48,8 +48,8 @@ details.folding[open]
48
48
  margin: 0 - 1rem
49
49
  margin-top: 0
50
50
  background: var(--card)
51
- border-bottom-left-radius: $border-block
52
- border-bottom-right-radius: $border-block
51
+ border-bottom-left-radius: 'calc(%s - 1px)' % $border-block
52
+ border-bottom-right-radius: 'calc(%s - 1px)' % $border-block
53
53
  font-size: $fs-15
54
54
  >:first-child
55
55
  margin-top: 0
@@ -3,7 +3,7 @@
3
3
  margin: 1em auto
4
4
  display: flex
5
5
  justify-content: center
6
- @media screen and (max-width: $device-mobile-425)
6
+ @media screen and (max-width: $device-mobile-375)
7
7
  width: 100%
8
8
 
9
9
  .md .link-card
@@ -14,8 +14,8 @@
14
14
  cursor: pointer
15
15
  min-width 280px
16
16
  max-width: 100%
17
- width: 350px
18
- @media screen and (max-width: $device-mobile-425)
17
+ width: 320px
18
+ @media screen and (max-width: $device-mobile-375)
19
19
  width: 100%
20
20
  box-shadow: $boxshadow-card
21
21
  border-radius: $border-block
@@ -2,6 +2,7 @@
2
2
  text-align: center
3
3
  position: relative
4
4
  align-items: center
5
+ max-width 400px
5
6
  .md .tag-plugin.quot:not(span)
6
7
  display: inline-flex
7
8
  align-self: center