1
0
mirror of https://github.com/cotes2020/jekyll-theme-chirpy.git synced 2025-12-18 05:41:31 +00:00

perf(ui): improve related posts design

This commit is contained in:
Cotes Chung
2023-03-21 07:20:32 +08:00
parent 97b8dfeed6
commit 2918da9f29
9 changed files with 48 additions and 75 deletions

View File

@@ -85,20 +85,18 @@
{% for entry in index_list %}
{% assign index = entry | plus: 0 %}
{% assign post = site.posts[index] %}
<div class="card">
<a href="{{ post.url | relative_url }}">
<div class="card-body">
{% include datetime.html date=post.date class="small" lang=include.lang %}
<h3 class="pt-0 mt-1 mb-3" data-toc-skip>{{ post.title }}</h3>
<div class="text-muted small">
<p>
{% include no-linenos.html content=post.content %}
{{ content | markdownify | strip_html | truncate: 200 | escape }}
</p>
</div>
<a href="{{ post.url | relative_url }}" class="card post-preview">
<div class="card-body">
{% include datetime.html date=post.date class="small" lang=include.lang %}
<h3 class="pt-0 mt-2 mb-3" data-toc-skip>{{ post.title }}</h3>
<div class="text-muted small">
<p>
{% include no-linenos.html content=post.content %}
{{ content | markdownify | strip_html | truncate: 200 | escape }}
</p>
</div>
</a>
</div>
</div>
</a>
{% endfor %}
</div>
<!-- .card-deck -->