hexo-theme-stellar 1.15.0 → 1.16.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 (41) hide show
  1. package/_config.yml +8 -8
  2. package/layout/_partial/head.ejs +7 -4
  3. package/layout/_partial/main/navbar/list_wiki.ejs +1 -3
  4. package/layout/_partial/plugins/comments/beaudar/layout.ejs +10 -29
  5. package/layout/_partial/plugins/comments/giscus/layout.ejs +10 -27
  6. package/layout/_partial/plugins/comments/layout.ejs +17 -2
  7. package/layout/_partial/plugins/comments/script.ejs +2 -2
  8. package/layout/_partial/plugins/comments/utterances/layout.ejs +10 -29
  9. package/layout/_partial/sidebar/header.ejs +43 -8
  10. package/layout/_partial/sidebar/index.ejs +50 -0
  11. package/layout/_partial/sidebar/widgets/recent.ejs +8 -7
  12. package/layout/_partial/sidebar/widgets/toc.ejs +5 -1
  13. package/layout/archive.ejs +1 -1
  14. package/layout/categories.ejs +1 -1
  15. package/layout/index.ejs +1 -3
  16. package/layout/tags.ejs +1 -1
  17. package/layout/wiki.ejs +2 -2
  18. package/package.json +1 -1
  19. package/scripts/events/lib/doc_tree.js +91 -90
  20. package/scripts/helpers/related_posts.js +1 -3
  21. package/scripts/helpers/utils.js +20 -0
  22. package/scripts/tags/folders.js +4 -6
  23. package/scripts/tags/lib/tabs.js +5 -9
  24. package/scripts/tags/split.js +6 -8
  25. package/scripts/tags/timeline.js +3 -5
  26. package/source/css/_common/blockquote.styl +10 -0
  27. package/source/css/_common/device.styl +11 -10
  28. package/source/css/_layout/list.styl +2 -1
  29. package/source/css/_layout/main.styl +4 -2
  30. package/source/css/_layout/md.styl +6 -13
  31. package/source/css/_layout/partial/bread-nav.styl +1 -1
  32. package/source/css/_layout/partial/navbar.styl +8 -1
  33. package/source/css/_layout/partial/related.styl +1 -2
  34. package/source/css/_layout/sidebar/sidebar.styl +4 -4
  35. package/source/css/_layout/sidebar/toc_wiki.styl +1 -1
  36. package/source/css/_layout/sidebar/widgets.styl +6 -3
  37. package/source/css/_layout/tag-plugins/common.styl +7 -7
  38. package/source/css/_layout/tag-plugins/link.styl +7 -7
  39. package/source/css/_layout/tag-plugins/split.styl +7 -1
  40. package/source/css/_layout/tag-plugins/timeline.styl +2 -4
  41. package/layout/_partial/sidebar/logo.ejs +0 -69
@@ -1,162 +1,163 @@
1
1
  /**
2
- * doc_tree.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
2
+ * doc_tree.js v2 | https://github.com/xaoxuu/hexo-theme-stellar/
3
3
  */
4
4
 
5
5
  'use strict';
6
6
 
