64 lines
1.4 KiB
JavaScript
64 lines
1.4 KiB
JavaScript
<% if (!index && post.comments){ %>
|
|
<!-- minivaline评论 -->
|
|
<div id="mvcomments-box">
|
|
<div id="mvcomments"></div>
|
|
</div>
|
|
<script src="https://cdn.jsdelivr.net/npm/minivaline@6"></script>
|
|
<script>
|
|
new MiniValine(Object.assign(<%- JSON.stringify(theme.minivaline) %>, {
|
|
el: '#mvcomments',
|
|
}));
|
|
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>
|
|
#mvcomments-box {
|
|
padding: 5px 30px;
|
|
}
|
|
@media screen and (max-width: 800px) {
|
|
#mvcomments-box {
|
|
padding: 5px 0px;
|
|
}
|
|
}
|
|
:root .darkmode {
|
|
--ohhho-color-p: #bbb;
|
|
--ohhho-color-text: #fff;
|
|
--ohhho-color-card: #252d38;
|
|
--ohhho-color-block: rgba(68, 68, 68, 0.65);
|
|
}
|
|
.darkmode
|
|
.ohhho
|
|
.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
|
|
.ohhho
|
|
.vlist
|
|
.vcard
|
|
.vcomment-body
|
|
.text-wrapper
|
|
.vcomment.expand:after {
|
|
background: rgba(0, 0, 0, 0.9);
|
|
}
|
|
.darkmode .ohhho pre {
|
|
background: #888;
|
|
border: 1px solid var(--ohhho-color-block);
|
|
}
|
|
.darkmode .ohhho .vlist .vcard .vcomment-body .vhead {
|
|
filter: brightness(85%);
|
|
}
|
|
</style>
|
|
<% } %>
|