hexo-theme-stellar 1.18.0 → 1.18.1

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 (63) hide show
  1. package/README.md +2 -2
  2. package/_config.yml +16 -32
  3. package/layout/_partial/plugins/comments/artalk/layout.ejs +19 -0
  4. package/layout/_partial/plugins/comments/artalk/script.ejs +25 -0
  5. package/layout/_partial/plugins/comments/layout.ejs +4 -4
  6. package/layout/_partial/scripts/index.ejs +1 -1
  7. package/layout/_partial/widgets/toc.ejs +1 -1
  8. package/package.json +1 -1
  9. package/scripts/tags/index.js +32 -6
  10. package/scripts/tags/inline-labels.js +27 -27
  11. package/scripts/tags/lib/ablock.js +33 -0
  12. package/scripts/tags/lib/about.js +48 -0
  13. package/scripts/tags/lib/checkbox.js +30 -0
  14. package/scripts/tags/{copy.js → lib/copy.js} +23 -23
  15. package/scripts/tags/lib/emoji.js +40 -0
  16. package/scripts/tags/{folders.js → lib/folders.js} +22 -22
  17. package/scripts/tags/lib/folding.js +30 -0
  18. package/scripts/tags/lib/frame.js +66 -0
  19. package/scripts/tags/lib/friends.js +53 -0
  20. package/scripts/tags/{ghcard.js → lib/ghcard.js} +18 -18
  21. package/scripts/tags/{grid.js → lib/grid.js} +20 -20
  22. package/scripts/tags/{image.js → lib/image.js} +38 -38
  23. package/scripts/tags/lib/link.js +78 -0
  24. package/scripts/tags/lib/mark.js +23 -0
  25. package/scripts/tags/lib/navbar.js +57 -0
  26. package/scripts/tags/lib/note.js +35 -0
  27. package/scripts/tags/lib/poetry.js +47 -0
  28. package/scripts/tags/{quot.js → lib/quot.js} +24 -24
  29. package/scripts/tags/lib/sites.js +57 -0
  30. package/scripts/tags/lib/swiper.js +36 -0
  31. package/scripts/tags/lib/tabs.js +33 -33
  32. package/scripts/tags/{tag.js → lib/tag.js} +13 -13
  33. package/scripts/tags/lib/timeline.js +78 -0
  34. package/scripts/tags/lib/toc.js +73 -0
  35. package/source/css/_defines/theme.styl +6 -6
  36. package/source/css/_layout/md.styl +10 -10
  37. package/source/css/_layout/partial/related.styl +7 -5
  38. package/source/css/_layout/tag-plugins/folders.styl +8 -8
  39. package/source/css/_layout/tag-plugins/quot.styl +3 -5
  40. package/source/css/_layout/widgets/search.styl +1 -0
  41. package/source/css/_plugins/aplayer.styl +3 -0
  42. package/source/css/_plugins/comments/artalk.styl +4 -0
  43. package/source/css/_plugins/comments/utterances.styl +1 -1
  44. package/source/css/_plugins/index.styl +4 -0
  45. package/source/css/_plugins/swiper.styl +7 -4
  46. package/source/js/main.js +7 -5
  47. package/scripts/tags/ablock.js +0 -33
  48. package/scripts/tags/about.js +0 -48
  49. package/scripts/tags/checkbox.js +0 -38
  50. package/scripts/tags/emoji.js +0 -40
  51. package/scripts/tags/folding.js +0 -30
  52. package/scripts/tags/frame.js +0 -66
  53. package/scripts/tags/friends.js +0 -53
  54. package/scripts/tags/lib/users.js +0 -22
  55. package/scripts/tags/link.js +0 -79
  56. package/scripts/tags/mark.js +0 -23
  57. package/scripts/tags/navbar.js +0 -57
  58. package/scripts/tags/note.js +0 -35
  59. package/scripts/tags/poetry.js +0 -47
  60. package/scripts/tags/sites.js +0 -57
  61. package/scripts/tags/swiper.js +0 -38
  62. package/scripts/tags/timeline.js +0 -81
  63. package/scripts/tags/toc.js +0 -72
