分类页面初步完工

This commit is contained in:
结发受长生
2019-05-14 09:43:35 +08:00
parent 49f327f636
commit a0d0f72017
7 changed files with 90 additions and 32 deletions
+12 -10
View File
@@ -1,5 +1,5 @@
<article class="article">
<h3>共计 <%= site.categories.length %> 个分类, <%= site.tags.length %> 个标签</h3>
<h3 class="category-count">共计 <%= site.categories.length %> 个分类, <%= site.tags.length %> 个标签</h3>
<% if (site.categories.length){ %>
<ul class="category-list">
<% site.categories.sort('name').each(function(item){ %>
@@ -7,19 +7,21 @@
<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>
<span class="category-list-count"><%= item.posts.length %></span>
</a>
</li>
<% } %>
<% }) %>
</ul>
<% } %>
<%- tagcloud({
min_font: 16,
max_font: 35,
amount: 999,
color: true,
start_color: 'gray',
end_color: 'black',
}) %>
<div class="tag-cloud">
<%- tagcloud({
min_font: 16,
max_font: 35,
amount: 999,
color: true,
start_color: 'gray',
end_color: 'black',
}) %>
</div>
</article>