7
- function page(page) {
8
- return {
9
- title: page.title,
10
- path: page.path,
11
- wiki: page.wiki
12
- };
7
+ class WikiPage {
8
+ constructor(page) {
9
+ this.id = page._id
10
+ this.title = page.title
11
+ this.path = page.path
12
+ this.layout = page.layout
13
+ this.seo_title = page.seo_title
14
+ this.wiki = page.wiki
15
+ this.order = page.order || 0
16
+ this.updated = page.updated
17
+ }
13
18
  }
14
19
 
15
- module.exports = hexo => {
16
- const data = hexo.locals.get('data');
17
- if (hexo.theme.config.wiki == undefined) {
18
- hexo.theme.config.wiki = {};
19
- }
20
- if (hexo.theme.config.wiki.projects == undefined) {
21
- hexo.theme.config.wiki.projects = {};
22
- }
23
- if (data.projects) {
24
- for (let id of Object.keys(data.projects)) {
25
- hexo.theme.config.wiki.projects[id] = data.projects[id];
26
- }
20
+ function createWikiObject(ctx) {
21
+ const wiki = { projects:{} }
22
+ const { projects } = ctx.locals.get('data')
23
+ if (projects) {
24
+ Object.assign(wiki.projects, projects)
27
25
  }
26
+ return wiki
27
+ }
28
28
 
29
+ module.exports = ctx => {
29
30
  // wiki 配置
30
- var wiki = hexo.theme.config.wiki;
31
+ var wiki = createWikiObject(ctx)
32
+ const pages = ctx.locals.get('pages')
31
33
  // wiki 所有页面
32
- const wiki_pages = hexo.locals.get('pages').filter(function (p) {
33
- return (p.layout === 'wiki') && (p.wiki != undefined) && (p.wiki.length > 0);
34
- });
34
+ const wiki_pages = pages.filter(p => (p.layout === 'wiki') && (p.wiki != undefined) && (p.wiki.length > 0)).map(p => new WikiPage(p))
35
35
 
36
36
  // 数据整合:项目标签
37
- var tagNames = [];
37
+ var all_tag_name = []
38
38
  for (let id of Object.keys(wiki.projects)) {
39
- let proj = wiki.projects[id];
40
- let tags = proj.tags;
39
+ let proj = wiki.projects[id]
40
+ let tags = proj.tags
41
41
  if (tags) {
42
42
  if ((typeof tags == 'string') && tags.constructor == String) {
43
- if (tagNames.includes(tags) === false) {
44
- tagNames.push(tags);
43
+ if (all_tag_name.includes(tags) === false) {
44
+ all_tag_name.push(tags)
45
45
  }
46
46
  // 类型转换
47
- tags = [tags];
47
+ tags = [tags]
48
48
  } else if ((typeof tags == 'object') && tags.constructor == Array) {
49
49
  tags.forEach((tag, i) => {
50
- if (tagNames.includes(tag) === false) {
51
- tagNames.push(tag);
50
+ if (all_tag_name.includes(tag) === false) {
51
+ all_tag_name.push(tag)
52
52
  }
53
- });
53
+ })
54
54
  }
55
- wiki.projects[id].tags = tags;
55
+ wiki.projects[id].tags = tags
56
56
  }
57
57
  }
58
58
  // 补充未分组的项目
59
- const projs = Object.keys(wiki.projects);
59
+ const projs = Object.keys(wiki.projects)
60
60
  wiki_pages.forEach((p, i) => {
61
61
  if (projs.includes(p.wiki) == false) {
62
62
  if (wiki.projects[p.wiki] == undefined) {
63
- wiki.projects[p.wiki] = {};
64
- wiki.projects[p.wiki].pages = [];
63
+ wiki.projects[p.wiki] = {}
64
+ wiki.projects[p.wiki].pages = []
65
65
  }
66
- var proj = wiki.projects[p.wiki];
66
+ var proj = wiki.projects[p.wiki]
67
67
  if (proj.description == undefined) {
68
- proj.description = p.description;
68
+ proj.description = p.description
69
69
  }
70
- wiki.projects[p.wiki].pages.push(p);
70
+ wiki.projects[p.wiki].pages.push(p)
71
71
  }
72
- });
72
+ })
73
73
  // 补充项目名称和首页
74
74
  for (let id of Object.keys(wiki.projects)) {
75
- let proj = wiki.projects[id];
76
- proj.id = id;
75
+ let proj = wiki.projects[id]
76
+ proj.id = id
77
77
  if (proj.title == undefined || proj.title.length === 0) {
78
- proj.title = id;
78
+ proj.title = id
79
79
  }
80
80
  if (proj.name == undefined || proj.name.length == 0) {
81
- proj.name = id;
81
+ proj.name = id
82
82
  }
83
83
  }
84
84
  // 补充 order
85
85
  wiki_pages.forEach((p, i) => {
86
86
  if (p.order == undefined) {
87
- p.order = 0;
87
+ p.order = 0
88
88
  }
89
- });
89
+ })
90
90
 
91
91
  // 数据整合:每个项目的子页面