@@ -7,49 +7,49 @@
7
7
  *
8
8
  */
9
9
 
10
- 'use strict';
10
+ 'use strict'
11
11
 
12
- hexo.extend.tag.register('quot', function(args) {
13
- var el = '';
14
- args = hexo.args.map(args, ['el', 'icon'], ['text']);
12
+ module.exports = ctx => function(args) {
13
+ var el = ''
14
+ args = ctx.args.map(args, ['el', 'icon'], ['text'])
15
15
  if (!args.el) {
16
- args.el = 'p';
16
+ args.el = 'p'
17
17
  }
18
18
 
19
- var type = '';
19
+ var type = ''
20
20
  if (args.icon && args.icon != 'square' && args.icon != 'quotes') {
21
- type = ' type="icon"';
21
+ type = ' type="icon"'
22
22
  } else {
23
- type = ' type="text"';
23
+ type = ' type="text"'
24
24
  }
25
25
  function content() {
26
26
  if (!args.icon) {
27
- return args.text;
27
+ return args.text
28
28
  }
29
- var el = '';
30
- const cfg = hexo.theme.config.tag_plugins.quot[args.icon];
29
+ var el = ''
30
+ const cfg = ctx.theme.config.tag_plugins.quot[args.icon]
31
31
  if (cfg && cfg.prefix) {
32
- el += '<img class="icon prefix" src="' + cfg.prefix + '" />';
32
+ el += '<img class="icon prefix" src="' + cfg.prefix + '" />'
33
33
  }
34
- el += args.text;
34
+ el += args.text
35
35
  if (cfg && cfg.suffix) {
36
- el += '<img class="icon suffix" src="' + cfg.suffix + '" />';
36
+ el += '<img class="icon suffix" src="' + cfg.suffix + '" />'
37
37
  }
38
- return el;
38
+ return el
39
39
  }
40
40
  if (args.el.includes('h')) {
41
41
  el += '<div' + ' class="tag-plugin quot">'
42
- el += '<' + args.el + ' class="content" id="' + args.text + '"' + type + '>';
43
- el += '<a href="#' + args.text + '" class="headerlink" title="' + args.text + '"></a>';
44
- el += content();
45
- el += '</' + args.el + '>';
42
+ el += '<' + args.el + ' class="content" id="' + args.text + '"' + type + '>'
43
+ el += '<a href="#' + args.text + '" class="headerlink" title="' + args.text + '"></a>'
44
+ el += content()
45
+ el += '</' + args.el + '>'
46
46
  el += '</div>'
47
47
  } else {
48
48
  el += '<div' + ' class="tag-plugin quot">'
49
- el += '<' + args.el + ' class="content"' + type + '>';
50
- el += content();
51
- el += '</' + args.el + '>';
49
+ el += '<' + args.el + ' class="content"' + type + '>'
50
+ el += content()
51
+ el += '</' + args.el + '>'
52
52
  el += '</div>'
53
53
  }
54
- return el;
55
- });
54
+ return el
55
+ }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * sites.js v2 | https://github.com/xaoxuu/hexo-theme-stellar/
3
+ * 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
4
+ *
5
+ * {% sites [group] [repo:owner/repo] [api:http] %}
6
+ */
7
+
8
+ 'use strict'
9
+
10
+ module.exports = ctx => function(args) {
11
+ args = ctx.args.map(args, ['repo', 'api'], ['group'])
12
+ var links = ctx.locals.get('data').links
13
+ if (links == undefined) {
14
+ links = {}
15
+ }
16
+ var api
17
+ if (args.api) {
18
+ api = args.api
19
+ } else if (args.repo) {
20
+ api = 'https://api.vlts.cc/output_data/v2/' + args.repo
21
+ }
22
+
23
+ var el = '<div class="tag-plugin sites-wrap">'
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;' + ctx.theme.config.default.cover + '&quot;;"/>'
36
+ cell += '<div class="info">'
37
+ cell += '<img src="' + (item.avatar || ctx.theme.config.default.link) + '" onerror="javascript:this.removeAttribute(&quot;data-src&quot;);this.src=&quot;' + ctx.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 ''
45
+ }
46
+ }
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>'
53
+ }
54
+
55
+ el += '</div>'
56
+ return el
57
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * swiper.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
3
+ * 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
4
+ *
5
+ * {% swiper [width:max] [effect:cards] %}
6
+ * ![img](src)
7
+ * {% endswiper %}
8
+ */
9
+
10
+ 'use strict'
11
+
12
+ module.exports = ctx => function(args, content) {
13
+ args = ctx.args.map(args, ['width', 'effect'])
14
+ var el = ''
15
+ function slide() {
16
+ let imgs = ctx.render.renderSync({text: content, engine: 'markdown'})
17
+ imgs = imgs.match(/<img(.*?)src="(.*?)"(.*?)>/gi)
18
+ if (imgs && imgs.length > 0) {
19
+ imgs.forEach((img, i) => {
20
+ img = img.replace('<img src', '<img no-lazy src')
21
+ el += '<div class="swiper-slide">' + img + '</div>'
22
+ })
23
+ }
24
+ }
25
+ el += '<div class="tag-plugin gallery swiper" id="swiper-api"'
26
+ el += ' ' + ctx.args.joinTags(args, ['width', 'effect']).join(' ')
27
+ el += '>'
28
+ el += '<div class="swiper-wrapper">'
29
+ slide()
30
+ el += '</div>'
31
+ el += '<div class="swiper-pagination"></div>'
32
+ el += '<div class="swiper-button-prev blur"></div>'
33
+ el += '<div class="swiper-button-next blur"></div>'
34
+ el += '</div>'
35
+ return el
36
+ }
@@ -2,58 +2,58 @@
2
2
  * tabs.js v2 | 基于NexT修改: https://theme-next.js.org/docs/tag-plugins/tabs
