分类页面开始施工
This commit is contained in:
parent
20f836d0b1
commit
49f327f636
6
source/categories/index.md
Normal file
6
source/categories/index.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
title: 文章分类
|
||||
date: 2019-05-13 23:13:59
|
||||
type: categories
|
||||
layout: categories
|
||||
---
|
||||
25
themes/yilia/layout/categories.ejs
Normal file
25
themes/yilia/layout/categories.ejs
Normal 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>
|
||||
Loading…
x
Reference in New Issue
Block a user