Skip to content

Commit 7b5fdcf

Browse files
committed
Otpimized pin icon layout.
1 parent 624057c commit 7b5fdcf

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

_layouts/home.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@
99

1010

1111
{% assign pinned = site.posts | where_exp: "item", "item.pin == true" %}
12-
1312
{% assign default = site.posts | where_exp: "item", "item.pin == nil " %}
14-
1513
{% assign posts = "" | split: "" %}
1614

1715
<!-- Get pinned posts -->
1816

1917
{% assign offset = paginator.page | minus: 1 | times: paginator.per_page %}
20-
2118
{% assign pinned_num = pinned.size | minus: offset %}
2219

2320
{% if pinned_num > 0 %}
@@ -38,7 +35,6 @@
3835
{% endif %}
3936

4037
{% assign default_num = paginator.posts | size | minus: pinned_num %}
41-
4238
{% assign default_end = default_beg | plus: default_num | minus: 1 %}
4339

4440
{% if default_num > 0 %}
@@ -53,10 +49,10 @@
5349
{% for post in posts %}
5450

5551
<div class="post-preview">
56-
<div class="d-flex justify-content-between align-items-center pr-xl-2">
52+
<div class="d-flex justify-content-between pr-xl-2">
5753
<h1><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h1>
5854
{% if post.pin %}
59-
<i class="fas fa-thumbtack fa-fw fa-sm text-muted pinned" data-toggle="tooltip" data-placement="top"
55+
<i class="fas fa-thumbtack fa-fw text-muted fa-sm mt-1 mt-xl-2" data-toggle="tooltip" data-placement="left"
6056
title="Pinned"></i>
6157
{% endif %}
6258
</div>

assets/css/home.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@
4747
}
4848
}
4949

50-
.pinned {
51-
transform: rotate(45deg);
52-
}
53-
5450
} // .post-preview
5551

5652
} // #post-list

0 commit comments

Comments
 (0)