From 94cb59fc2728d066139a32b96cac52731df8197e Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 26 Oct 2019 13:21:58 +0800 Subject: [PATCH] Beautified the relate-posts card. --- _includes/related-posts.html | 12 ++++++------ assets/css/_src/main.scss | 24 +++++++++++++++--------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/_includes/related-posts.html b/_includes/related-posts.html index c270f81..5bd1449 100644 --- a/_includes/related-posts.html +++ b/_includes/related-posts.html @@ -37,7 +37,7 @@ {% assign post_index = post_index | plus: 1 %} {% endfor %} -{% unless score_list.size == 0 %} +{% if score_list.size > 0 %} {% assign score_list = score_list | sort | reverse %} {% assign count = 0 %} -{% endunless %} \ No newline at end of file +{% endif %} \ No newline at end of file diff --git a/assets/css/_src/main.scss b/assets/css/_src/main.scss index 9ec0a19..8464044 100644 --- a/assets/css/_src/main.scss +++ b/assets/css/_src/main.scss @@ -383,7 +383,7 @@ footer .license a { position: sticky; top: 2rem; transition: top 0.2s ease-in-out; - padding-right: 1.5rem; + margin-right: 1.5rem; margin-top: 3rem; margin-bottom: 6rem; color: #6c757d; @@ -859,16 +859,26 @@ table tbody td { } #related-posts .card { - border: none; - -webkit-transition: all .5s ease-in-out;; - -moz-transition: all .5s ease-in-out;; - transition: all .5s ease-in-out; + border: 1px solid #f1f1f1; + box-shadow: 0 0 5px 0 rgba(234, 234, 234, 0.7686274509803922); + -webkit-transition: all .3s ease-in-out;; + -moz-transition: all .3s ease-in-out;; + transition: all .3s ease-in-out; +} + +#related-posts .card:hover { + -webkit-transform: translate3d(0, -8px, 0); + transform: translate3d(0, -8px, 0); } #related-posts .card h3 { color: #353a3d; } +#related-posts .timeago { + color: rgba(30,55,70,.4); +} + #related-posts p { font-size: .9rem; margin-bottom: .5rem; @@ -883,10 +893,6 @@ table tbody td { text-decoration: none; } -#related-posts .card:hover { - transform: scale(1.05); -} - #related-posts ul { list-style-type: none; padding-inline-start: 1.5rem;