summaryrefslogtreecommitdiff
path: root/themes/hexo-theme-freemind.bithack/layout/_widget/tagcloud.ejs
diff options
context:
space:
mode:
Diffstat (limited to 'themes/hexo-theme-freemind.bithack/layout/_widget/tagcloud.ejs')
m---------themes/hexo-theme-freemind.bithack0
-rw-r--r--themes/hexo-theme-freemind.bithack/layout/_widget/tagcloud.ejs13
2 files changed, 13 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/tagcloud.ejs b/themes/hexo-theme-freemind.bithack/layout/_widget/tagcloud.ejs
new file mode 100644
index 0000000..5089feb
--- /dev/null
+++ b/themes/hexo-theme-freemind.bithack/layout/_widget/tagcloud.ejs
@@ -0,0 +1,13 @@
+<% if (site.tags.length){ %>
+ <div class="widget">
+ <h4><%= __('tagcloud') %></h4>
+ <ul class="tag_box inline list-unstyled">
+ <% site.tags.random().limit(20).each(function(item){ %>
+ <li><a href="<%- config.root %><%- item.path %>"><%= item.name %><span><%= item.posts.length %></span></a></li>
+ <% }); %>
+ <% if (site.tags.length > 20) { %>
+ <li><a href="/tags">...<span><%= site.tags.length %></span></a></li>
+ <% } %>
+ </ul>
+ </div>
+<% } %>