92
92
  for (let id of Object.keys(wiki.projects)) {
93
- let proj = wiki.projects[id];
94
- proj.pages = wiki_pages.filter(function (p) {
95
- return p.wiki === id;
96
- }).sort('order');
97
- proj.pages.limit(1).forEach((p, i) => {
98
- proj.homepage = p;
99
- });
93
+ let proj = wiki.projects[id]
94
+ let proj_pages = wiki_pages.filter(p => p.wiki === id).sort((p1, p2) => p1.order < p2.order ? -1 : 1)
95
+ if (!proj_pages || proj_pages.length == 0) {
96
+ continue
97
+ }
98
+ proj.homepage = proj_pages[0]
99
+ proj.homepage.is_homepage = true
100
100
  // 内页按 section 分组
101
- var sectionConfigs = [];
101
+ var section_configs = []
102
102
  if (proj.sections) {
103
103
  for (let t of Object.keys(proj.sections)) {
104
- let range = proj.sections[t];
104
+ let range = proj.sections[t]
105
105
  if (range.length > 1) {
106
- sectionConfigs.push({
106
+ section_configs.push({
107
107
  title: t,
108
108
  from: range[0],
109
109
  to: range[1]
110
- });
110
+ })
111
111
  }
112
112
  }
113
113
  }
114
- var sections = [];
115
- sectionConfigs.forEach((sec, i) => {
116
- const pages = proj.pages.filter(function (p) {
117
- return p.order >= sec.from && p.order <= sec.to;
118
- });
119
- if (pages && pages.length > 0) {
114
+ var sections = []
115
+ section_configs.forEach((sec, i) => {
116
+ const sec_pages = proj_pages.filter( p => p.order >= sec.from && p.order <= sec.to )
117
+ if (sec_pages && sec_pages.length > 0) {
120
118
  sections.push({
121
119
  title: sec.title,
122
- pages: pages
123
- });
120
+ pages: sec_pages
121
+ })
124
122
  }
125
- });
126
- proj.sections = sections;
123
+ })
124
+ proj.sections = sections
125
+ proj.pages = proj_pages
127
126
  }
128
127
 
129
128
  // 全站所有的项目标签
