-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtags.html
More file actions
128 lines (113 loc) · 3.12 KB
/
tags.html
File metadata and controls
128 lines (113 loc) · 3.12 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
---
title: Теги
permalink: "/tags/"
layout: page
subtitle: Все статьи по тегам
---
<div class="tags-page">
<style>
.tags-cloud {
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
justify-content: center;
margin-bottom: 3rem;
padding: 2rem;
background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
border-radius: 16px;
}
.tag-cloud-item {
display: inline-block;
padding: 0.5rem 1rem;
background: white;
border: 2px solid #e2e8f0;
border-radius: 24px;
text-decoration: none;
color: #4a5568;
transition: all 0.3s ease;
font-weight: 500;
}
.tag-cloud-item:hover {
border-color: #667eea;
color: #667eea;
transform: translateY(-2px) scale(1.05);
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}
.tag-section {
margin-bottom: 2.5rem;
padding: 1.5rem;
background: white;
border-radius: 12px;
border: 1px solid #e2e8f0;
}
.tag-heading {
display: flex;
align-items: center;
gap: 0.75rem;
margin-bottom: 1rem;
padding-bottom: 0.75rem;
border-bottom: 2px solid #667eea;
}
.tag-posts-list {
list-style: none;
padding: 0;
margin: 0;
}
.tag-posts-list li {
padding: 0.75rem 0;
border-bottom: 1px solid #e2e8f0;
}
.tag-posts-list li:last-child {
border-bottom: none;
}
.tag-posts-list a {
color: #2d3748;
text-decoration: none;
font-weight: 500;
}
.tag-posts-list a:hover {
color: #667eea;
}
.tag-posts-list time {
color: #718096;
font-size: 0.875rem;
margin-right: 1rem;
font-family: 'JetBrains Mono', monospace;
}
</style>
{% assign tags = site.tags | sort %}
<div class="tags-cloud">
{% for tag in tags %}
<a href="#{{ tag[0] | slugify }}" class="tag-cloud-item">
#{{ tag[0] }} <span style="opacity: 0.7;">({{ tag[1].size }})</span>
</a>
{% endfor %}
</div>
<div class="tags-content">
{% for tag in tags %}
<section class="tag-section" id="{{ tag[0] | slugify }}">
<h2 class="tag-heading">
<span>🏷️</span>
<span>#{{ tag[0] }}</span>
<span style="color: #718096; font-size: 1rem; font-weight: normal; margin-left: auto;">
{{ tag[1].size }}
{% if tag[1].size == 1 %}статья
{% elsif tag[1].size < 5 %}статьи
{% else %}статей{% endif %}
</span>
</h2>
<ul class="tag-posts-list">
{% assign sorted_posts = tag[1] | sort: 'date' | reverse %}
{% for post in sorted_posts %}
<li>
<time datetime="{{ post.date | date_to_xmlschema }}">
{{ post.date | date: "%d.%m.%Y" }}
</time>
<a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
</li>
{% endfor %}
</ul>
</section>
{% endfor %}
</div>
</div>