blog-web/themes/yilia/layout/categories.ejs
2019-05-14 00:10:10 +08:00

25 lines
745 B
Plaintext

<article class="article">
<h3>共计 <%= site.categories.length %> 个分类, <%= site.tags.length %> 个标签</h3>
<% if (site.categories.length){ %>
<ul class="category-list">
<% site.categories.sort('name').each(function(item){ %>
<% if(item.posts.length){ %>
<li class="category-list-item">
<a href="<%- config.root %><%- item.path %>" class="category-list-link" title="<%= item.name %>">
<%= item.name %>
<span class="category-list-count">1</span>
</a>
</li>
<% } %>
<% }) %>
</ul>
<% } %>
<%- tagcloud({
min_font: 16,
max_font: 35,
amount: 999,
color: true,
start_color: 'gray',
end_color: 'black',
}) %>
</article>