3
3
  */
4
4
 
5
- 'use strict';
5
+ 'use strict'
6
6
 
7
- var tab_index = 0;
7
+ var tab_index = 0
8
8
 
9
9
  module.exports = ctx => function(args, content = '') {
10
- var el = '';
11
10
  var arr = content.split(/<!--\s*tab (.*?)\s*-->/g).filter(item => item.trim().length > 0)
12
11
  if (arr.length < 1) {
13
- return el;
12
+ return ''
14
13
  }
15
- var tabs = [];
14
+ var tabs = []
16
15
  arr.forEach((item, i) => {
17
16
  if (i % 2 == 0) {
18
17
  tabs.push({
19
18
  header: item
20
- });
19
+ })
21
20
  } else if (tabs.length > 0) {
22
- var tab = tabs[tabs.length-1];
21
+ var tab = tabs[tabs.length-1]
23
22
  if (tab.body == undefined) {
24
- tab.body = item;
23
+ tab.body = item
25
24
  } else {
26
- tab.body += '\n' + item;
25
+ tab.body += '\n' + item
27
26
  }
28
27
  }
29
- });
28
+ })
30
29
 
31
- args = ctx.args.map(args, ['active', 'align']);
32
- const tabName = 'tab_' + ++tab_index;
33
- const tabActive = Number(args.active) || 0;
30
+ args = ctx.args.map(args, ['active', 'align'])
31
+ const tabName = 'tab_' + ++tab_index
32
+ const tabActive = Number(args.active) || 0
34
33
 
35
- let tabId = 0;
36
- let tabNav = '';
37
- let tabContent = '';
34
+ let tabId = 0
35
+ let tabNav = ''
36
+ let tabContent = ''
38
37
  tabs.forEach((tab, i) => {
39
- let content = ctx.render.renderSync({ text: (tab.body || ''), engine: 'markdown' }).trim();
40
- const abbr = tabName + ' ' + ++tabId;
41
- const href = abbr.toLowerCase().split(' ').join('-');
42
- const isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : '';
43
- tabNav += `<li class="tab${isActive}"><a href="#${href}">${tab.header || abbr}</a></li>`;
44
- tabContent += `<div class="tab-pane${isActive}" id="${href}">${content}</div>`;
45
- });
38
+ let content = ctx.render.renderSync({ text: (tab.body || ''), engine: 'markdown' }).trim()
39
+ const abbr = tabName + ' ' + ++tabId
40
+ const href = abbr.toLowerCase().split(' ').join('-')
41
+ const isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : ''
42
+ tabNav += `<li class="tab${isActive}"><a href="#${href}">${tab.header || abbr}</a></li>`
43
+ tabContent += `<div class="tab-pane${isActive}" id="${href}">${content}</div>`
44
+ })
46
45
 
