-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcategory.html
46 lines (42 loc) · 1.14 KB
/
category.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
layout: default
title: Categories
---
{% comment %}
这里是注释,我觉得你应该引入你需要的css就可以了,而不需要把整个bootstrap都引入进来。我只需要把我需要的badge类移植过来就可以了。
{% endcomment %}
<style>
.tag {
padding: 0 3px 2px;
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
font-size: 12px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
padding: 2px 4px;
color: #1756a9;
white-space: nowrap;
background-color: #f7f7f9;
border: 1px solid #e1e1e8;
}
</style>
<div class="">
<div class="">
{% for tag in site.categories %}
<a class="tag" href="#{{ tag[0] | slugify }}" class="">{{ tag[0] }}</a>
{% endfor %}
</div>
<hr/>
<div class="">
{% for tag in site.categories %}
<h2 id="{{ tag[0] | slugify }}">{{ tag[0] }}</h2>
<ul class="">
{% for post in tag[1] %}
<li>
<a class="" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a><span><small> {{ post.date | date_to_string }}</small></span>
</li>
{% endfor %}
</ul>
{% endfor %}
</div>
</div>