Merge pull request #116 from MHG-LAB/master

minivaline v6
This commit is contained in:
Eric Shen 2021-04-26 14:23:49 +08:00 committed by GitHub
commit 1e0275d757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 67 deletions

View File

@ -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_3ad_4...留空则不显示建议图片和url不要带ad等关键词否则可能会被adblock等插件屏蔽 # 可以根据需要自行增加ad_3ad_4...留空则不显示建议图片和url不要带ad等关键词否则可能会被adblock等插件屏蔽

View File

@ -3,75 +3,45 @@
<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',
})); }));
const infoEle = document.querySelector('#mvcomments .info'); const infoEle = document.querySelector('#mvcomments .info');
if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) { if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
infoEle.childNodes.forEach(function (item) { infoEle.childNodes.forEach(function (item) {
item.parentNode.removeChild(item); item.parentNode.removeChild(item);
}); });
} }
</script> </script>
<style> <style>
#mvcomments-box { #mvcomments-box {
padding: 5px 30px; padding: 5px 30px;
} }
@media screen and (max-width: 800px) { @media screen and (max-width: 800px) {
#mvcomments-box { #mvcomments-box {
padding: 5px 0px; padding: 5px 0px;
} }
} }
.darkmode .MiniValine *{ :root .darkmode {
color: #f1f1f1!important; --ohhho-color-p: #bbb;
} --ohhho-color-text: #fff;
.darkmode .commentTrigger{ --ohhho-color-card: #252d38;
background-color: #403e3e !important; --ohhho-color-block: rgba(68, 68, 68, 0.65);
} --ohhho-expand-before-background: linear-gradient(
.darkmode .MiniValine .vpage .more{ 180deg,
background: #21232F rgba(246, 246, 246, 0),
} rgba(0, 0, 0, 0.9)
.darkmode img{ );
filter: brightness(30%) --ohhho-expand-after-background: rgba(0, 0, 0, 0.9);
} }
.darkmode .MiniValine .vlist .vcard .vcomment-body .text-wrapper .vcomment.expand:before{ .darkmode .ohhho pre {
background: linear-gradient(180deg, rgba(246,246,246,0), rgba(0,0,0,0.9)) background: #888;
} border: 1px solid var(--ohhho-color-block);
.darkmode .MiniValine .vlist .vcard .vcomment-body .text-wrapper .vcomment.expand:after{ }
background: rgba(0,0,0,0.9) .darkmode .ohhho .vlist .vcard .vcomment-body .vhead {
} filter: brightness(85%);
.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>
<% } %> <% } %>