Merge branch 'master' into master
This commit is contained in:
commit
f6559e2da2
@ -1,88 +1,56 @@
|
|||||||
<article id="<%= post.layout %>-<%= post.slug %>" class="article article-type-<%= post.layout %>" itemscope
|
<section class="outer">
|
||||||
itemprop="blogPost" data-scroll-reveal>
|
<article class="articles">
|
||||||
|
<%
|
||||||
<div class="article-inner">
|
var title = '';
|
||||||
<% if (post.link || post.title){ %>
|
if (page.category) title = page.category;
|
||||||
<header class="article-header">
|
if (page.tag) title = "#" + " " + page.tag;
|
||||||
<%- partial('post/title', {class_name: 'article-title'}) %>
|
if (page.archive) {
|
||||||
</header>
|
if (page.year) title = page.year + (page.month ? '/' + page.month : '');
|
||||||
|
else title = __('archive_a');
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<% if (pagination !== 2){ %>
|
||||||
|
<h1 class="page-type-title"><%- title %></h1>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
<% if (pagination == 2){ %>
|
||||||
<% if (index || is_post()) { %>
|
<% page.posts.each(function(post){ %>
|
||||||
<div class="article-meta">
|
<%- partial('article', {post: post, index: true}) %>
|
||||||
<%- partial('post/date', {class_name: 'article-date', date_format: null}) %>
|
<% }) %>
|
||||||
<%- partial('post/category') %>
|
</article>
|
||||||
<% if(theme.word_count && theme.word_count.enable && !post.no_word_count){%>
|
<% } else { %>
|
||||||
<%- partial('post/word') %>
|
<% var last; %>
|
||||||
<% } %>
|
<% page.posts.each(function(post, i){ %>
|
||||||
</div>
|
<% var year = post.date.year(); %>
|
||||||
<% } %>
|
<% if (last != year){ %>
|
||||||
|
<% if (last != null){ %>
|
||||||
<% if (theme.toc && is_post()){ %>
|
|
||||||
<%- partial('post/tocbot') %>
|
|
||||||
<% } %>
|
|
||||||
|
|
||||||
<% if (theme.excerpt_all&&index){ %>
|
|
||||||
<% }else{ %>
|
|
||||||
<div class="article-entry" itemprop="articleBody">
|
|
||||||
<%- partial('post/justifiedGallery') %>
|
|
||||||
<%- partial('post/gallery') %>
|
|
||||||
<% if (post.excerpt && index){ %>
|
|
||||||
<%- post.excerpt %>
|
|
||||||
<% if (theme.excerpt_link){ %>
|
|
||||||
<a class="article-more-link" href="<%- url_for(post.path) %>"><%= theme.excerpt_link %></a>
|
|
||||||
<% } %>
|
|
||||||
<% } else { %>
|
|
||||||
<%- post.content %>
|
|
||||||
<% } %>
|
|
||||||
<!-- reward -->
|
|
||||||
<% if ((theme.reward_type === 2 || (theme.reward_type === 1 && post.reward)) && !index && !post.no_reward){ %>
|
|
||||||
<div id="reward-btn">
|
|
||||||
<%= __('post.reward') %>
|
|
||||||
</div>
|
|
||||||
<% } %>
|
|
||||||
</div>
|
|
||||||
<% } %>
|
|
||||||
|
|
||||||
<!-- copyright -->
|
|
||||||
<% if (((theme.copyright_type === 2) || (theme.copyright_type === 1 && post.copyright)) && !index){ %>
|
|
||||||
<div class="declare">
|
|
||||||
<ul class="post-copyright">
|
|
||||||
<li>
|
|
||||||
<i class="ri-copyright-line"></i>
|
|
||||||
<strong><%= __('post.copyright_title') %>: </strong>
|
|
||||||
<%= __('post.copyright_content') %>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<% } %>
|
|
||||||
<footer class="article-footer">
|
|
||||||
<% if (!index && theme.share_enable){ %>
|
|
||||||
<%- partial('post/share') %>
|
|
||||||
<% } %>
|
|
||||||
<%- partial('post/tag') %>
|
|
||||||
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<% if (!index){ %>
|
<% } %>
|
||||||
<%- partial('post/nav') %>
|
<% last = year; %>
|
||||||
|
<div class="archives-wrap">
|
||||||
|
<div class="archive-year-wrap">
|
||||||
|
<a href="<%- url_for(config.archive_dir + '/' + year) %>" class="archive-year"><%= year %></a>
|
||||||
|
</div>
|
||||||
|
<div class="archives">
|
||||||
|
<% } %>
|
||||||
|
<%- partial('archive-post', {post: post, even: i % 2 == 0}) %>
|
||||||
|
<% }) %>
|
||||||
|
<% if (page.posts.length){ %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
<% if (theme.valine && theme.valine.enable && !post.no_valine){ %>
|
<% if (page.total > 1){ %>
|
||||||
<%- partial('post/valine', {
|
<nav class="page-nav">
|
||||||
key: post.slug,
|
<%
|
||||||
title: post.title,
|
var prev_text = theme.nav_text.page_prev;
|
||||||
url: config.url+url_for(post.path)
|
var next_text = theme.nav_text.page_next
|
||||||
}) %>
|
%>
|
||||||
|
<%- paginator({
|
||||||
|
prev_text: prev_text,
|
||||||
|
next_text: next_text
|
||||||
|
}) %>
|
||||||
|
</nav>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
</section>
|
||||||
<% if (is_post()) { %>
|
|
||||||
<%- partial('post/gitalk') %>
|
|
||||||
<% } %>
|
|
||||||
|
|
||||||
<% if (theme.minivaline && theme.minivaline.enable && !post.no_minivaline) { %>
|
|
||||||
<%- partial('post/minivaline') %>
|
|
||||||
<% } %>
|
|
||||||
</article>
|
|
@ -7,9 +7,9 @@
|
|||||||
<script src='https://unpkg.com/minivaline/dist/MiniValine.min.js'></script>
|
<script src='https://unpkg.com/minivaline/dist/MiniValine.min.js'></script>
|
||||||
<script>
|
<script>
|
||||||
new MiniValine({
|
new MiniValine({
|
||||||
el: '#vcomments',
|
el: '#vcomments',
|
||||||
appId: '<%- theme.leancloud.app_id %>',
|
appId: '<%- theme.leancloud.app_id %>',
|
||||||
appKey: '<%- theme.leancloud.app_key %>',
|
appKey: '<%- theme.leancloud.app_key %>',
|
||||||
mode: '<%- theme.minivaline.mode %>',
|
mode: '<%- theme.minivaline.mode %>',
|
||||||
placeholder: '<%- theme.minivaline.placeholder %>',
|
placeholder: '<%- theme.minivaline.placeholder %>',
|
||||||
pathname: window.location.pathname,
|
pathname: window.location.pathname,
|
||||||
|
@ -1,51 +1,48 @@
|
|||||||
<% if (!index && theme.leancloud && theme.leancloud.enable){ %>
|
<% if (!index && theme.leancloud && theme.leancloud.enable){ %>
|
||||||
<!-- valine评论 -->
|
<!-- valine评论 -->
|
||||||
<div id="vcomments-box">
|
<div id="vcomments-box">
|
||||||
<div id="vcomments">
|
<div id="vcomments"></div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
|
<script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
|
||||||
<script src='https://cdn.jsdelivr.net/npm/valine@1.3.10/dist/Valine.min.js'></script>
|
<script src="https://cdn.jsdelivr.net/npm/valine@1.4.14/dist/Valine.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
new Valine({
|
new Valine({
|
||||||
el: '#vcomments',
|
el: "#vcomments",
|
||||||
app_id: '<%- theme.leancloud.app_id %>',
|
app_id: "<%- theme.leancloud.app_id %>",
|
||||||
app_key: '<%- theme.leancloud.app_key %>',
|
app_key: "<%- theme.leancloud.app_key %>",
|
||||||
path: window.location.pathname,
|
path: window.location.pathname,
|
||||||
notify: <%- theme.valine.notify %>,
|
avatar: "<%- theme.valine.avatar %>",
|
||||||
verify: <%- theme.valine.verify %>,
|
placeholder: "<%- theme.valine.placeholder %>",
|
||||||
avatar: '<%- theme.valine.avatar %>',
|
recordIP: true,
|
||||||
placeholder: '<%- theme.valine.placeholder %>',
|
});
|
||||||
recordIP: true
|
const infoEle = document.querySelector("#vcomments .info");
|
||||||
|
if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
|
||||||
|
infoEle.childNodes.forEach(function (item) {
|
||||||
|
item.parentNode.removeChild(item);
|
||||||
});
|
});
|
||||||
const infoEle = document.querySelector('#vcomments .info');
|
}
|
||||||
if (infoEle && infoEle.childNodes && infoEle.childNodes.length > 0) {
|
|
||||||
infoEle.childNodes.forEach(function (item) {
|
|
||||||
item.parentNode.removeChild(item);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
|
#vcomments-box {
|
||||||
|
padding: 5px 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 800px) {
|
||||||
#vcomments-box {
|
#vcomments-box {
|
||||||
padding: 5px 30px;
|
padding: 5px 0px;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 800px) {
|
#vcomments-box #vcomments {
|
||||||
#vcomments-box {
|
background-color: #fff;
|
||||||
padding: 5px 0px;
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#vcomments-box #vcomments {
|
.v .vlist .vcard .vh {
|
||||||
background-color: #fff;
|
padding-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.v .vlist .vcard .vh {
|
.v .vlist .vcard {
|
||||||
padding-right: 20px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.v .vlist .vcard {
|
|
||||||
padding-left: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
Loading…
Reference in New Issue
Block a user