47
- tabNav = `<ul class="nav-tabs">${tabNav}</ul>`;
48
- tabContent = `<div class="tab-content">${tabContent}</div>`;
46
+ tabNav = `<ul class="nav-tabs">${tabNav}</ul>`
47
+ tabContent = `<div class="tab-content">${tabContent}</div>`
49
48
 
50
- el += '<div class="tag-plugin tabs"';
49
+ var el = ''
50
+ el += '<div class="tag-plugin tabs"'
51
51
  if (args.align != undefined) {
52
- el += ' align="' + args.align + '"';
52
+ el += ' align="' + args.align + '"'
53
53
  }
54
- el += 'id="' + tabName.toLowerCase().split(' ').join('-') + '"';
55
- el += '">';
56
- el += tabNav + tabContent;
57
- el += '</div>';
58
- return el;
59
- };
54
+ el += 'id="' + tabName.toLowerCase().split(' ').join('-') + '"'
55
+ el += '>'
56
+ el += tabNav + tabContent
57
+ el += '</div>'
58
+ return el
59
+ }
@@ -6,15 +6,15 @@
6
6
  *
7
7
  */
8
8
 
9
- 'use strict';
9
+ 'use strict'
10
10
 
11
11
  const tag_colors = ['red', 'orange', 'yellow', 'green', 'cyan', 'blue', 'purple']
12
- var tag_index = 0;
12
+ var tag_index = 0
13
13
 
