分类页面开始施工

This commit is contained in:
结发受长生 2019-05-14 00:10:10 +08:00
parent 20f836d0b1
commit 49f327f636
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,6 @@
---
title: 文章分类
date: 2019-05-13 23:13:59
type: categories
layout: categories
---

View File

@ -0,0 +1,25 @@
<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>