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.
96 lines
3.4 KiB
96 lines
3.4 KiB
<% if(is_home() || is_category() || is_archive() || is_tag() || page.index) { |
|
var isPostList = true; |
|
} else { |
|
var isPostList = false; |
|
} |
|
var hasMeta = false; |
|
%> |
|
<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(isPostList){ %> |
|
<h2 class="title"> |
|
<a href="<%- url_for(post.path) %>"> |
|
<% if(post.title){ %> |
|
<%- post.title %> |
|
<% } else if (post.date) { %> |
|
<%= date(post.date, config.date_format) %> |
|
<% } %> |
|
</a> |
|
</h2> |
|
<% } else { %> |
|
<% if(page.title && (!page.meta || page.meta.title != false)){ %> |
|
<h1 class="title"><%- page.title %></h1> |
|
<% hasMeta = true %> |
|
<% } %> |
|
<% } %> |
|
|
|
<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> |
|
</div> |
|
<% } %> |
|
<% if(post.date && (!post.meta || post.meta.date != false)){ %> |
|
<div class="new-meta-item date"> |
|
<a class='notlink'> |
|
<i class="fas fa-calendar-alt" aria-hidden="true"></i> |
|
<%= date(post.date, theme.date_format) %> |
|
</a> |
|
</div> |
|
<% } %> |
|
<% 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(' / ') %> |
|
</a> |
|
</div> |
|
<% } %> |
|
<% } %> |
|
<% if(!isPostList && (!post.meta || post.meta.counter != false)){ %> |
|
<% if (theme.busuanzi == true) { %> |
|
<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> |
|
<% if( hasMeta ){ %> |
|
<hr> |
|
<% } %> |
|
</div> |
|
</section>
|
|
|