Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5a4edd6483 | ||
|
0163b6bfe5 | ||
|
1c857a0c5f | ||
|
302c6080fd | ||
|
ec47bd254a | ||
|
1e0275d757 | ||
|
c5f8d5d058 | ||
|
38e99de4fb |
@@ -233,12 +233,10 @@ twikoo:
|
|||||||
# See: https://github.com/MiniValine/MiniValine
|
# See: https://github.com/MiniValine/MiniValine
|
||||||
minivaline:
|
minivaline:
|
||||||
enable: false
|
enable: false
|
||||||
md: true
|
|
||||||
# 更多选项 https://minivaline.js.org/docs/cn/#/Options 按照yml格式继续填写即可 (除了 [el] 选项)
|
# 更多选项 https://minivaline.js.org/docs/cn/#/Options 按照yml格式继续填写即可 (除了 [el] 选项)
|
||||||
# emoticonUrl 等列表选项 可参考 https://github.com/MiniValine/hexo-next-minivaline
|
# emoticonUrl 等列表选项 可参考 https://github.com/MiniValine/hexo-next-minivaline
|
||||||
# 下面是一个例子:
|
# 下面是一个例子:
|
||||||
backend: waline
|
serverURL: https://minivaline.your-domain.com
|
||||||
serverURL: https://waline.vercel.app
|
|
||||||
|
|
||||||
# 首页广告配置
|
# 首页广告配置
|
||||||
# 可以根据需要自行增加ad_3,ad_4...,留空则不显示,建议图片和url不要带ad等关键词,否则可能会被adblock等插件屏蔽
|
# 可以根据需要自行增加ad_3,ad_4...,留空则不显示,建议图片和url不要带ad等关键词,否则可能会被adblock等插件屏蔽
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
<div id="mvcomments-box">
|
<div id="mvcomments-box">
|
||||||
<div id="mvcomments"></div>
|
<div id="mvcomments"></div>
|
||||||
</div>
|
</div>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/minivaline@latest"></script>
|
<script src="https://cdn.jsdelivr.net/npm/minivaline@6"></script>
|
||||||
<script>
|
<script>
|
||||||
new MiniValine(Object.assign(<%- JSON.stringify(theme.minivaline) %>, {
|
new MiniValine(Object.assign(<%- JSON.stringify(theme.minivaline) %>, {
|
||||||
el: '#mvcomments',
|
el: '#mvcomments',
|
||||||
@@ -24,54 +24,24 @@
|
|||||||
padding: 5px 0px;
|
padding: 5px 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.darkmode .MiniValine *{
|
:root .darkmode {
|
||||||
color: #f1f1f1!important;
|
--ohhho-color-p: #bbb;
|
||||||
|
--ohhho-color-text: #fff;
|
||||||
|
--ohhho-color-card: #252d38;
|
||||||
|
--ohhho-color-block: rgba(68, 68, 68, 0.65);
|
||||||
|
--ohhho-expand-before-background: linear-gradient(
|
||||||
|
180deg,
|
||||||
|
rgba(246, 246, 246, 0),
|
||||||
|
rgba(0, 0, 0, 0.9)
|
||||||
|
);
|
||||||
|
--ohhho-expand-after-background: rgba(0, 0, 0, 0.9);
|
||||||
}
|
}
|
||||||
.darkmode .commentTrigger{
|
.darkmode .ohhho pre {
|
||||||
background-color: #403e3e !important;
|
background: #888;
|
||||||
|
border: 1px solid var(--ohhho-color-block);
|
||||||
}
|
}
|
||||||
.darkmode .MiniValine .vpage .more{
|
.darkmode .ohhho .vlist .vcard .vcomment-body .vhead {
|
||||||
background: #21232F
|
filter: brightness(85%);
|
||||||
}
|
|
||||||
.darkmode img{
|
|
||||||
filter: brightness(30%)
|
|
||||||
}
|
|
||||||
.darkmode .MiniValine .vlist .vcard .vcomment-body .text-wrapper .vcomment.expand:before{
|
|
||||||
background: linear-gradient(180deg, rgba(246,246,246,0), rgba(0,0,0,0.9))
|
|
||||||
}
|
|
||||||
.darkmode .MiniValine .vlist .vcard .vcomment-body .text-wrapper .vcomment.expand:after{
|
|
||||||
background: rgba(0,0,0,0.9)
|
|
||||||
}
|
|
||||||
.darkmode .MiniValine .vlist .vcard .vcomment-body .text-wrapper .vcomment pre{
|
|
||||||
background: #282c34
|
|
||||||
border: 1px solid #282c34
|
|
||||||
}
|
|
||||||
.darkmode .MiniValine .vinputs-area .textarea-wrapper textarea{
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
.darkmode .MiniValine .vinputs-area .auth-section .input-wrapper input{
|
|
||||||
color: #000;
|
|
||||||
}
|
|
||||||
.darkmode .MiniValine .vinputs-area .vextra-area .vsmile-icons{
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
.darkmode .MiniValine .vinputs-wrap{
|
|
||||||
border-color: #b2b2b5;
|
|
||||||
}
|
|
||||||
.darkmode .MiniValine .vinputs-wrap:hover{
|
|
||||||
border: 1px dashed #2196f3;
|
|
||||||
}
|
|
||||||
.darkmode .MiniValine .vinputs-area .auth-section .input-wrapper{
|
|
||||||
border-bottom: 1px dashed #b2b2b5;
|
|
||||||
}
|
|
||||||
.darkmode .MiniValine .vinputs-area .auth-section .input-wrapper:hover{
|
|
||||||
border-bottom: 1px dashed #2196f3;
|
|
||||||
}
|
|
||||||
.darkmode .MiniValine .vbtn{
|
|
||||||
background-color: transparent!important;
|
|
||||||
}
|
|
||||||
.darkmode .MiniValine .vbtn:hover{
|
|
||||||
border: 1px dashed #2196f3;
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hexo-theme-ayer",
|
"name": "hexo-theme-ayer",
|
||||||
"version": "1.8.21",
|
"version": "1.8.23",
|
||||||
"description": "a clean and elegant theme for hexo.",
|
"description": "a clean and elegant theme for hexo.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "parcel serve source-src/main.js -d source/dist",
|
"dev": "parcel serve source-src/main.js -d source/dist",
|
||||||
|
11
scripts/events/index.js
Normal file
11
scripts/events/index.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
/* global hexo */
|
||||||
|
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
hexo.on("generateBefore", () => {
|
||||||
|
require("./lib/merge-configs")(hexo);
|
||||||
|
});
|
||||||
|
|
||||||
|
hexo.on("generateAfter", () => {
|
||||||
|
require("./lib/hello")(hexo);
|
||||||
|
});
|
38
scripts/events/lib/hello.js
Normal file
38
scripts/events/lib/hello.js
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
module.exports = (hexo) => {
|
||||||
|
const isZh = hexo.theme.i18n.languages[0].search(/zh-CN/i) !== -1;
|
||||||
|
if (isZh) {
|
||||||
|
hexo.log.info(`
|
||||||
|
------------------------------------------------
|
||||||
|
| |
|
||||||
|
| __ ________ _____ |
|
||||||
|
| /\\\\ \\ / / ____| __ \\ |
|
||||||
|
| / \\\\ \\_/ /| |__ | |__) | |
|
||||||
|
| / /\\ \\\\ / | __| | _ / |
|
||||||
|
| / ____ \\| | | |____| | \\ \\ |
|
||||||
|
| /_/ \\_\\_| |______|_| \\_\\ |
|
||||||
|
| |
|
||||||
|
| 感谢使用 Ayer 主题 ! |
|
||||||
|
| 文档: https://shen-yu.gitee.io/2019/ayer/ |
|
||||||
|
| |
|
||||||
|
------------------------------------------------
|
||||||
|
`);
|
||||||
|
} else {
|
||||||
|
hexo.log.info(`
|
||||||
|
----------------------------------------------------
|
||||||
|
| |
|
||||||
|
| __ ________ _____ |
|
||||||
|
| /\\\\ \\ / / ____| __ \\ |
|
||||||
|
| / \\\\ \\_/ /| |__ | |__) | |
|
||||||
|
| / /\\ \\\\ / | __| | _ / |
|
||||||
|
| / ____ \\| | | |____| | \\ \\ |
|
||||||
|
| /_/ \\_\\_| |______|_| \\_\\ |
|
||||||
|
| |
|
||||||
|
| Thank you for using Ayer theme ! |
|
||||||
|
| Docs: https://github.com/Shen-Yu/hexo-theme-ayer |
|
||||||
|
| |
|
||||||
|
----------------------------------------------------
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
};
|
28
scripts/events/lib/merge-configs.js
Normal file
28
scripts/events/lib/merge-configs.js
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
"use strict";
|
||||||
|
|
||||||
|
const objUtil = require("../../utils/object");
|
||||||
|
const { isNotEmptyObject } = require("../../utils/object");
|
||||||
|
|
||||||
|
module.exports = (hexo) => {
|
||||||
|
const isZh = hexo.theme.i18n.languages[0].search(/zh-CN/i) !== -1;
|
||||||
|
|
||||||
|
if (isNotEmptyObject(hexo.config.theme_config)) {
|
||||||
|
hexo.theme.config = objUtil.merge(
|
||||||
|
{},
|
||||||
|
hexo.theme.config,
|
||||||
|
hexo.config.theme_config
|
||||||
|
);
|
||||||
|
if (isZh) {
|
||||||
|
hexo.log.info("[Ayer] 读取 _config.yml 中 theme_config 配置项覆盖配置");
|
||||||
|
} else {
|
||||||
|
hexo.log.info(
|
||||||
|
"[Ayer] Merge theme config from theme_config in _config.yml"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
hexo.log.debug(
|
||||||
|
"[Ayer] Output theme config:\n",
|
||||||
|
JSON.stringify(hexo.theme.config, undefined, 2)
|
||||||
|
);
|
||||||
|
};
|
12
scripts/utils/join-path.js
Normal file
12
scripts/utils/join-path.js
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const joinPath = function(base, relative) {
|
||||||
|
if (relative && /^https*:\/\//.test(relative)) {
|
||||||
|
return relative;
|
||||||
|
}
|
||||||
|
return relative
|
||||||
|
? base.replace(/\/+$/, '') + '/' + relative.replace(/^\/+/, '')
|
||||||
|
: base;
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = joinPath;
|
31
scripts/utils/object.js
Normal file
31
scripts/utils/object.js
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const isObject = (obj) => {
|
||||||
|
return obj && typeof obj === 'object' && !Array.isArray(obj);
|
||||||
|
};
|
||||||
|
|
||||||
|
const isNotEmptyObject = (obj) => {
|
||||||
|
return obj && typeof obj === 'object' && Object.getOwnPropertyNames(obj).length !== 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
const merge = (target, ...sources) => {
|
||||||
|
for (const source of sources) {
|
||||||
|
for (const key in source) {
|
||||||
|
if (!Object.prototype.hasOwnProperty.call(source, key)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (isObject(target[key]) && isObject(source[key])) {
|
||||||
|
merge(target[key], source[key]);
|
||||||
|
} else {
|
||||||
|
target[key] = source[key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return target;
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
isObject,
|
||||||
|
isNotEmptyObject,
|
||||||
|
merge
|
||||||
|
};
|
@@ -56,12 +56,14 @@
|
|||||||
color sea
|
color sea
|
||||||
|
|
||||||
.float_btns
|
.float_btns
|
||||||
position fixed
|
position sticky
|
||||||
bottom 10rem
|
bottom 10rem
|
||||||
right 50px
|
right 50px
|
||||||
z-index 9996
|
z-index 9996
|
||||||
text-align center
|
text-align center
|
||||||
transform scale(1.2)
|
transform scale(1.2)
|
||||||
|
width: 50px
|
||||||
|
float: right
|
||||||
|
|
||||||
#mask
|
#mask
|
||||||
position fixed
|
position fixed
|
||||||
|
2
source/dist/main.css
vendored
2
source/dist/main.css
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user