-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
144 lines (127 loc) · 3.13 KB
/
index.html
File metadata and controls
144 lines (127 loc) · 3.13 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
---
layout: default
title: Home
paginate: true
---
{% include lang.html %}
{% assign posts = paginator.posts %}
<style>
.post-row-list {
display: flex;
flex-direction: column;
gap: 1.8rem;
margin-top: 2rem;
}
.post-row {
display: flex;
justify-content: space-between;
align-items: stretch;
gap: 1.5rem;
padding: 1.5rem;
border-radius: 12px;
background-color: #fff;
box-shadow: 0 3px 14px rgba(0,0,0,0.06);
transition: transform 0.2s ease, box-shadow 0.2s ease;
text-decoration: none;
color: inherit;
}
.post-row:hover {
transform: translateY(-4px);
box-shadow: 0 8px 22px rgba(0,0,0,0.1);
}
.post-text {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.post-title {
font-size: 1.2rem;
font-weight: 400;
margin-bottom: 0.3rem;
color: #212529;
line-height: 1.5;
}
.post-description {
font-size: 0.95rem;
color: #444;
line-height: 1.5;
margin-bottom: 0.8rem;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
max-height: 3em;
}
.post-meta {
font-size: 0.85rem;
color: #888;
display: flex;
align-items: center;
gap: 0.8rem;
}
.post-meta i {
margin-right: 0.3rem;
color: #aaa;
}
.post-image {
width: 300px;
height: 170px;
object-fit: cover;
border-radius: 10px;
flex-shrink: 0;
}
@media (max-width: 768px) {
.post-row {
flex-direction: column-reverse;
align-items: center;
text-align: center;
}
.post-image {
width: 100%;
height: 180px;
}
.post-title {
font-size: 1.1rem;
}
.post-meta {
justify-content: center;
}
}
</style>
<div class="post-row-list">
{% for post in posts %}
<a href="{{ post.url | relative_url }}" class="post-row">
<div class="post-text">
<div>
<div class="post-title">{{ post.title }}</div>
<div class="post-description">
{% include post-description.html %}
</div>
<div class="post-meta">
<span><i class="far fa-calendar-alt"></i>{% include datetime.html date=post.date lang=lang %}</span>
{% if post.categories.size > 0 %}
<span><i class="far fa-folder-open"></i>
{% for category in post.categories %}
{{ category }}{% unless forloop.last %}, {% endunless %}
{% endfor %}
</span>
{% endif %}
</div>
</div>
</div>
{% if post.image %}
{% assign src = post.image.path | default: post.image %}
{% unless src contains '//' %}
{% assign src = post.media_subpath | append: '/' | append: src | replace: '//', '/' %}
{% endunless %}
<img src="{{ src }}" alt="{{ post.title | xml_escape }}" class="post-image" />
{% else %}
<img src="/assets/img/default.jpg" alt="Default image" class="post-image" />
{% endif %}
</a>
{% endfor %}
</div>
{% if paginator.total_pages > 1 %}
{% include post-paginator.html %}
{% endif %}