Otpimized pin icon layout.

This commit is contained in:
Cotes Chung 2020-06-07 16:21:10 +08:00
parent bec344f6e9
commit fbbd387402
2 changed files with 2 additions and 10 deletions

View file

@ -9,15 +9,12 @@ layout: page
{% assign pinned = site.posts | where_exp: "item", "item.pin == true" %}
{% assign default = site.posts | where_exp: "item", "item.pin == nil " %}
{% assign posts = "" | split: "" %}
<!-- Get pinned posts -->
{% assign offset = paginator.page | minus: 1 | times: paginator.per_page %}
{% assign pinned_num = pinned.size | minus: offset %}
{% if pinned_num > 0 %}
@ -38,7 +35,6 @@ layout: page
{% endif %}
{% assign default_num = paginator.posts | size | minus: pinned_num %}
{% assign default_end = default_beg | plus: default_num | minus: 1 %}
{% if default_num > 0 %}
@ -53,10 +49,10 @@ layout: page
{% for post in posts %}
<div class="post-preview">
<div class="d-flex justify-content-between align-items-center pr-xl-2">
<div class="d-flex justify-content-between pr-xl-2">
<h1><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h1>
{% if post.pin %}
<i class="fas fa-thumbtack fa-fw fa-sm text-muted pinned" data-toggle="tooltip" data-placement="top"
<i class="fas fa-thumbtack fa-fw text-muted fa-sm mt-1 mt-xl-2" data-toggle="tooltip" data-placement="left"
title="Pinned"></i>
{% endif %}
</div>

View file

@ -47,10 +47,6 @@
}
}
.pinned {
transform: rotate(45deg);
}
} // .post-preview
} // #post-list