/
categories.html
88 lines (75 loc) · 2.78 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
layout: page
title: 'Kategorien'
share-description: 'Kategorien Übersicht'
---
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
{%- capture site_categories -%}
{%- for category in site.categories -%}
{{- category | first -}}{%- unless forloop.last -%},{%- endunless -%}
{%- endfor -%}
{%- endcapture -%}
{%- assign category_list = site_categories | split:',' | sort -%}
{%- for category in category_list -%}
<a href="#{{- category -}}" class="btn btn-primary btn-sm tag-btn"><i class="fas fa-list" aria-hidden="true"></i> {{- category -}} ({{site.categories[category].size}})</a>
{%- endfor -%}
<div id="full-tags-list">
{%- for category in category_list -%}
<h2 id="{{- category -}}" class="linked-section">
<i class="fas fa-list" aria-hidden="true"></i>
{{- category -}} ({{site.categories[category].size}})
</h2>
<div class="post-list">
{%- for post in site.categories[category] -%}
<div class="element-item {{ post.date }}">
<article class="post-preview">
{%- capture thumbnail -%}
{% if post.thumbnail-img %}
{{ post.thumbnail-img }}
{% elsif post.cover-img %}
{% if post.cover-img.first %}
{{ post.cover-img[0].first.first }}
{% else %}
{{ post.cover-img }}
{% endif %}
{% else %}
{% endif %}
{% endcapture %}
{% assign thumbnail=thumbnail | strip %}
{% if site.feed_show_excerpt == false %}
{% if thumbnail != "" %}
<div class="post-image post-image-normal">
<a href="{{ post.url | absolute_url }}" aria-label="Thumbnail">
<img src="{{ thumbnail | absolute_url }}" alt="Post thumbnail">
</a>
</div>
{% endif %}
{% endif %}
{%- if post.redirect -%}
<a href="{{ post.redirect | absolute_url }}">
{% else %}
<a href="{{ post.url | absolute_url }}">
{% endif %}
<h2 class="post-title">{{ post.title }}</h2>
{% if post.subtitle %}
<h3 class="post-subtitle">{{ post.subtitle }}</h3>
{% endif %}
</a>
<p class="post-meta">
{% assign date_format = site.date_format | default: "%B %-d, %Y" %}
Posted on {{ post.date | date: date_format }}
</p>
{% if thumbnail != "" %}
<div class="post-image post-image-small">
<a href="{{ post.url | absolute_url }}" aria-label="Thumbnail">
<img src="{{ thumbnail | absolute_url }}" alt="Post thumbnail">
</a>
</div>
{% endif %}
{% include meta.html %}
</article>
</div>
{%- endfor -%}
</div>
{%- endfor -%}
</div>