Improved the pin for posts (#99).

This commit is contained in:
Cotes Chung 2020-08-11 18:14:28 +08:00
parent db06610fd6
commit d4397dff08

View file

@ -9,7 +9,7 @@ layout: page
{% assign pinned = site.posts | where_exp: "item", "item.pin == true" %} {% assign pinned = site.posts | where_exp: "item", "item.pin == true" %}
{% assign default = site.posts | where_exp: "item", "item.pin == nil " %} {% assign default = site.posts | where_exp: "item", "item.pin != true" %}
{% assign posts = "" | split: "" %} {% assign posts = "" | split: "" %}
<!-- Get pinned posts --> <!-- Get pinned posts -->
@ -51,7 +51,7 @@ layout: page
<div class="post-preview"> <div class="post-preview">
<div class="d-flex justify-content-between pr-xl-2"> <div class="d-flex justify-content-between pr-xl-2">
<h1><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h1> <h1><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h1>
{% if post.pin %} {% 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" <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> title="Pinned"></i>
{% endif %} {% endif %}