14
- hexo.extend.tag.register('tag', function(args) {
15
- args = hexo.args.map(args, ['color'], ['text', 'href']);
14
+ module.exports = ctx => function(args) {
15
+ args = ctx.args.map(args, ['color'], ['text', 'href'])
16
16
  if (args.color == null) {
17
- const default_color = hexo.theme.config.tag_plugins.tag?.default_color
17
+ const default_color = ctx.theme.config.tag_plugins.tag?.default_color
18
18
  if (default_color) {
19
19
  args.color = default_color
20
20
  } else {
@@ -25,11 +25,11 @@ hexo.extend.tag.register('tag', function(args) {
25
25
  }
26
26
  }
27
27
  }
28
- var el = '';
29
- el += '<a class="tag-plugin tag"';
30
- el += ' ' + hexo.args.joinTags(args, ['color', 'href']).join(' ');
31
- el += '>';
32
- el += args.text;
33
- el += '</a>';
34
- return el;
35
- });
28
+ var el = ''
29
+ el += '<a class="tag-plugin tag"'
30
+ el += ' ' + ctx.args.joinTags(args, ['color', 'href']).join(' ')
31
+ el += '>'
32
+ el += args.text
33
+ el += '</a>'
34
+ return el
35
+ }
@@ -0,0 +1,78 @@
1
+ /**
2
+ * timeline.js v2 | https://github.com/xaoxuu/hexo-theme-stellar/
3
+ *
4
+ * {% timeline %}
5
+ *
6
+ * <!-- node header1 -->
7
+ * what happened 1
8
+ *
9
+ * <!-- node header2 -->
10
+ * what happened 2
11
+ *
12
+ * {% endtimeline %}
13
+ */
14
+
15
+ 'use strict'
16
+
17
+ function layoutNodeTitle(ctx, content) {
18
+ var el = ''
19
+ el += '<div class="header">'
20
+ if (content && content.length > 0) {
21
+ el += ctx.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')
22
+ }
23
+ el += '</div>'
24
+ return el
25
+ }
26
+
27
+ function layoutNodeContent(ctx, content) {
28
+ var el = ''
29
+ el += '<div class="body fs14">'
30
+ if (content && content.length > 0) {
31
+ el += ctx.render.renderSync({text: content, engine: 'markdown'}).split('\n').join('')
32
+ }
33
+ el += '</div>'
34
+ return el
35
+ }
36
+
37
+ module.exports = ctx => function(args, content = '') {
38
+ args = ctx.args.map(args, ['api', 'user', 'type', 'limit', 'hide'])
39
+ var el = ''
40
+ if (!args.type) {
41
+ args.type = 'timeline'
42
+ }
43
+ if (args.api && args.api.length > 0) {
44
+ el += '<div class="tag-plugin timeline stellar-' + args.type + '-api"'
45
+ el += ' ' + ctx.args.joinTags(args, ['api', 'user', 'limit', 'hide']).join(' ')
46
+ el += '>'
47
+ } else {
48
+ el += '<div class="tag-plugin timeline">'
49
+ }
50
+
51
+ var arr = content.split(/<!--\s*node (.*?)\s*-->/g).filter(item => item.trim().length > 0)
52
+ if (arr.length > 0) {
53
+ var nodes = []
54
+ arr.forEach((item, i) => {
55
+ if (i % 2 == 0) {
56
+ nodes.push({
57
+ header: item
58
+ })
59
+ } else if (nodes.length > 0) {
60
+ var node = nodes[nodes.length-1]
61
+ if (node.body == undefined) {
62
+ node.body = item
63
+ } else {
64
+ node.body += '\n' + item
65
+ }
66
+ }
67
+ })
68
+ nodes.forEach((node, i) => {
69
+ el += '<div class="timenode" index="' + (i) + '">'
70
+ el += layoutNodeTitle(ctx, node.header)
71
+ el += layoutNodeContent(ctx, node.body)
72
+ el += '</div>'
73
+ })
74
+ }
75
+
76
+ el += '</div>'
77
+ return el
78
+ }
@@ -0,0 +1,73 @@
1
+ /**
2
+ * toc.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
3
+ * 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
4
+ *
5
+ * {% toc wiki:xxx [title] [open:true] [display:mobile] %}
6
+ */
7
+
8
+ 'use strict'
9
+
10
+ function layoutDocTree(ctx, pages) {
11
+ const url_for = require('hexo-util').url_for.bind(ctx)
12
+ var el = ''
13
+ el += '<ul class="toc">'
14
+ pages.forEach((p, i) => {
15
+ el += '<li>'
16
+ el += '<a class="list-link" href="' + url_for(p.path) + '">'
17
+ el += '<span>' + (p.title || p.seo_title) + '</span>'
18
+ el += '</a>'
19
+ el += '</li>'
20
+ })
21
+ el += '</ul>'
22
+ return el
23
+ }
24
+
25
+ module.exports = ctx => function(args) {
26
+ args = ctx.args.map(args, ['wiki', 'open', 'display'], ['title'])
27
+
28
+ var el = ''
29
+ el += '<div class="tag-plugin toc"'
30
+ el += ' ' + ctx.args.joinTags(args, ['display']).join(' ')
31
+ if (args.display === 'mobile') {
32
+ el += ' style="display:none"'
33
+ }
34
+ el += '>'
35
+
36
+ el += '<details class="toc"'
37
+ if (args.open != 'false') {
38
+ el += ' open'
39
+ }
40
+ el += '>'
41
+ el += '<summary>'
42
+ el += args.title || 'TOC'
43
+ el += '</summary>'
44
+
45
+ if (args.wiki) {
46
+ const proj = ctx.theme.config.wiki.projects[args.wiki]
47
+ if (proj == undefined) {
48
+ return ''
49
+ }
50
+ if (proj.sections && proj.sections.length > 1) {
51
+ el += '<div class="body fs14 multi">'
52
+ proj.sections.forEach((sec, i) => {
53
+ el += '<section>'
54
+ el += '<div class="header">'
55
+ el += sec.title
56
+ el += '</div>'
57
+ el += layoutDocTree(ctx, sec.pages)
58
+ el += '</section>'
59
+ })
60
+ el += '</div>'
61
+ } else {
62
+ el += '<div class="body fs14">'
63
+ el += '<div class="body">'
64
+ el += layoutDocTree(ctx, proj.pages)
65
+ el += '</div>'
66
+ el += '</div>'
67
+ }
68
+ }
69
+ el += '</details>'
70
+ // end
71
+ el += '</div>'
72
+ return el
73
+ }
@@ -33,7 +33,7 @@ set_text_light()
33
33
  --text-code: hsl($color-code-h, $color-code-s, $color-code-l * 1.25)
34
34
 
35
35
  :root
36
- --site-bg: hsl($color-background-h, $color-background-s, 98)
36
+ --site-bg: hsl($color-background-h, $color-background-s, $color-background-l)
37
37
  --card: hsl($color-block-h, $color-block-s, 100)
38
38
  --block: hsl($color-block-h, $color-block-s, 95)
39
39
  --block-border: hsl($color-block-h, $color-block-s, 90)
@@ -45,12 +45,12 @@ set_text_light()
45
45
 
46
46
  set_darkmode()
47
47
  :root
48
- --site-bg: hsl($color-background-h, $color-background-s / 2, 16)
49
- --card: hsl($color-block-h, $color-block-s * 1.5, 25)
50
- --block: hsl($color-block-h, $color-block-s, 12)
48
+ --site-bg: hsl($color-background-h, $color-background-s * 0.5, (100 - $color-background-l) * 2 + 8)
49
+ --card: hsl($color-block-h, $color-block-s * 1.5, 24)
50
+ --block: hsl($color-block-h, $color-block-s, 16)
51
51
  --block-border: hsl($color-block-h, $color-block-s, 24)
52
- --block-hover: hsl($color-block-h, $color-block-s, 9)
53
- --block-lighten: hsl($color-block-h, $color-block-s, 30)
52
+ --block-hover: hsl($color-block-h, $color-block-s, 20)
53
+ --block-lighten: hsl($color-block-h, $color-block-s, 32)
54
54
  set_text_light()
55
55
  @media screen and (max-width: $device-mobile-max)
56
56
  --site-bg: black
@@ -1,7 +1,6 @@
1
1
  .md-text
2
2
  max-width: 100%
3
- padding: 0 1rem
4
- margin-top: 1rem
3
+ padding: 1rem
5
4
  &:first-child
6
5
  margin-top: 0
7
6
  color: var(--text-p1)
@@ -21,9 +20,8 @@ h1.article-title
21
20
 
22
21
  .md-text.content
23
22
  position: relative
24
- margin-bottom: 2rem
25
- // display: flex
26
- // flex-direction: column
23
+ padding-bottom: 2rem
24
+ overflow: hidden
27
25
  &.indent
28
26
  >p:not([class])
29
27
  text-indent: 'calc(%s * 2)' % $fs-p
@@ -33,25 +31,27 @@ h1.article-title
33
31
  h1,h2,h3,h4,h5,h6
34
32
  text-align: center
35
33
  >h2:not([class])
36
- align-self: center
37
- border-bottom-style: dashed
38
- border-bottom-color: $color-accent
34
+ border-bottom: none
39
35
  >:first-child:not(h1)
40
36
  margin-top: 0
41
37
  h1:not(:first-child)
42
38
  margin-top: 2em
43
39
  h2:first-child
44
40
  margin-top: 0
41
+ h2
42
+ margin-bottom: 1rem
43
+ h3,h4,h5,h6
44
+ margin-bottom: .5rem
45
45
  h2,h3,h4,h5,h6
46
46
  color: var(--text-p0)
47
47
  padding-top: 1rem
48
- margin-bottom: .5rem
49
48
  line-height: 1.8
50
49
  &:hover
51
50
  a.headerlink:before
52
51
  opacity: 1
53
52
 
54
-
53
+ .md-text.content:first-child
54
+ padding-top: 0
55
55
 
56
56
  .md-text
57
57
  ul:not(:last-child),
@@ -1,6 +1,6 @@
1
1
  .related-wrap
2
- padding: 1rem
3
- margin: 2rem 0
2
+ padding: 0 1rem
3
+ margin: 4rem 0
4
4
  &:empty
5
5
  display: none
6
6
  section.header
@@ -17,7 +17,8 @@
17
17
  border-radius: $border-block
18
18
  color: var(--text-p1)
19
19
 
20
-
20
+ article.md-text.content+.related-wrap
21
+ margin-top: 0
21
22
 
22
23
  .related-posts
23
24
  max-width: 100%
@@ -82,7 +83,8 @@
82
83
 
83
84
 
84
85
  .related-wrap#comments
85
- div.cmt-title
86
+ padding: 0 1rem
87
+ .cmt-title
86
88
  p
87
89
  margin: 0
88
90
  font-size: inherit
@@ -93,7 +95,7 @@
93
95
  color: $color-hover
94
96
  &:before
95
97
  display: none
96
- div.cmt-body
98
+ .cmt-body
97
99
  min-height: 150px
98
100
  position: relative
99
101
  svg.loading
@@ -30,13 +30,13 @@
30
30
  &:hover
31
31
  color: var(--text-p0)
32
32
  background: var(--block-hover)
33
- &:after
34
- position: absolute
35
- content: '+'
36
- text-align: center
37
- top: 50%
38
- transform: translateY(-50%)
39
- right: 1rem
33
+ &:after
34
+ position: absolute
35
+ content: '+'
36
+ text-align: center
37
+ top: 50%
38
+ transform: translateY(-50%)
39
+ right: 1rem
40
40
 
41
41
 
42
42
  .tag-plugin.folders details[open]
@@ -49,7 +49,7 @@
49
49
  >summary
50
50
  color: var(--text-p1)
51
51
  background: var(--block-hover)
52
- &:hover:after
52
+ &:after
53
53
  content: '-'
54
54
 
55
55
  >div.body
@@ -9,13 +9,11 @@
9
9
  align-items: center
10
10
  border-bottom: none
11
11
  font-weight: 700
12
- &:first-child
13
- margin-top: 1.5rem
12
+ padding: 16px 24px
14
13
  a.headerlink:before
15
14
  content: ''
16
- padding: 16px 24px 8px 24px
17
15
  @media screen and (max-width: $device-mobile)
18
- padding: 16px 20px 8px
16
+ padding: 12px 20px
19
17
  line-height: 1.2
20
18
 
21
19
  .md-text .tag-plugin.quot .content
@@ -50,7 +48,7 @@
50
48
  border-left: 6px solid $color-accent
51
49
  &:after
52
50
  right: 0
53
- bottom: 0
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]
@@ -15,6 +15,7 @@
15
15
  padding: 0.5rem
