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.
65 lines
2.2 KiB
65 lines
2.2 KiB
<%- partial('_pre') %> |
|
<div class='l_main<%- page.sidebar == false ? ' no_sidebar' : '' %>'> |
|
<% if (page.year || page.month) { %> |
|
<%- partial('_partial/archive') %> |
|
<% } else { %> |
|
<article id="archive-page" class="post article white-box <%- theme.style.body.effect.join(' ') %>"> |
|
<section class="archive"> |
|
<% |
|
var year = -1, postid = -1; |
|
site.posts.sort('date', -1).each(function(post) { |
|
post.year = date(post.date, 'YYYY'); |
|
if (post.year && post.year !== year) { |
|
year = post.year; |
|
%> |
|
<div class="archive-item archive-year mark"> |
|
<h2><%= year %></h2> |
|
</div> |
|
<% } %> |
|
<div class="archive-item archive-post mark"> |
|
<a href="<%= url_for(post.link || post.path) %>"> |
|
<time><%= date(post.date, 'MM-DD') %></time> |
|
<span class="title"> |
|
<% if(post.title){ %> |
|
<%- post.title %> |
|
<% } else if (post.date) { %> |
|
<%= date(post.date, config.date_format) %> |
|
<% } %> |
|
<% if(theme.plugins.aplayer && theme.plugins.aplayer.enable && post.music && post.music.enable != false){ %> |
|
<i class="fas fa-headphones-alt music" aria-hidden="true"></i> |
|
<% } %> |
|
<% if (post.icon) { %> |
|
<i class="<%- post.icon %>" aria-hidden="true"></i> |
|
<% } %> |
|
<% (post.icons && post.icons||[]).forEach(function(icon){ %> |
|
<i class="<%- icon %>" aria-hidden="true"></i> |
|
<% }) %> |
|
</span> |
|
</a> |
|
</div> |
|
<% }); %> |
|
</section> |
|
</article> |
|
<% } %> |
|
</div> |
|
<%- partial('_partial/side') %> |
|
<%- partial('_partial/footer', null, {cache: !config.relative_link}) %> |
|
|
|
|
|
<% if (page && page.posts) { %> |
|
<!-- 根据主题中的设置决定是否在archive中针对摘要部分的MathJax公式加载mathjax.js文件 --> |
|
<% |
|
var need_mathjax = false; |
|
page.posts.each(function(post){ |
|
if (post.mathjax){ |
|
if (post.mathjax != "internal") { |
|
need_mathjax = true; |
|
} |
|
} |
|
}); |
|
%> |
|
|
|
<% if (need_mathjax){ %> |
|
<%- partial('_third-party//mathjax') %> |
|
<% } %> |
|
<% } %>
|
|
|