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.

63 lines
2.1 KiB

5 years ago
<% if(is_home() || is_category() || is_archive() || is_tag() || page.index) {
6 years ago
var isPostList = true;
} else {
var isPostList = false;
5 years ago
}
5 years ago
var topMetas = (theme.meta && theme.meta.header) || [];
if (post.meta && (post.meta.header !== undefined && post.meta.header !== null)) {
if (post.meta.header.length) {
topMetas = post.meta.header;
} else {
topMetas = [];
}
}
var bottomMetas = (theme.meta && theme.meta.footer) || [];
if (post.meta && (post.meta.footer !== undefined && post.meta.footer !== null)) {
if (post.meta.footer.length) {
bottomMetas = post.meta.footer;
} else {
bottomMetas = [];
}
}
%>
6 years ago
5 years ago
<% if (position == 'header') { %>
<section class='meta'>
<% if (post.music && post.music.enable != false) { %>
<%- partial('../_third-party/aplayer',
{aplayer_theme: '', aplayer_mini: true, aplayer_mode: 'circulation',
aplayer_server: post.music.server, aplayer_type: post.music.type, aplayer_id: post.music.id,
aplayer_volume: post.music.volume?post.music.volume:'0.7', aplayer_autoplay: post.music.autoplay?true:false }) %>
<% } %>
<% if(post.thumbnail && post.thumbnail.length){ %>
<a title='<%- post.title %>' href='<%- url_for(post.path) %>'><img class='thumbnail' src='<%- post.thumbnail %>'></a>
<% } %>
<div class="meta" id="header-meta">
<% if((topMetas).indexOf('title') > -1){ %>
<%- partial('../_meta/' + 'title', {post: post, isPostList: isPostList}) %>
6 years ago
<% } %>
5 years ago
<div class='new-meta-box'>
<% (topMetas).forEach(function(meta){ %>
<% if(meta != 'title'){ %>
<%- partial('../_meta/' + meta, {post: post, isPostList: isPostList}) %>
<% } %>
<% }) %>
</div>
<% if ((topMetas).length > 0){ %>
<hr>
5 years ago
<% } %>
5 years ago
</div>
</section>
<% } else if (position == 'footer') { %>
<section class='meta' id="footer-meta">
<hr>
<div class='new-meta-box'>
<% (bottomMetas).forEach(function(meta){ %>
<% if(meta != 'title'){ %>
<%- partial('../_meta/' + meta, {post: post, isPostList: isPostList}) %>
5 years ago
<% } %>
5 years ago
<% }) %>
5 years ago
</div>
5 years ago
</section>
<% } %>