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

perf: avoid the layout shift for post datetime

This commit is contained in:
Cotes Chung
2022-04-26 00:39:58 +08:00
parent 42c44a8bc1
commit 6d35f5f8da
20 changed files with 87 additions and 160 deletions

View File

@@ -23,7 +23,6 @@ layout: page
{% assign pinned_num = 0 %}
{% endif %}
<!-- Get default posts -->
{% assign default_beg = offset | minus: pinned.size %}
@@ -58,15 +57,11 @@ layout: page
</div>
<div class="post-meta text-muted d-flex">
<div class="mr-auto">
<!-- posted date -->
<i class="far fa-calendar fa-fw"></i>
{% include timeago.html date=post.date tooltip=true capitalize=true %}
<!-- time to read -->
<i class="far fa-clock fa-fw"></i>
{% include read-time.html content=post.content %}
{% include datetime.html date=post.date %}
<!-- categories -->
{% if post.categories.size > 0 %}
@@ -78,6 +73,7 @@ layout: page
{% endfor %}
</span>
{% endif %}
</div>
{% if post.pin %}