You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
300 lines
7.1 KiB
300 lines
7.1 KiB
<style>
|
|
.valine-card {
|
|
margin: 1.5rem auto;
|
|
}
|
|
|
|
.valine-card .card-content {
|
|
padding: 20px 20px 5px 20px;
|
|
}
|
|
|
|
#vcomments textarea {
|
|
box-sizing: border-box;
|
|
background: url("<%- url_for(theme.valine.background) %>") 100% 100% no-repeat;
|
|
}
|
|
|
|
#vcomments p {
|
|
margin: 2px 2px 10px;
|
|
font-size: 1.05rem;
|
|
line-height: 1.78rem;
|
|
}
|
|
|
|
#vcomments blockquote p {
|
|
text-indent: 0.2rem;
|
|
}
|
|
|
|
#vcomments a {
|
|
padding: 0 2px;
|
|
color: #4cbf30;
|
|
font-weight: 500;
|
|
text-decoration: none;
|
|
}
|
|
|
|
#vcomments img {
|
|
max-width: 100%;
|
|
height: auto;
|
|
cursor: pointer;
|
|
}
|
|
|
|
#vcomments ol li {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
#vcomments ol,
|
|
ul {
|
|
display: block;
|
|
padding-left: 2em;
|
|
word-spacing: 0.05rem;
|
|
}
|
|
|
|
#vcomments ul li,
|
|
ol li {
|
|
display: list-item;
|
|
line-height: 1.8rem;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
#vcomments ul li {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
#vcomments ul ul li {
|
|
list-style-type: circle;
|
|
}
|
|
|
|
#vcomments table, th, td {
|
|
padding: 12px 13px;
|
|
border: 1px solid #dfe2e5;
|
|
}
|
|
|
|
#vcomments table, th, td {
|
|
border: 0;
|
|
}
|
|
|
|
table tr:nth-child(2n), thead {
|
|
background-color: #fafafa;
|
|
}
|
|
|
|
#vcomments table th {
|
|
background-color: #f2f2f2;
|
|
min-width: 80px;
|
|
}
|
|
|
|
#vcomments table td {
|
|
min-width: 80px;
|
|
}
|
|
|
|
#vcomments h1 {
|
|
font-size: 1.85rem;
|
|
font-weight: bold;
|
|
line-height: 2.2rem;
|
|
}
|
|
|
|
#vcomments h2 {
|
|
font-size: 1.65rem;
|
|
font-weight: bold;
|
|
line-height: 1.9rem;
|
|
}
|
|
|
|
#vcomments h3 {
|
|
font-size: 1.45rem;
|
|
font-weight: bold;
|
|
line-height: 1.7rem;
|
|
}
|
|
|
|
#vcomments h4 {
|
|
font-size: 1.25rem;
|
|
font-weight: bold;
|
|
line-height: 1.5rem;
|
|
}
|
|
|
|
#vcomments h5 {
|
|
font-size: 1.1rem;
|
|
font-weight: bold;
|
|
line-height: 1.4rem;
|
|
}
|
|
|
|
#vcomments h6 {
|
|
font-size: 1rem;
|
|
line-height: 1.3rem;
|
|
}
|
|
|
|
#vcomments p {
|
|
font-size: 1rem;
|
|
line-height: 1.5rem;
|
|
}
|
|
|
|
#vcomments hr {
|
|
margin: 12px 0;
|
|
border: 0;
|
|
border-top: 1px solid #ccc;
|
|
}
|
|
|
|
#vcomments blockquote {
|
|
margin: 15px 0;
|
|
border-left: 5px solid #42b983;
|
|
padding: 1rem 0.8rem 0.3rem 0.8rem;
|
|
color: #666;
|
|
background-color: rgba(66, 185, 131, .1);
|
|
}
|
|
|
|
#vcomments pre {
|
|
font-family: monospace, monospace;
|
|
padding: 1.2em;
|
|
margin: .5em 0;
|
|
background: #272822;
|
|
overflow: auto;
|
|
border-radius: 0.3em;
|
|
tab-size: 4;
|
|
}
|
|
|
|
#vcomments code {
|
|
font-family: monospace, monospace;
|
|
padding: 1px 3px;
|
|
font-size: 0.92rem;
|
|
color: #e96900;
|
|
background-color: #f8f8f8;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
#vcomments pre code {
|
|
font-family: monospace, monospace;
|
|
padding: 0;
|
|
color: #e8eaf6;
|
|
background-color: #272822;
|
|
}
|
|
|
|
#vcomments pre[class*="language-"] {
|
|
padding: 1.2em;
|
|
margin: .5em 0;
|
|
}
|
|
|
|
#vcomments code[class*="language-"],
|
|
pre[class*="language-"] {
|
|
color: #e8eaf6;
|
|
}
|
|
|
|
#vcomments [type="checkbox"]:not(:checked), [type="checkbox"]:checked {
|
|
position: inherit;
|
|
margin-left: -1.3rem;
|
|
margin-right: 0.4rem;
|
|
margin-top: -1px;
|
|
vertical-align: middle;
|
|
left: unset;
|
|
visibility: visible;
|
|
}
|
|
|
|
#vcomments b,
|
|
strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
#vcomments dfn {
|
|
font-style: italic;
|
|
}
|
|
|
|
#vcomments small {
|
|
font-size: 85%;
|
|
}
|
|
|
|
#vcomments cite {
|
|
font-style: normal;
|
|
}
|
|
|
|
#vcomments mark {
|
|
background-color: #fcf8e3;
|
|
padding: .2em;
|
|
}
|
|
|
|
#vcomments table, th, td {
|
|
padding: 12px 13px;
|
|
border: 1px solid #dfe2e5;
|
|
}
|
|
|
|
table tr:nth-child(2n), thead {
|
|
background-color: #fafafa;
|
|
}
|
|
|
|
#vcomments table th {
|
|
background-color: #f2f2f2;
|
|
min-width: 80px;
|
|
}
|
|
|
|
#vcomments table td {
|
|
min-width: 80px;
|
|
}
|
|
|
|
#vcomments [type="checkbox"]:not(:checked), [type="checkbox"]:checked {
|
|
position: inherit;
|
|
margin-left: -1.3rem;
|
|
margin-right: 0.4rem;
|
|
margin-top: -1px;
|
|
vertical-align: middle;
|
|
left: unset;
|
|
visibility: visible;
|
|
}
|
|
|
|
.v[data-class="v"] .vwrap .vheader .vinput {
|
|
width: 32%;
|
|
border-bottom: 1px dashed #dedede;
|
|
}
|
|
</style>
|
|
|
|
<div class="card valine-card" data-aos="fade-up">
|
|
<div class="comment_headling" style="font-size: 20px; font-weight: 700; position: relative; padding-left: 20px; top: 15px; padding-bottom: 5px;">
|
|
<i class="fas fa-comments fa-fw" aria-hidden="true"></i>
|
|
<span>评论</span>
|
|
</div>
|
|
<div id="vcomments" class="card-content" style="display: grid">
|
|
</div>
|
|
</div>
|
|
|
|
<script src="<%- theme.jsDelivr.url %><%- url_for('/libs/valine/av-min.js') %>"></script>
|
|
<script src="<%- theme.jsDelivr.url %><%- url_for(theme.libs.js.valine) %>"></script>
|
|
<script>
|
|
let metaPlaceholder = <%- JSON.stringify(theme.valine.metaPlaceholder) %> ;
|
|
//这里要换行
|
|
new Valine({
|
|
el: '#vcomments',
|
|
appId: '<%- theme.valine.appId %>',
|
|
appKey: '<%- theme.valine.appKey %>',
|
|
notify: '<%- theme.valine.notify %>' === 'true',
|
|
verify: '<%- theme.valine.verify %>' === 'true',
|
|
visitor: '<%- theme.valine.visitor %>' === 'true',
|
|
avatar: '<%- theme.valine.avatar %>',
|
|
pageSize: '<%- theme.valine.pageSize %>',
|
|
lang: '<%- theme.valine.lang %>',
|
|
placeholder: '<%= theme.valine.placeholder %>',
|
|
meta: <%- '["' + theme.valine.guest_info.join('", "') + '"]' %>,
|
|
recordIP: '<%- theme.valine.recordIP %>' === 'true',
|
|
enableQQ: '<%- theme.valine.avatar %>',
|
|
requiredFields: <%- '["' + theme.valine.master.join('", "') + '"]' %>,
|
|
master: <%- '["' + theme.valine.master.join('", "') + '"]' %>,
|
|
friends: <%- '["' + theme.valine.friends.join('", "') + '"]' %>,
|
|
tagMeta: <%- '["' + theme.valine.tagMeta.join('", "') + '"]' %>,
|
|
metaPlaceholder: metaPlaceholder,
|
|
|
|
});
|
|
|
|
document.body.addEventListener('click', function(e) {
|
|
if (e.target.classList.contains('vsubmit')) {
|
|
const email = document.querySelector('input[type=email]');
|
|
const nick = document.querySelector('input[name=nick]');
|
|
const reg = /^[A-Za-z0-9_-\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
|
|
if (!email.value || !nick.value || !reg.test(email.value)) {
|
|
const str = `<div class="valert txt-center"><div class="vtext">请填写正确的昵称和邮箱!</div></div>`;
|
|
const vmark = document.querySelector('.vmark');
|
|
vmark.innerHTML = str;
|
|
vmark.style.display = 'block';
|
|
|
|
e.stopPropagation();
|
|
|
|
setTimeout(function() {
|
|
vmark.style.display = 'none';
|
|
vmark.innerHTML = '';
|
|
}, 2500);
|
|
}
|
|
}
|
|
}, true);
|
|
</script>
|
|
|
|
|
|
|