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

Beautify the pin label on home page

This commit is contained in:
Cotes Chung
2020-12-17 15:18:02 +08:00
parent b9ffe15ffb
commit 5ffbfaec26
6 changed files with 71 additions and 41 deletions

View File

@@ -49,13 +49,10 @@ layout: page
{% for post in posts %}
<div class="post-preview">
<div class="d-flex justify-content-between pr-xl-2">
<h1><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h1>
{% if post.pin == true %}
<i class="fas fa-thumbtack fa-fw text-muted mt-1 ml-2 mt-xl-2" data-toggle="tooltip" data-placement="left"
title="Pinned"></i>
{% endif %}
</div>
<a href="{{ post.url | relative_url }}">
<h1>{{ post.title }}</h1>
</a>
<div class="post-content">
<p>
{% include no-linenos.html content=post.content %}
@@ -63,24 +60,35 @@ layout: page
</p>
</div>
<div class="post-meta text-muted">
<!-- posted date -->
<i class="far fa-calendar fa-fw"></i>
{% include timeago.html date=post.date tooltip=true %}
<div class="post-meta text-muted d-flex justify-content-between">
<!-- time to read -->
<i class="far fa-clock fa-fw"></i>
<span>{% include read-time.html content=post.content %}</span>
<div>
<!-- posted date -->
<i class="far fa-calendar fa-fw"></i>
{% include timeago.html date=post.date tooltip=true %}
<!-- page views -->
{% if site.google_analytics.pv.enabled %}
<i class="far fa-eye fa-fw"></i>
<span id="pv_{{-post.title-}}" class="pageviews">
<i class="fas fa-spinner fa-spin fa-fw"></i>
</span>
<!-- time to read -->
<i class="far fa-clock fa-fw"></i>
{% include read-time.html content=post.content %}
<!-- page views -->
{% if site.google_analytics.pv.enabled %}
<i class="far fa-eye fa-fw"></i>
<span id="pv_{{-post.title-}}" class="pageviews">
<i class="fas fa-spinner fa-spin fa-fw"></i>
</span>
{% endif %}
</div>
{% if post.pin %}
<div class="pin">
<i class="fas fa-thumbtack fa-fw"></i>
<span>{{ site.data.label.pin_prompt }}</span>
</div>
{% endif %}
</div>
</div> <!-- .post-meta -->
</div> <!-- .post-review -->
{% endfor %}