16
16
  line-height: 1
17
17
  box-sizing: border-box
18
+ font-family: $ff-body
18
19
  border-radius: $border-block
19
20
  background-color: var(--card)
20
21
  color: var(--text-p0)
@@ -0,0 +1,3 @@
1
+ .md-text
2
+ .aplayer
3
+ border-radius: $border-block
@@ -0,0 +1,4 @@
1
+ .cmt-body.artalk .artalk
2
+ --at-color-main: $color-theme
3
+ .atk-main-editor
4
+ border-radius: $border-block
@@ -2,5 +2,5 @@
2
2
  margin: 0 -4px
3
3
  width: 'calc(100% + %s)' % 8px
4
4
 
5
- .related-wrap#comments div.cmt-body svg.loading
5
+ .related-wrap#comments .cmt-body svg.loading
6
6
  top: 62px
@@ -1,3 +1,5 @@
1
+ @import 'aplayer'
2
+
1
3
  // 根据主题配置加载
2
4
  if hexo-config('plugins.lazyload.enable')
3
5
  @import 'lazyload'
@@ -18,3 +20,5 @@ if hexo-config('comments.service') == 'utterances'
18
20
  @import 'comments/utterances'
19
21
  if hexo-config('comments.service') == 'waline'
20
22
  @import 'comments/waline'
23
+ if hexo-config('comments.service') == 'artalk'
24
+ @import 'comments/artalk'