summaryrefslogtreecommitdiff
path: root/themes/hexo-theme-freemind.bithack/layout/_widget/recent_posts.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'themes/hexo-theme-freemind.bithack/layout/_widget/recent_posts.ejs')
m---------themes/hexo-theme-freemind.bithack0
-rw-r--r--themes/hexo-theme-freemind.bithack/layout/_widget/recent_posts.ejs12
2 files changed, 12 insertions, 0 deletions
diff --git a/themes/hexo-theme-freemind.bithack b/themes/hexo-theme-freemind.bithack
deleted file mode 160000
-Subproject db335ebdc14507c7687084da084a56eb3d003f1
diff --git a/themes/hexo-theme-freemind.bithack/layout/_widget/recent_posts.ejs b/themes/hexo-theme-freemind.bithack/layout/_widget/recent_posts.ejs
new file mode 100644
index 0000000..ab81c77
--- /dev/null
+++ b/themes/hexo-theme-freemind.bithack/layout/_widget/recent_posts.ejs
@@ -0,0 +1,12 @@
+<% if (site.posts.length){ %>
+<div class="widget">
+ <h4><%= __('recent_posts') %></h4>
+ <ul class="entry list-unstyled">
+ <% site.posts.sort('date', -1).limit(5).each(function(post){ %>
+ <li>
+ <a href="<%= config.root %><%= post.path %>" <% if (post.description) { %> title="<%= post.description %>" <% } %>><i class="fa fa-file-o"></i><%= truncate(post.title, 25) %></a>
+ </li>
+ <% }); %>
+ </ul>
+</div>
+<% } %> \ No newline at end of file