结发受长生 de8e1887a6 标签修改
2018-06-05 00:48:00 +08:00

23 lines
541 B
Plaintext

<% if (site.posts.length){ %>
<%
var extraClass = '';
if (idx.current % 3 === 0) {
extraClass += ' first';
if (idx.current >= 3) {
extraClass += ' newline';
}
}
%>
<div class="widget recent-posts<%= extraClass %>">
<h3 class="title"><%= __('recent_posts') %></h3>
<ul class="entry">
<% site.posts.sort('date', -1).limit(5).each(function(post){ %>
<li>
<a href="<%= config.root %><%= post.path %>"><%= post.title %></a>
</li>
<% }); %>
</ul>
</div>
<% } else {
idx.current -= 1
} %>