hexo-theme-ayer/layout/_partial/post/minivaline.ejs

78 lines
2.1 KiB
JavaScript
Raw Normal View History

2020-12-25 06:56:42 +00:00
<% if (!index && post.comments){ %>
2020-06-07 02:05:53 +00:00
<!-- minivaline评论 -->
<div id="mvcomments-box">
<div id="mvcomments"></div>
</div>
2020-12-25 06:56:42 +00:00
<script src="https://cdn.jsdelivr.net/npm/minivaline@latest"></script>
2020-06-07 02:05:53 +00:00
<script>
2020-12-25 02:04:38 +00:00
new MiniValine(Object.assign(<%- JSON.stringify(theme.minivaline) %>, {
el: '#mvcomments',
}));
2020-06-07 02:05:53 +00:00
const infoEle = document.querySelector('#mvcomments .info');
if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
infoEle.childNodes.forEach(function (item) {
item.parentNode.removeChild(item);
});
}
</script>
<style>
2020-06-07 08:49:52 +00:00
#mvcomments-box {
2020-12-25 06:56:42 +00:00
padding: 5px 30px;
2020-06-07 08:49:52 +00:00
}
@media screen and (max-width: 800px) {
2020-12-25 06:56:42 +00:00
#mvcomments-box {
padding: 5px 0px;
}
2020-06-07 08:49:52 +00:00
}
2020-12-25 06:56:42 +00:00
.darkmode .MiniValine *{
color: #f1f1f1!important;
2020-06-07 08:49:52 +00:00
}
.darkmode .commentTrigger{
background-color: #403e3e !important;
}
.darkmode .MiniValine .vpage .more{
background: #21232F
}
.darkmode img{
2020-12-25 06:56:42 +00:00
filter: brightness(30%)
2020-06-07 08:49:52 +00:00
}
.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;
}
2020-12-25 06:56:42 +00:00
.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;
}
2020-06-07 02:05:53 +00:00
</style>
<% } %>