130
- var all_tags = {};
131
- tagNames.forEach((tagName, i) => {
132
- var projs = [];
129
+ var all_tags = {}
130
+ all_tag_name.forEach((tag_name, i) => {
131
+ var projs = []
133
132
  for (let id of Object.keys(wiki.projects)) {
134
- let proj = wiki.projects[id];
135
- if (proj.tags && proj.tags.includes(tagName) === true && projs.includes(tagName) === false) {
136
- projs.push(proj.id);
133
+ let proj = wiki.projects[id]
134
+ if (proj.tags && proj.tags.includes(tag_name) === true && projs.includes(tag_name) === false) {
135
+ projs.push(proj.id)
137
136
  }
138
137
  }
139
- all_tags[tagName] = {
140
- name: tagName,
141
- path: (hexo.config.wiki_dir || 'wiki') + '/tags/' + tagName + '/index.html',
138
+ all_tags[tag_name] = {
139
+ name: tag_name,
140
+ path: (ctx.config.wiki_dir || 'wiki') + '/tags/' + tag_name + '/index.html',
142
141
  items: projs
143
- };
144
- });
142
+ }
143
+ })
145
144
 
146
- // 整合相似项目
145
+ // 关联相似项目
147
146
  for (let id of Object.keys(wiki.projects)) {
148
- let proj = wiki.projects[id];
147
+ let proj = wiki.projects[id]
149
148
  if (proj.tags) {
150
- var related = [];
151
- proj.tags.forEach((tagName, i) => {
152
- let tagObj = all_tags[tagName];
153
- related = related.concat(tagObj.items);
154
- related = [...new Set(related)];
155
- });
156
- proj.related = related;
149
+ var related = []
150
+ proj.tags.forEach((tag_name, i) => {
151
+ let tagObj = all_tags[tag_name]
152
+ related = related.concat(tagObj.items)
153
+ related = [...new Set(related)]
154
+ })
155
+ proj.related = related
157
156
  }
158
157
  }
159
158
 
160
- wiki.all_tags = all_tags;
161
- wiki.all_pages = wiki_pages;
162
- };
159
+ wiki.all_tags = all_tags
160
+ wiki.all_pages = wiki_pages
161
+ ctx.theme.config.wiki = wiki
162
+
163
+ }
@@ -29,9 +29,7 @@ hexo.extend.helper.register('popular_posts_wrapper', function(args){
29
29
  function listItem(obj){
30
30
  var el = '';
31
31
  el += '<a class="item" href="' + obj.path + '" title="' + obj.title + '">';
32
- var p = posts.filter(function(p) {
33
- return root + p.path == obj.path;
34
- });
32
+ var p = posts.filter(p => root + p.path == obj.path)
35
33
  if (p && p.length > 0) {
36
34
  p = p.data[0];
37
35
  }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * utils v1 | https://github.com/xaoxuu/hexo-theme-stellar/
3
+ */
4
+
5
+ 'use strict';
6
+
7
+ hexo.extend.helper.register('get_page', function(id) {
8
+ const pages = hexo.locals.get('pages');
9
+ let page = pages.data.find(element => element._id == id)
10
+ if (page && page._id == id) {
11
+ return page
12
+ } else {
13
+ const posts = hexo.locals.get('posts');
14
+ let post = posts.data.find(element => element._id == id)
15
+ if (post && post._id == id) {
16
+ return post
17
+ }
18
+ }
19
+ return null
20
+ });
@@ -19,15 +19,13 @@ hexo.extend.tag.register('folders', function(args, content) {
19
19
  el += ' ' + hexo.args.joinTags(args, ['color']).join(' ');
20
20
  el += '>';
21
21
 
22
- var arr = content.split(/<!--\s*(.*?)\s*-->/g).filter((item, i) => {
23
- return item.trim().length > 0;
24
- });
22
+ var arr = content.split(/<!--\s*folder (.*?)\s*-->/g).filter(item => item.trim().length > 0)
25
23
  if (arr.length > 0) {
26
24
  var nodes = [];
27
25
  arr.forEach((item, i) => {
28
- if (item.startsWith('folder ')) {
26
+ if (i % 2 == 0) {
29
27
  nodes.push({
30
- header: item.substring(7)
28
+ header: item
31
29
  });
32
30
  } else if (nodes.length > 0) {
33
31
  var node = nodes[nodes.length-1];
@@ -44,7 +42,7 @@ hexo.extend.tag.register('folders', function(args, content) {
44
42
  el += '<summary><span>' + (node.header || '') + '</span></summary>';
45
43
  // content
46
44
  el += '<div class="body">';
47
- el += hexo.render.renderSync({text: node.body, engine: 'markdown'}).split('\n').join('');
45
+ el += hexo.render.renderSync({text: (node.body || ''), engine: 'markdown'}).split('\n').join('');
48
46
  el += '</div></details>';
49
47
  });
50
48
  }
@@ -6,17 +6,15 @@
6
6
 
7
7
  var tab_index = 0;
8
8
 
9
- module.exports = ctx => function(args, content) {
9
+ module.exports = ctx => function(args, content = '') {
10
10
  var el = '';
11
- var arr = content.split(/<!--\s*(.*?)\s*-->/g).filter((item, i) => {
12
- return item.trim().length > 0;
13
- });
11
+ var arr = content.split(/<!--\s*tab (.*?)\s*-->/g).filter(item => item.trim().length > 0)
14
12
  if (arr.length < 1) {
15
13
  return el;
16
14
  }
17
15
  var tabs = [];
18
16
  arr.forEach((item, i) => {
19
- if (item.startsWith('tab ')) {
17
+ if (i % 2 == 0) {
20
18
  tabs.push({
21
19
  header: item
22
20
  });
@@ -37,14 +35,12 @@ module.exports = ctx => function(args, content) {
37
35
  let tabId = 0;
38
36
  let tabNav = '';
39
37
  let tabContent = '';
40
-
41
38
  tabs.forEach((tab, i) => {
42
- let caption = tab.header.substring(4);
43
- let content = ctx.render.renderSync({ text: tab.body, engine: 'markdown' }).trim();
39
+ let content = ctx.render.renderSync({ text: (tab.body || ''), engine: 'markdown' }).trim();
44
40
  const abbr = tabName + ' ' + ++tabId;
45
41
  const href = abbr.toLowerCase().split(' ').join('-');
46
42
  const isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : '';
47
- tabNav += `<li class="tab${isActive}"><a href="#${href}">${caption || abbr}</a></li>`;
43
+ tabNav += `<li class="tab${isActive}"><a href="#${href}">${tab.header || abbr}</a></li>`;
48
44
  tabContent += `<div class="tab-pane${isActive}" id="${href}">${content}</div>`;
49
45
  });
50
46
 
@@ -3,9 +3,9 @@
3
3
  * 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来)
4
4
  *
5
5
  * {% split [style:block/card] %}
6
- * <!-- cell -->
6
+ * <!-- cell left -->
7
7
  * left body
8
- * <!-- cell -->
8
+ * <!-- cell right -->
9
9
  * right body
10
10
  * {% endsplit %}
11
11
  */
@@ -19,15 +19,13 @@ hexo.extend.tag.register('split', function(args, content) {
19
19
  el += ' ' + hexo.args.joinTags(args, ['bg']).join(' ');
20
20
  el += '>';
21
21
 
22
- var arr = content.split(/<!--\s*(.*?)\s*-->/g).filter((item, i) => {
23
- return item.trim().length > 0;
24
- });
22
+ var arr = content.split(/<!--\s*cell (.*?)\s*-->/g).filter(item => item.trim().length > 0)
25
23
  if (arr.length > 0) {
26
24
  var nodes = [];
27
25
  arr.forEach((item, i) => {
28
- if (item == 'cell') {
26
+ if (i % 2 == 0) {
29
27
  nodes.push({
30
- header: ''
28
+ header: item
31
29
  });
32
30
  } else if (nodes.length > 0) {
33
31
  var node = nodes[nodes.length-1];
@@ -40,7 +38,7 @@ hexo.extend.tag.register('split', function(args, content) {
40
38
  });
41
39
  nodes.forEach((node, i) => {
42
40
  el += '<div class="cell" index="' + (i) + '">';
43
- el += hexo.render.renderSync({text: node.body, engine: 'markdown'}).split('\n').join('');
41
+ el += hexo.render.renderSync({text: (node.body || ''), engine: 'markdown'}).split('\n').join('');
44
42
  el += '</div>';
45
43
  });
46
44
  }
@@ -49,13 +49,11 @@ function postTimeline(args, content) {
49
49
  el += '<div class="tag-plugin timeline">';
50
50
  }
51
51
 
52
- var arr = content.split(/<!--\s*(.*?)\s*-->/g).filter((item, i) => {
53
- return item.trim().length > 0;
54
- });
52
+ var arr = content.split(/<!--\s*node (.*?)\s*-->/g).filter(item => item.trim().length > 0)
55
53
  if (arr.length > 0) {
56
54
  var nodes = [];
57
55
  arr.forEach((item, i) => {
58
- if (item.startsWith('node ')) {
56
+ if (i % 2 == 0) {
59
57
  nodes.push({
60
58
  header: item
61
59
  });
@@ -70,7 +68,7 @@ function postTimeline(args, content) {
70
68
  });
71
69
  nodes.forEach((node, i) => {
72
70
  el += '<div class="timenode" index="' + (i) + '">';
73
- el += layoutNodeTitle(node.header.substring(5));
71
+ el += layoutNodeTitle(node.header);
74
72
  el += layoutNodeContent(node.body);
75
73
  el += '</div>';
76
74
  });
@@ -0,0 +1,10 @@
1
+ blockquote
2
+ display: block
3
+ margin-left: 0
4
+ margin-right: 0
5
+ padding: 0.5rem 0.75rem
6
+ background: var(--block)
7
+ $bd-left = 4px
8
+ border-left: $bd-left solid var(--text-meta)
9
+ border-radius: $bd-left $border-block $border-block $bd-left
10
+ color: var(--text-p2)
@@ -14,23 +14,21 @@
14
14
  float: right
15
15
  z-index: 10
16
16
  display: flex
17
- border-radius: $border-block 0 0 $border-block
18
- padding-right: 1rem
19
- border: 1px solid var(--block-border)
20
- border-right: 0
17
+ border-radius: 2rem
18
+ margin-right: 1rem
21
19
  overflow: hidden
22
- --blur-px: 24px
23
- --blur-bg: alpha(#eaeaea, .6)
20
+ --blur-px: 16px
21
+ --blur-bg: alpha(#fff, .4)
22
+ trans1: all
24
23
  if hexo-config('style.darkmode') == 'auto'
25
24
  @media (prefers-color-scheme: dark)
26
- --blur-bg: alpha(#555, .6)
25
+ --blur-bg: alpha(#000, .4)
27
26
  if hexo-config('style.darkmode') == 'always'
28
- --blur-bg: alpha(#555, .6)
27
+ --blur-bg: alpha(#000, .4)
29
28
 
30
29
  .sidebar-toggle.mobile
31
30
  cursor: pointer
32
- color: var(--text-p2)
33
- border-right: 1px solid transparent
31
+ color: var(--text-p0)
34
32
  background: none
35
33
  padding: 0.5rem
36
34
  line-height: 0
@@ -39,6 +37,9 @@
39
37
 
40
38
 
41
39
  .l_body.mobile.sidebar
40
+ .float-panel
41
+ box-shadow: $boxshadow-float
42
+ transform: translateY(-2px)
42
43
  .sidebar-toggle.mobile
43
44
  background: var(--card)
44
45
  color: $color-hover
@@ -25,7 +25,7 @@
25
25
  margin: 1rem 0
26
26
  border-radius: $border-card
27
27
  box-shadow: 0 2px 8px 0px rgba(0, 0, 0, 0.02)
28
- trans1 box-shadow
28
+ trans1 all
29
29
  overflow: hidden
30
30
  z-index: 0
31
31
  background: var(--card)
@@ -55,6 +55,7 @@
55
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
+ transform: translateY(-1px)
58
59
  img
59
60
  transform: scale(1.02)
60
61
  filter: brightness(80%)
@@ -5,8 +5,10 @@
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(1 * %s)" % var(--gap-l)
8
+ padding-top: "calc(2 * %s)" % var(--gap-l)
9
+ @media screen and (max-width: $device-mobile-max)
10
+ padding-top: 1rem
9
11
  header
10
- margin: 4rem 1rem 2rem
12
+ margin: 2rem 1rem 1rem
11
13
  .logo-wrap
12
14
  margin: 0
@@ -1,6 +1,9 @@
1
1
  article.md
2
2
  max-width: 100%
3
- padding: 1rem
3
+ padding: 0 1rem
4
+ margin-top: 1rem
5
+ &:first-child
6
+ margin-top: 0
4
7
  color: var(--text-p1)
5
8
  line-height: 1.7
6
9
  word-break: break-word
@@ -33,7 +36,7 @@ article.md.content
33
36
  align-self: center
34
37
  border-bottom-style: dashed
35
38
  border-bottom-color: $color-accent
36
- >:first-child
39
+ >:first-child:not(h1)
37
40
  margin-top: 0
38
41
  h1:not(:first-child)
39
42
  margin-top: 2em
@@ -50,7 +53,7 @@ article.md.content
50
53
 
51
54
 
52
55
 
53
- .md
56
+ article.md
54
57
  ul:not(:last-child),
55
58
  ol:not(:last-child)
56
59
  padding-bottom: .5rem
@@ -112,16 +115,6 @@ article.md
112
115
  // div
113
116
  article.md>div
114
117
  margin: var(--gap-p) 0
115
- // blockquote
116
- article.md blockquote
117
- margin-left: 0
118
- margin-right: 0
119
- padding: 1rem
120
- background: var(--card)
121
- border-left: 6px solid $color-theme
122
- border-radius: $border-block
123
- color: var(--text-p2)
124
- box-shadow: $boxshadow-card
125
118
 
126
119
 
127
120
  article.md img
@@ -1,6 +1,6 @@
1
1
  // 面包屑导航
2
2
  .bread-nav
3
- padding: 1rem 1rem 0
3
+ padding: 0.25rem 1rem 0
4
4
  color: var(--text-p3)
5
5
  font-weight: 500
6
6
  div#breadcrumb
@@ -1,7 +1,7 @@
1
1
  .nav-wrap
2
2
  position: sticky
3
3
  position: -webkit-sticky
4
- margin-top: .75rem
4
+ margin-top: -0.5rem
5
5
  top: -2px
6
6
  background: var(--site-bg)
7
7
  padding: 0 1rem
@@ -57,3 +57,10 @@ nav.cap
57
57
  @media screen and (max-width: $device-mobile-max)
58
58
  .nav-wrap
59
59
  margin-top: 0
60
+ padding-left: 0
61
+ padding-right: 0
62
+ nav
63
+ a:first-child
64
+ margin-left: 1rem
65
+ a:last-child
66
+ margin-right: 1rem
@@ -14,14 +14,13 @@
14
14
 
15
15
  a.more
16
16
  padding: 0.25rem 0.5rem
17
-
18
17
  border-radius: $border-block
19
18
  color: var(--text-p1)
20
19
 
21
20
 
22
21
 
23
22
  .related-posts
24
- width: 100%
23
+ max-width: 100%
25
24
  margin: 1rem 0
26
25
  .item
27
26
  line-height: 1.2
@@ -6,6 +6,7 @@
6
6
  height: "calc(100vh - 1 * %s)" % var(--gap-l)
7
7
  .header
8
8
  margin: var(--gap-l) var(--gap-l) 0
9
+ margin-top: "calc(2 * %s)" % var(--gap-l)
9
10
  @media screen and (min-width: $device-mobile-max)
10
11
  >.widgets:first-child>.widget-wrap:first-child
11
12
  margin-top: "calc(2 * %s)" % var(--gap-l)
@@ -23,7 +24,6 @@
23
24
 
24
25
 
25
26
  .logo-wrap
26
- margin: 1rem 0
27
27
  display: flex
28
28
  align-items: center
29
29
  overflow: hidden
@@ -100,12 +100,12 @@
100
100
  opacity: 1 !important
101
101
 
102
102
 
103
- .logo-wrap.wiki
104
- margin: 1rem 0 1.5rem 0
103
+ .l_left .widgets .widget-wrap.logo-wrap.wiki
104
+ margin-bottom: 1.5rem
105
105
  flex-direction: column
106
106
  align-items: flex-start
107
107
  a.wiki-home
108
- margin-bottom: 1rem
108
+ margin-bottom: 0.5rem
109
109
  color: var(--text-p1)
110
110
  svg
111
111
  margin-right: 2px
@@ -1,5 +1,5 @@
1
1
  .widget-wrap#toc
2
- .widget-body+.widget-header
2
+ .widget-header
3
3
  margin-top: 1rem
4
4
 
5
5
  .widget-wrap.multi#toc .widget-header
@@ -9,8 +9,10 @@
9
9
  z-index: 1
10
10
  line-height: 1.2
11
11
  .widget-wrap
12
- margin: 1rem var(--gap-l) 3rem var(--gap-l)
12
+ margin: 1rem 0 2rem
13
13
  .widget-header
14
+ padding-left: var(--gap-l)
15
+ padding-right: var(--gap-l)
14
16
  display: flex
15
17
  justify-content: space-between
16
18
  align-items: center
@@ -40,7 +42,7 @@
40
42
  fill: $color-hover
41
43
 
42
44
  .widget-body
43
- margin: 0.5rem 0
45
+ margin: 0.5rem var(--gap-l)
44
46
  color: var(--text-p1)
45
47
  p
46
48
  margin-top: .5em
@@ -48,7 +50,8 @@
48
50
  line-height: 1.5
49
51
  .widget-header+.widget-body
50
52
  margin-top: 0
51
-
53
+ .widget-wrap+.widget-wrap .widget-header
54
+ margin-top: 3rem
52
55
 
53
56
 
54
57
  .l_left .widgets