2015-03-19 14:25:53 +00:00
|
|
|
<% if (site.posts.length){ %>
|
|
|
|
<div class="widget-wrap">
|
2015-03-20 02:25:44 +00:00
|
|
|
<h3 class="widget-title"><%= __('widget.recents') %></h3>
|
2015-03-19 14:25:53 +00:00
|
|
|
<div class="widget">
|
2015-04-05 08:05:08 +00:00
|
|
|
<ul id="recent-post" class="<%= (theme.thumbnail?'':'no-thumbnail') %>">
|
2015-03-19 14:25:53 +00:00
|
|
|
<% site.posts.sort('date', -1).limit(5).each(function(post){ %>
|
|
|
|
<li>
|
2015-04-05 08:05:08 +00:00
|
|
|
<% if(theme.thumbnail == true) { %>
|
2015-03-19 14:25:53 +00:00
|
|
|
<div class="item-thumbnail">
|
|
|
|
<%- partial('../_partial/post/thumbnail.ejs', {post: post}) %>
|
|
|
|
</div>
|
2015-04-05 08:05:08 +00:00
|
|
|
<% } %>
|
2015-03-19 14:25:53 +00:00
|
|
|
<div class="item-inner">
|
2015-03-20 02:25:44 +00:00
|
|
|
<p class="item-category"><%- list_categories(post.categories, {show_count: false, depth:2, class: 'article-category', style: 'none', separator: '<i class="fa fa-angle-right"></i>'}) %></p>
|
2015-03-19 14:25:53 +00:00
|
|
|
<p class="item-title"><a href="<%- url_for((post.link?post.link:post.path)) %>" class="title"><%= post.title %></a></p>
|
|
|
|
<p class="item-date"><time datetime="<%= date_xml(post.date) %>" itemprop="datePublished"><%= date(post.date) %></time></p>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
<% }) %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% } %>
|