hexo-theme-shokax 0.2.7 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
package/.gitattribute ADDED
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
package/CONTRIBUTING.md CHANGED
@@ -14,14 +14,10 @@
14
14
  1. 您同意我们在未来进行授权许可更改时包含您所贡献的代码
15
15
  2. 您有对于 shokaX 所使用的相关技术和 github PR 及 actions 的基础了解
16
16
 
17
- 对于代码修改的说明:
18
- 1. `page js` 仅需要修改ts文件,`hexo script` 请修改js文件
19
-
20
17
  有关提交的说明:
21
18
  1. 您在提交时的`commit message`应描述其改动
22
19
  2. 如果您提交的代码中包括图片资源,建议使用`webp`或`avif`格式
23
- 3. 由于 Copilot 所生成的代码可能存在版权问题,如果您使用了 Copilot,请在 PR 正文中说明
24
- 4. 条件允许的情况下代码应当附有注释以便维护
20
+ 3. 条件允许的情况下代码应当附有注释以便维护
25
21
 
26
22
  有关审查(Review)的说明:
27
23
  1. 您在 PR 时应打开允许维护者修改 PR,以便我们进行修改
package/README.md CHANGED
@@ -7,11 +7,11 @@
7
7
  ![version](https://shields.io/npm/v/hexo-theme-shokax)
8
8
  ![build](https://img.shields.io/github/actions/workflow/status/theme-shoka-x/hexo-theme-shokaX/build-theme.yml)
9
9
 
10
- 语言(language): 简体中文 | [English](./README_en.md) \
10
+ 语言(language): 简体中文 | [English](./README_en.MD) \
11
11
  此项目是shoka的一个二次开发版(算精神续作),致力于提高性能和优化魔改体验 \
12
- 诞生原因是目前shoka已经两年没有更新了,积压了大量BUG和功能请求。\
12
+ 诞生原因是目前shoka已经两年没有更新了,积压了大量BUG和功能请求。
13
13
 
14
- shokaX的社区资源导航和插件仓库为[awesome-shokaX](https://github.com/zkz098/awesome-shokaX)
14
+ shokaX的社区资源导航和插件仓库为[awesome-shokaX](https://github.com/theme-shoka-x/awesome-shokaX)
15
15
 
16
16
  ## 💬 和shoka的区别
17
17
  原先shoka使用了javascript+Native+nunjucks的技术 \
@@ -75,7 +75,7 @@ GPL许可证主要目的是限制修改后的分发行为,避免未经许可
75
75
  | hexo-theme-shoka | amehime | 本项目的父主题 |
76
76
 
77
77
  ## 开发者们
78
- [![](https://contributors-img.web.app/image?repo=zkz098/hexo-theme-shokaX)](https://github.com/zkz098/hexo-theme-shokaX/graphs/contributors)
78
+ [![](https://contributors-img.web.app/image?repo=theme-shoka-x/hexo-theme-shokaX)](https://github.com/theme-shoka-x/hexo-theme-shokaX/graphs/contributors)
79
79
 
80
80
  ## 特别鸣谢
81
81
  [<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png" width="25%">](https://jb.gg/OpenSourceSupport)
package/README_en.MD CHANGED
@@ -1,4 +1,4 @@
1
- If the repository address you are visiting is zkz098/hexo-theme-shokaX, please switch to the latest address: theme-shoka-x/hexo-theme-shokaX.
1
+ If the repository address you are visiting is **zkz098/hexo-theme-shokaX**, please switch to the latest address: [theme-shoka-x/hexo-theme-shokaX](https://github.com/theme-shoka-x/hexo-theme-shokaX)
2
2
 
3
3
  # hexo-theme-shokaX
4
4
  [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fzkz098%2Fhexo-theme-shokaX.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fzkz098%2Fhexo-theme-shokaX?ref=badge_shield)
@@ -11,7 +11,7 @@ Language: [简体中文](./README.md) | English \
11
11
  This project is a secondary development version of shoka (spiritual sequel), dedicated to improving performance and optimizing modding experience.
12
12
  The reason for its birth is that shoka has not been updated for two years, with a large backlog of bugs and feature requests.
13
13
 
14
- The community resource navigation and plugin repository for shokaX is awesome-shokaX.
14
+ The community resource navigation and plugin repository for shokaX is [awesome-shokaX](https://github.com/theme-shoka-x/awesome-shokaX)
15
15
 
16
16
  ## 💬 Differences with shoka
17
17
  The original shoka used javascript+Native+nunjucks technology, while shokaX uses typescript+Vue 3+Pug technology and has changed a lot of hard-to-access CDN links.
@@ -30,7 +30,7 @@ Remarks:
30
30
  - *: Requires implementation using Injection API.
31
31
 
32
32
  ## 🔧 How to Install?
33
- It is recommended to use [ShokaX-CLI](https://github.com/zkz098/shokaX-CLI) and execute the following command:
33
+ It is recommended to use [ShokaX-CLI](https://github.com/theme-shoka-x/shokaX-CLI) and execute the following command:
34
34
  ```bash
35
35
  npm i shokax-cli --location=global
36
36
  # hexo init initializes the environment
@@ -50,7 +50,7 @@ license: GPL 3 or later
50
50
 
51
51
  ## Contributors
52
52
 
53
- [![](https://contributors-img.web.app/image?repo=zkz098/hexo-theme-shokaX)](https://github.com/zkz098/hexo-theme-shokaX/graphs/contributors)
53
+ [![](https://contributors-img.web.app/image?repo=theme-shoka-x/hexo-theme-shokaX)](https://github.com/theme-shoka-x/hexo-theme-shokaX/graphs/contributors)
54
54
 
55
55
  ## Special thanks
56
56
  [<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.png" width="25%">](https://jb.gg/OpenSourceSupport)
package/_config.yml CHANGED
@@ -61,6 +61,7 @@ seo:
61
61
  visitor:
62
62
  clarity: false
63
63
  baiduAnalytics: false
64
+ googleAnalytics: false
64
65
 
65
66
  darkmode: false
66
67
  auto_dark: # 自动亮/暗模式
@@ -74,6 +75,13 @@ loader:
74
75
  start: true # 进入页面时显示加载动画
75
76
  switch: false # 切换页面时显示加载动画
76
77
 
78
+ # 使用polyfill.io自动处理浏览器兼容问题
79
+ polyfill:
80
+ enable: true
81
+ features:
82
+ - default
83
+ - fetch
84
+
77
85
  # 显示的动画(烟花)
78
86
  fireworks:
79
87
  enable: true
@@ -384,7 +392,6 @@ vendorsList:
384
392
  js:
385
393
  - pace
386
394
  - pjax
387
- # - fetch # polyfill已暂时禁用
388
395
  - anime
389
396
  - algolia
390
397
  - instantsearch
package/_images.yml CHANGED
@@ -1,4 +1,4 @@
1
- # 此images已失效,见https://github.com/zkz098/hexo-theme-shokaX/issues/6
1
+ # 此images已失效,见https://github.com/theme-shoka-x/hexo-theme-shokaX/issues/6
2
2
  - 6833939bly1giciryrr3rj20zk0m8nhk.jpg
3
3
  - 6833939bly1gicis081o9j20zk0m8dmr.jpg
4
4
  - 6833939bly1gicis3attqj20zk0m8k7l.jpg
@@ -34,7 +34,7 @@ div(class="status")
34
34
  if beianN && RC
35
35
  br
36
36
  a(target="_blank" href=`https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=${RC}`)
37
- img(src=theme.statics + theme.assets + '/' + theme.footer.icp.icon style="max-width: 2em;display:inline;")
37
+ img(src=theme.statics + theme.assets + '/' + theme.footer.icp.icon style="max-width: 2em;display:inline;" width="20" height="20")
38
38
  != beianN
39
39
  != shokax_inject('status')
40
40
 
@@ -108,7 +108,9 @@ html(lang=page.language?page.language:config.language, style=theme.grayMode ? 'f
108
108
  ]
109
109
  };
110
110
 
111
- script(src="https://polyfill.alicdn.com/polyfill.min.js")
111
+ if theme.polyfill.enable
112
+ script(src=`https://polyfill.io/v3/polyfill.min.js?features=${theme.polyfill.features}`)
113
+
112
114
  if theme.advVendors.enable
113
115
  each i in _list_vendor_js()
114
116
  != _adv_vendor_js(i)
@@ -117,6 +119,7 @@ html(lang=page.language?page.language:config.language, style=theme.grayMode ? 'f
117
119
  != _js('app.js')
118
120
  != partial('_partials/third-party/baidu-analytics.pug', {}, {cache: true})
119
121
  != partial('_partials/third-party/clarity.pug', {}, {cache: true})
122
+ != partial('_partials/third-party/google-analytics.pug', {}, {cache: true})
120
123
  if theme.twikoo.enable
121
124
  != _new_comments('twikoo')
122
125
  else if theme.waline.enable
@@ -1,7 +1,7 @@
1
1
  mixin navpost(item, type)
2
2
  - var postText = item.title || item.link || __('post.untitled')
3
3
  - var lastcat = item.categories.last()
4
- - var itemlink=`<span class="type">${__('post.' + type)}</span><span class="category"><i class="ic i-flag"></i>${lastcat?.name}</span><h3>${ postText }</h3>`
4
+ - var itemlink = `<span class="type">${__('post.' + type)}</span>${lastcat && lastcat.name ? `<span class="category"><i class="ic i-flag"></i>${lastcat.name}</span>` : ''}<h3>${postText}</h3>`
5
5
  != _url(item.path, itemlink, {itemprop: 'url', rel: type, 'data-background-image': _cover(item), title: postText})
6
6
 
7
7
  div(class="post-nav")
@@ -0,0 +1,10 @@
1
+ - var googleId = theme.visitor.googleAnalytics
2
+ if googleId
3
+ script(async, src=`https://www.googletagmanager.com/gtag/js?id=${ googleId }`)
4
+ script(data-pjax=true).
5
+ window.dataLayer = window.dataLayer || [];
6
+ function gtag() {
7
+ dataLayer.push(arguments);
8
+ }
9
+ gtag('js', new Date());
10
+ gtag('config', '#{googleId}');
package/package.json CHANGED
@@ -1,35 +1,33 @@
1
1
  {
2
2
  "name": "hexo-theme-shokax",
3
- "version": "0.2.7",
3
+ "version": "0.2.9",
4
4
  "description": "a hexo theme based on shoka",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/theme-shoka-x/hexo-theme-shokaX",
7
- "author": "Chou kaitaku",
7
+ "author": "zkz098",
8
8
  "license": "GPL-3.0-or-later",
9
9
  "scripts": {
10
10
  "test": "tsc",
11
11
  "build": "pnpm install && tsc"
12
12
  },
13
13
  "devDependencies": {
14
-
15
14
  "@types/fancybox": "^3.5.3",
16
15
  "@types/hexo": "^3.8.8",
17
16
  "@types/jquery": "^3.5.16",
18
17
  "@types/js-yaml": "^4.0.5",
19
18
  "@types/lozad": "^1.16.1",
20
- "@types/node": "^20.1.0",
21
- "@typescript-eslint/eslint-plugin": "^5.59.0",
22
- "@typescript-eslint/parser": "^5.59.0",
23
-
24
- "eslint": "^8.39.0",
25
- "eslint-config-standard": "^17.0.0",
19
+ "@types/node": "^20.2.3",
20
+ "@typescript-eslint/eslint-plugin": "^5.59.7",
21
+ "@typescript-eslint/parser": "^5.59.7",
22
+ "eslint": "^8.41.0",
23
+ "eslint-config-standard": "*",
26
24
  "eslint-plugin-import": "^2.27.5",
27
- "eslint-plugin-n": "^15.7.0",
25
+ "eslint-plugin-n": "^16.0.0",
28
26
  "eslint-plugin-promise": "^6.1.1",
29
- "eslint-plugin-vue": "^9.11.0",
27
+ "eslint-plugin-vue": "^9.14.0",
30
28
  "hexo-fs": "^4.1.1",
31
29
  "hexo-util": "^3.0.1",
32
- "instantsearch.js": "^4.54.1",
30
+ "instantsearch.js": "^4.56.0",
33
31
  "theme-shokax-anime": "^0.0.4",
34
32
  "theme-shokax-pjax": "^0.0.2",
35
33
  "typescript": "^5.0.4",
@@ -34,7 +34,6 @@ hexo.extend.generator.register('script', function (locals) {
34
34
  },
35
35
  loader: theme.loader,
36
36
  search: null,
37
- valine: theme.valine,
38
37
  outime: {
39
38
  enable: theme.outime.enable,
40
39
  days: theme.outime.days
@@ -91,7 +91,7 @@ hexo.extend.helper.register('_vendor_font', () => {
91
91
  const fontDisplay = '&display=swap';
92
92
  const fontSubset = '&subset=latin,latin-ext';
93
93
  const fontStyles = ':300,300italic,400,400italic,700,700italic';
94
- const fontHost = '//fonts.geekzu.org';
94
+ const fontHost = 'https://fonts.googleapis.com';
95
95
  let fontFamilies = ['global', 'logo', 'title', 'headings', 'posts', 'codes'].map(item => {
96
96
  if (config[item] && config[item].family && config[item].external) {
97
97
  return config[item].family + fontStyles;
@@ -8,6 +8,8 @@ const node_path_1 = __importDefault(require("node:path"));
8
8
  const injects_point_1 = __importDefault(require("./injects-point"));
9
9
  const defaultExtname = '.pug';
10
10
  class StylusInject {
11
+ files;
12
+ base_dir;
11
13
  constructor(base_dir) {
12
14
  this.base_dir = base_dir;
13
15
  this.files = [];
@@ -17,6 +19,8 @@ class StylusInject {
17
19
  }
18
20
  }
19
21
  class ViewInject {
22
+ base_dir;
23
+ raws;
20
24
  constructor(base_dir) {
21
25
  this.base_dir = base_dir;
22
26
  this.raws = [];
@@ -3,7 +3,6 @@
3
3
  position: relative;
4
4
 
5
5
  .nav {
6
- overflow: hidden;
7
6
  border-bottom: .0625rem solid var(--grey-1-a7);
8
7
  height: 2.6875rem;
9
8
 
@@ -148,6 +148,7 @@ input, textarea {
148
148
  }
149
149
  @font-face {
150
150
  font-family: 'ic';
151
+ font-display: swap;
151
152
  src: url('//at.alicdn.com/t/font_' + $iconfont + '.eot');
152
153
  src: url('//at.alicdn.com/t/font_' + $iconfont + '.eot?#iefix') format('embedded-opentype'),
153
154
  url('//at.alicdn.com/t/font_' + $iconfont + '.woff2') format('woff2'),
@@ -157,9 +158,9 @@ input, textarea {
157
158
  }
158
159
 
159
160
  @font-face {
160
- font-family: 'jetbrains-mono';
161
- font-display: swap;
162
- src: url("https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono@2.242/fonts/webfonts/JetBrainsMono-Regular.woff2") format("woff2");
161
+ font-family: 'jetbrains-mono';
162
+ font-display: swap;
163
+ src: url("https://cdn.jsdelivr.net/gh/JetBrains/JetBrainsMono@2.242/fonts/webfonts/JetBrainsMono-Regular.woff2") format("woff2");
163
164
  }
164
165
 
165
166
  .ic {
@@ -1,5 +1,3 @@
1
1
  @import "_variables.styl";
2
2
 
3
3
  @import "_mixins.styl";
4
-
5
- @import "_common/components/third-party/valine";
@@ -156,8 +156,6 @@ const sidebarTOC = function () {
156
156
  return sections.indexOf(entry.target);
157
157
  };
158
158
  const createIntersectionObserver = function () {
159
- if (!window.IntersectionObserver)
160
- return;
161
159
  const observer = new IntersectionObserver(function (entries, observe) {
162
160
  const index = findIndex(entries) + (diffY < 0 ? 1 : 0);
163
161
  if (activeLock === null) {
@@ -17,13 +17,8 @@ $dom.asyncify = async (selector, element = document) => {
17
17
  }
18
18
  return element.querySelector(selector);
19
19
  };
20
- $dom.asyncifyAll = async (selector, element = document) => {
21
- return element.querySelectorAll(selector);
22
- };
23
20
  $dom.asyncifyEach = (selector, callback, element) => {
24
- $dom.asyncifyAll(selector, element).then((tmp) => {
25
- tmp.forEach(callback);
26
- });
21
+ $dom.all(selector, element).forEach(callback);
27
22
  };
28
23
  Object.assign(HTMLElement.prototype, {
29
24
  createChild: function (tag, obj, positon) {
@@ -325,8 +325,6 @@ const postBeauty = function () {
325
325
  });
326
326
  const angleDown = document.querySelectorAll('.show-btn .i-angle-down');
327
327
  if (angleDown.length) {
328
- if (!window.IntersectionObserver)
329
- return;
330
328
  const io = new IntersectionObserver((entries) => {
331
329
  entries.forEach(entry => {
332
330
  if (entry.isIntersecting) {
@@ -408,20 +406,15 @@ const loadComments = function () {
408
406
  else {
409
407
  goToComment.display('');
410
408
  }
411
- if (!window.IntersectionObserver) {
409
+ const io = new IntersectionObserver(function (entries, observer) {
410
+ const entry = entries[0];
412
411
  vendorCss('valine');
413
- }
414
- else {
415
- const io = new IntersectionObserver(function (entries, observer) {
416
- const entry = entries[0];
417
- vendorCss('valine');
418
- if (entry.isIntersecting || entry.intersectionRatio > 0) {
419
- transition($dom('#comments'), 'bounceUpIn');
420
- observer.disconnect();
421
- }
422
- });
423
- io.observe(element);
424
- }
412
+ if (entry.isIntersecting || entry.intersectionRatio > 0) {
413
+ transition($dom('#comments'), 'bounceUpIn');
414
+ observer.disconnect();
415
+ }
416
+ });
417
+ io.observe(element);
425
418
  };
426
419
  const algoliaSearch = function (pjax) {
427
420
  if (CONFIG.search === null) {
@@ -563,8 +556,6 @@ const domInit = function () {
563
556
  });
564
557
  }
565
558
  const createIntersectionObserver = function () {
566
- if (!window.IntersectionObserver)
567
- return;
568
559
  new IntersectionObserver(([entry]) => {
569
560
  if (entry.isIntersecting) {
570
561
  document.querySelectorAll('.parallax>use').forEach(i => {
@@ -1,548 +0,0 @@
1
- .v {
2
- &.wrap {
3
- animation: none;
4
- opacity: 0;
5
- }
6
-
7
- .lozaded {
8
- animation: none;
9
- }
10
-
11
- input,
12
- textarea {
13
- border: none;
14
- outline: none;
15
- background: transparent;
16
- font-size: $font-size-smallest;
17
- transition: all .25s ease;
18
- }
19
-
20
- a {
21
- color: var(--color-aqua);
22
-
23
- &:hover {
24
- color: var(--primary-color);
25
- }
26
- }
27
-
28
- .text-center {
29
- text-align: center;
30
- }
31
-
32
- .text-right {
33
- text-align: right;
34
- }
35
-
36
- .float-right {
37
- float: right !important;
38
- }
39
-
40
- .pd5 {
41
- padding: 5px;
42
- }
43
-
44
- .pd10 {
45
- padding: 10px;
46
- }
47
-
48
- .vemoji, .emoji, .tk-owo-emotion {
49
- max-height: 1.5rem;
50
- display: inline;
51
- vertical-align: middle;
52
- }
53
-
54
- .submitting {
55
- margin: 1em 0;
56
- }
57
-
58
- .form {
59
- shadow-box();
60
- margin-bottom: .625rem;
61
- position: relative;
62
- padding: .625rem;
63
-
64
- >.inner {
65
- .auth-section {
66
- display: flex;
67
- padding: .3em .6em;
68
- }
69
-
70
- +mobile-small() {
71
- flex-wrap: wrap;
72
- }
73
-
74
- .input {
75
- flex: 1 1 27%;
76
- width: 27%;
77
-
78
- +mobile-small() {
79
- flex: 1 1 100%;
80
- padding-right: 0;
81
- width: 100%;
82
- }
83
-
84
- input {
85
- padding: .625rem .3125rem;
86
- width: 100%;
87
- border-bottom: .0625rem dashed var(--grey-4);
88
-
89
- &:focus {
90
- border-bottom-color: var(--primary-color);
91
- }
92
- }
93
- }
94
-
95
- .textarea {
96
- padding: .3em .6em;
97
- }
98
-
99
- .veditor {
100
- width: 100%;
101
- min-height: 8.75em;
102
- font-size: $font-size-small;
103
- line-height: 1.75;
104
- resize: vertical;
105
- }
106
-
107
- .btn-group {
108
- padding: .625rem 0;
109
- display: flex;
110
-
111
- .i-markdown {
112
- font-size: $font-size-smallest;
113
- }
114
-
115
- .left {
116
- width: 30%;
117
- }
118
-
119
- .right {
120
- width: 70%;
121
- text-align: right;
122
- }
123
- }
124
-
125
- .vextra-area {
126
- margin: .4em 0 .4em .5em;
127
- }
128
-
129
-
130
- .preview-box {
131
- padding: .4375rem 1.25rem;
132
- font-size: $font-size-smaller;
133
- shadow-box();
134
- }
135
-
136
- .trigger-section {
137
- display: none;
138
- }
139
- }
140
-
141
- .smile-body {
142
-
143
- img {
144
- display: inline-block;
145
- width: auto;
146
- height: 3rem;
147
- cursor: pointer;
148
- padding: .5rem;
149
- border-radius: .25rem;
150
- transition: box-shadow .2s ease-out, background .2s ease-out;
151
- }
152
-
153
- li.active img, img:hover {
154
- background: var(--grey-2);
155
- box-shadow: 1px 1px 2px var(--grey-1), -1px -1px 2px var(--grey-4), inset 8px 8px 16px var(--grey-1), inset -8px -8px 16px var(--grey-3);
156
- }
157
-
158
- .smile-icons {
159
- border-radius: .5rem;
160
- margin: .3rem 0;
161
- min-height: 10rem;
162
- max-height: 10rem;
163
- overflow: auto;
164
- background: var(--grey-2);
165
- padding: .5rem;
166
- }
167
-
168
- .smile-bar {
169
- li {
170
- display: inline-block;
171
- margin-right: .25rem;
172
- }
173
-
174
- img {
175
- width: 2.8rem;
176
- height: 2.8rem;
177
- background: var(--grey-2);
178
- object-fit: contain;
179
- }
180
- }
181
- }
182
-
183
- .btn {
184
- cursor: pointer;
185
- display: inline-block;
186
- margin: .5rem;
187
- overflow: hidden;
188
- vertical-align: middle;
189
-
190
- &.actived .ic {
191
- color: var(--primary-color);
192
- }
193
-
194
- .ic {
195
- color: var(--grey-6);
196
- transition: all .25s ease;
197
-
198
- &:hover {
199
- color: var(--color-blue);
200
- }
201
- }
202
- }
203
-
204
- .cancel-reply {
205
- position: absolute;
206
- right: 0;
207
- top: 0;
208
- z-index: 1;
209
- }
210
-
211
- .vsubmit {
212
- font-size: $font-size-small;
213
- }
214
- }
215
-
216
- .msg {
217
- position: absolute;
218
- background: var(--grey-1-a5);
219
- width: 100%;
220
- height: 100%;
221
- left: 0;
222
- top: 0;
223
-
224
- .alert {
225
- padding: 3em 0 0 0;
226
-
227
- .text {
228
- color: var(--grey-8);
229
- padding: 15px;
230
- }
231
- }
232
-
233
- +mobile() {
234
- .alert {
235
- padding: 8em 0;
236
-
237
- .text {
238
- padding: 10px;
239
- }
240
- }
241
- }
242
- }
243
-
244
- .info {
245
- padding: .3125rem;
246
- font-weight: 600;
247
- font-size: $font-size-larger;
248
-
249
- .col {
250
- display: inline-block;
251
- padding: 0 20px;
252
- position: relative;
253
- background: transparent;
254
- z-index: 2;
255
-
256
- .count {
257
- font-size: 1.375rem;
258
- font-weight: inherit;
259
- }
260
- }
261
- }
262
-
263
-
264
-
265
- .next {
266
- .more {
267
- cursor: pointer;
268
- margin: 1em 0;
269
- }
270
- }
271
-
272
- .list {
273
- width: 100%;
274
- }
275
- .item {
276
- word-break: break-all;
277
- padding-top: 1.25em;
278
-
279
- .avatar {
280
- width: 3.125em;
281
- height: 3.125em;
282
- float: left;
283
- border-radius: 50%;
284
- margin-right: .7525em;
285
- border: .0625rem solid var(--grey-3);
286
- padding: .125em
287
- }
288
-
289
- &:hover .avatar {
290
- animation: .8s ease-out 0s 1 normal both running shake;
291
- }
292
-
293
- .main {
294
- overflow: hidden;
295
- padding-bottom: .5em;
296
- border-bottom: .0625rem dashed var(--grey-3);
297
- }
298
-
299
- .head, .meta {
300
- color: var(--grey-5);
301
- line-height: 1.8;
302
- }
303
-
304
- .name {
305
- margin-right: .875rem;
306
- }
307
-
308
- .tag, .system, .time {
309
- display: inline-block;
310
- font-size: $font-size-smallest;
311
- }
312
-
313
- +mobile-small() {
314
- .system span {
315
- display: none;
316
- }
317
- }
318
- .tag {
319
- border-radius: .125rem;
320
- color: var(--grey-1);
321
- padding: 0 .3125rem;
322
- margin-right: .5rem;
323
- background-color: var(--color-grey);
324
-
325
- $tagcolor = hexo-config('valine.tagColor');
326
-
327
- for type in $tagcolor {
328
- &.{slice(type, 0, 1)} {
329
- background-color: unquote(slice(type, 1));
330
- }
331
- }
332
- }
333
-
334
- .at {
335
- color: var(--primary-color);
336
-
337
- &:hover {
338
- color: var(--color-aqua);
339
- }
340
- }
341
-
342
- .meta {
343
- line-height: 1;
344
- .at {
345
- float: right;
346
- }
347
- }
348
-
349
- .content {
350
- margin-bottom: .75em;
351
- padding: .625em;
352
-
353
- > .inner {
354
- font-size: $font-size-small;
355
- word-wrap: break-word;
356
- word-break: break-all;
357
- line-height: 2;
358
- position: relative;
359
-
360
- &.expand {
361
- cursor: pointer;
362
- max-height: 8em;
363
-
364
- overflow: hidden;
365
-
366
- &::before {
367
- display: block;
368
- content: "";
369
- position: absolute;
370
- width: 100%;
371
- left: 0;
372
- top: 0;
373
- bottom: 3.15em;
374
- background: linear-gradient(180deg, var(--grey-1-a0), var(--grey-1));
375
- z-index: 999;
376
- }
377
-
378
- &::after {
379
- display: block;
380
- content: attr(data-expand);
381
- text-align: center;
382
- position: absolute;
383
- width: 100%;
384
- height: 3.15em;
385
- line-height: 3.15em;
386
- left: 0;
387
- bottom: 0;
388
- z-index: 999;
389
- background: var(--grey-1);
390
- }
391
- }
392
- }
393
-
394
- .form {
395
- margin-top: 1rem;
396
- }
397
- }
398
-
399
- &:last-child .main {
400
- border-bottom: none
401
- }
402
-
403
- .children {
404
- padding-left: 1em;
405
- border-left: .0625rem dashed var(--grey-3);
406
-
407
- .avatar {
408
- width: 2.225em;
409
- height: 2.225em
410
- }
411
- }
412
- }
413
-
414
- .empty {
415
- padding: 20px;
416
- text-align: center;
417
- }
418
-
419
-
420
- /************ Loading ************/
421
- .spinner {
422
- margin: 10px auto;
423
- width: 50px;
424
- height: 30px;
425
- text-align: center;
426
- font-size: 10px;
427
- }
428
-
429
- .spinner>div {
430
- background-color: var(--primary-color);
431
- height: 100%;
432
- width: 6px;
433
- margin-right: 3px;
434
- display: inline-block;
435
- animation: sk-stretchdelay 1.2s infinite ease-in-out;
436
- }
437
-
438
- .spinner .r2 {
439
- animation-delay: -1.1s;
440
- }
441
-
442
- .spinner .r3 {
443
- animation-delay: -1s;
444
- }
445
-
446
- .spinner .r4 {
447
- animation-delay: -0.9s;
448
- }
449
-
450
- .spinner .r5 {
451
- animation-delay: -0.8s;
452
- }
453
-
454
- @keyframes sk-stretchdelay {
455
-
456
- 0%,
457
- 40%,
458
- 100% {
459
- transform: scaleY(0.4);
460
- }
461
-
462
- 20% {
463
- transform: scaleY(1);
464
- }
465
- }
466
- }
467
-
468
- .hljs-comment,
469
- .hljs-quote {
470
- color: var(--grey-5);
471
- font-style: italic;
472
- }
473
-
474
- .hljs-keyword,
475
- .hljs-selector-tag,
476
- .hljs-subst,
477
- .hljs-meta {
478
- color: var(--grey-7);
479
- font-weight: bold;
480
- }
481
-
482
- .hljs-number,
483
- .hljs-literal,
484
- .hljs-variable,
485
- .hljs-template-variable,
486
- .hljs-tag .hljs-attr {
487
- color: var(--color-green);
488
- }
489
-
490
- .hljs-string,
491
- .hljs-doctag {
492
- color: var(--color-red);
493
- }
494
-
495
- .hljs-title,
496
- .hljs-section,
497
- .hljs-selector-id {
498
- color: var(--color-pink);
499
- font-weight: bold;
500
- }
501
-
502
- .hljs-subst {
503
- font-weight: normal;
504
- }
505
-
506
- .hljs-type,
507
- .hljs-class .hljs-title {
508
- color: var(--color-grey);
509
- font-weight: bold;
510
- }
511
-
512
- .hljs-tag,
513
- .hljs-name,
514
- .hljs-attribute {
515
- color: var(--color-orange);
516
- font-weight: normal;
517
- }
518
-
519
- .hljs-regexp,
520
- .hljs-link {
521
- color: var(--color-green);
522
- }
523
-
524
- .hljs-symbol,
525
- .hljs-bullet {
526
- color: var(--color-purple);
527
- }
528
-
529
- .hljs-built_in,
530
- .hljs-builtin-name {
531
- color: var(--color-aqua);
532
- }
533
-
534
- .hljs-deletion {
535
- background: #fdd;
536
- }
537
-
538
- .hljs-addition {
539
- background: #dfd;
540
- }
541
-
542
- .hljs-emphasis {
543
- font-style: italic;
544
- }
545
-
546
- .hljs-strong {
547
- font-weight: bold;
548
- }