解决top按钮生成多个问题
This commit is contained in:
parent
816c5dcd40
commit
9fe33ed376
@ -1,6 +1,6 @@
|
||||
<% if (pagination == 2){
|
||||
page.posts.each(function(post){ %>
|
||||
<%- partial('article', {post: post, index: true}) %>
|
||||
page.posts.each(function(post, postIndex){ %>
|
||||
<%- partial('article', {post, param: {index: true, postIndex}}) %>
|
||||
<% })
|
||||
} else {
|
||||
var last;
|
||||
|
||||
@ -1,16 +1,19 @@
|
||||
<article class="article article-type-<%= post.layout %> <%if(index){%> article-index<%}%>" itemscope itemprop="blogPost">
|
||||
<% if (param.postIndex === 0 || !param.index){ %>
|
||||
<%- partial('_partial/aside') %>
|
||||
<% } %>
|
||||
<article class="article article-type-<%= post.layout %> <%if(param.index){%> article-index<%}%>" itemscope itemprop="blogPost">
|
||||
<div class="article-inner">
|
||||
<% if (post.link || post.title){ %>
|
||||
<header class="article-header">
|
||||
<%- partial('post/title', {class_name: 'article-title'}) %>
|
||||
<% if (!post.noDate){ %>
|
||||
<%- partial('post/date', {class_name: 'archive-article-date',
|
||||
date_format: config.date_format+(post.excerpt && index ? '':' '+config.time_format)}) %>
|
||||
date_format: config.date_format+(post.excerpt && param.index ? '':' '+config.time_format)}) %>
|
||||
<% } %>
|
||||
</header>
|
||||
<% } %>
|
||||
<div class="article-entry" itemprop="articleBody">
|
||||
<% if (post.excerpt && index){ %>
|
||||
<% if (post.excerpt && param.index){ %>
|
||||
<%- post.excerpt %>
|
||||
<% } else { %>
|
||||
<% if (!page.pageid){ %>
|
||||
@ -29,7 +32,7 @@
|
||||
<% } %>
|
||||
<%- post.content %>
|
||||
<% } %>
|
||||
<% if ((theme.reward_type === 2 || (theme.reward_type === 1 && post.reward)) && !index){ %>
|
||||
<% if ((theme.reward_type === 2 || (theme.reward_type === 1 && post.reward)) && !param.index){ %>
|
||||
<div class="page-reward">
|
||||
<a href="javascript:;" class="page-reward-btn tooltip-top">
|
||||
<div class="tooltip tooltip-east">
|
||||
@ -71,24 +74,23 @@
|
||||
<% } %>
|
||||
<%- partial('post/tag') %>
|
||||
<%- partial('post/category') %>
|
||||
<% if (index){ %>
|
||||
<% if (param.index){ %>
|
||||
<p class="article-more-link">
|
||||
<a class="article-more-a" href="<%- url_for(post.path) %>"><%= __('show_full_text') %> >></a>
|
||||
</p>
|
||||
<% } %>
|
||||
<% if (!index && theme.share_jia){ %>
|
||||
<% if (!param.index && theme.share_jia){ %>
|
||||
<%- partial('post/share') %>
|
||||
<% } %>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<% if (!index){ %>
|
||||
<% if (!param.index){ %>
|
||||
<%- partial('post/nav') %>
|
||||
<% } %>
|
||||
<%- partial('_partial/aside') %>
|
||||
|
||||
<% if (!index && post.comments){ %>
|
||||
<% if (!param.index && post.comments){ %>
|
||||
<% if (theme.changyan_appid && theme.changyan_conf){ %>
|
||||
<%- partial('post/changyan', {
|
||||
key: post.slug,
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<a class="<%= class_name %>" href="<%- url_for(post.link) %>" target="_blank" itemprop="url"><%= post.title %></a>
|
||||
</h1>
|
||||
<% } else if (post.title){ %>
|
||||
<% if (index){ %>
|
||||
<% if (param.index){ %>
|
||||
<h1 itemprop="name">
|
||||
<a class="<%= class_name %>" href="<%- url_for(post.path) %>"><%= post.title %></a>
|
||||
</h1>
|
||||
|
||||
@ -1 +1 @@
|
||||
<%- partial('_partial/archive', {pagination: config.archive, index: true}) %>
|
||||
<%- partial('_partial/archive', {pagination: config.archive, param:{index: true}}) %>
|
||||
@ -1 +1 @@
|
||||
<%- partial('_partial/archive', {pagination: config.category, index: true}) %>
|
||||
<%- partial('_partial/archive', {pagination: config.category, param:{index: true}}) %>
|
||||
@ -1 +1 @@
|
||||
<%- partial('_partial/article', {post: page, index: false}) %>
|
||||
<%- partial('_partial/article', {post: page, param:{index: false}}) %>
|
||||
@ -1 +1 @@
|
||||
<%- partial('_partial/article', {post: page, index: false}) %>
|
||||
<%- partial('_partial/article', {post: page, param:{index: false}}) %>
|
||||
@ -1 +1 @@
|
||||
<%- partial('_partial/archive', {pagination: config.tag, index: true}) %>
|
||||
<%- partial('_partial/archive', {pagination: config.tag, param:{index: true}}) %>
|
||||
@ -18,7 +18,9 @@ function init() {
|
||||
|
||||
// 避免由于动画带来的fix元素定位失效, 移到动画元素外层
|
||||
var sideOpt = document.querySelector('.wrap-side-operation')
|
||||
document.getElementById('container').appendChild(sideOpt)
|
||||
if(sideOpt) {
|
||||
document.getElementById('container').appendChild(sideOpt)
|
||||
}
|
||||
}
|
||||
|
||||
export default { init }
|
||||
Loading…
x
Reference in New Issue
Block a user