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.

97 lines
3.4 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
}
var hasMeta = false;
%>
6 years ago
<section class='meta'>
5 years ago
<% if(post.music && post.music.enable != false){ %>
6 years ago
<%- 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,
5 years ago
aplayer_volume: post.music.volume?post.music.volume:'0.7', aplayer_autoplay: post.music.autoplay?true:false }) %>
6 years ago
<% } %>
5 years ago
<% if(post.thumbnail && post.thumbnail.length){ %>
<a title='<%- post.title %>' href='<%- url_for(post.path) %>'><img class='thumbnail' src='<%- post.thumbnail %>'></a>
5 years ago
<% } %>
6 years ago
<div class="meta" id="header-meta">
<% if(isPostList){ %>
<h2 class="title">
<a href="<%- url_for(post.path) %>">
<% if(post.title){ %>
5 years ago
<%- post.title %>
6 years ago
<% } else if (post.date) { %>
<%= date(post.date, config.date_format) %>
<% } %>
</a>
</h2>
<% } else { %>
5 years ago
<% if(page.title && (!page.meta || page.meta.title != false)){ %>
<h1 class="title"><%- page.title %></h1>
<% hasMeta = true %>
6 years ago
<% } %>
<% } %>
5 years ago
<div class='new-meta-box'>
<% if(config.author && (!post.meta || post.meta.author != false)){ %>
<div class='new-meta-item author'>
<a href="<%- url_for(config.url) %>">
<i class="fas fa-user" aria-hidden="true"></i>
<%- config.author %>
</a>
6 years ago
</div>
5 years ago
<% } %>
<% if(post.date && (!post.meta || post.meta.date != false)){ %>
<div class="new-meta-item date">
<a class='notlink'>
5 years ago
<i class="fas fa-calendar-alt" aria-hidden="true"></i>
5 years ago
<%= date(post.date, theme.date_format) %>
5 years ago
</a>
6 years ago
</div>
<% } %>
5 years ago
<% if(post.categories && (!post.meta || post.meta.categories != false)){ %>
<% if (post.categories && post.categories.length && post.categories.forEach){ %>
<%
var cats = [];
var path;
post.categories.forEach(function(cat){
cats.push(cat.name);
path = cat.path;
});
%>
<div class='new-meta-item category'>
<a href='<%- url_for(path) %>'>
<i class="fas fa-folder-open" aria-hidden="true"></i>
<%- cats.join('&nbsp;/&nbsp;') %>
</a>
</div>
<% } %>
<% } %>
5 years ago
<% if(!isPostList && (!post.meta || post.meta.counter != false)){ %>
5 years ago
<% if (theme.busuanzi == true) { %>
5 years ago
<div class="new-meta-item browse busuanzi">
<a class='notlink'>
<i class="fas fa-eye" aria-hidden="true"></i>
<span id="busuanzi_value_page_pv">
<i class="fas fa-spinner fa-spin fa-fw" aria-hidden="true"></i>
</span>
</a>
</div>
<% } %>
<% } %>
<% if(isPostList && post.top && (!post.meta || post.meta.top != false)){ %>
<div class="new-meta-item top-post">
<a class='notlink'>
<i class="fas fa-angle-double-up" aria-hidden="true"></i>
<%- post.top != true ? post.top : __('post.top') %>
</a>
</div>
<% } %>
</div>
5 years ago
<% if( hasMeta ){ %>
<hr>
<% } %>
6 years ago
</div>
</section>