-
Notifications
You must be signed in to change notification settings - Fork 11
/
categories.html
55 lines (53 loc) · 1.69 KB
/
categories.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
47
48
49
50
51
52
53
54
55
---
layout: page
title: Posts by categories
css: ["page.css"]
---
<div style="margin-bottom: 1rem;">
Click on category you wanna see the posts.
</div>
<div class="col s12 tag-div">
<div class="tag-list">
{% for cat in site.categories %}
{% for catDat in site.data.categories %}
{% if catDat.slug == cat[0] %}
{% assign catego = catDat %}
{% endif %}
{% endfor %}
{% if catego %}
{% capture test %}{{cat[0] | slice: 0}}{% endcapture %}
{% capture testup %}{{cat[0] | slice: 0 | upcase}}{% endcapture %}
<a class="tag-chip" href="#{{cat[0] | slugify}}{% if test == testup %}_cap{% endif %}"><div class="chip z-depth-1">{{ catego.name }}</div></a>
{% endif %}
{% endfor %}
</div>
<div class="divider"></div>
<div class="cat-index">
{% for cat in site.categories %}
{% for catDat in site.data.categories %}
{% if catDat.slug == cat[0] %}
{% assign catego = catDat %}
{% endif %}
{% endfor %}
{% if catego %}
{% capture test %}{{cat[0] | slice: 0}}{% endcapture %}
{% capture testup %}{{cat[0] | slice: 0 | upcase}}{% endcapture %}
<div class="tag-sec" id="{{cat[0] | slugify}}{% if test == testup %}_cap{% endif %}">
<h3 class="cat-tag" class="text-cap">{{ catego.name }}</h3>
<div class="thi-columns">
<ul class="tag-post">
{% for post in cat[1] %}
<a class="post-title" href="{{site.baseurl}}{{post.url}}">
<li>
{{post.title}}
<small class="post-date">{{post.date | date_to_string}}</small>
</li>
</a>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>