From 06f1c6f256d447daff979cc45b1659010c5a1a9f Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Wed, 8 Nov 2023 01:16:00 +0800 Subject: [PATCH] refactor: align the position of the share buttons --- _includes/post-sharing.html | 24 +++++++----------------- _sass/layout/post.scss | 4 ++-- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/_includes/post-sharing.html b/_includes/post-sharing.html index 4f06626..d894199 100644 --- a/_includes/post-sharing.html +++ b/_includes/post-sharing.html @@ -8,15 +8,13 @@ {% assign url = page.url | absolute_url | url_encode %} {% for share in site.data.share.platforms -%} + {%- capture tooltip -%} + data-bs-toggle="tooltip" data-bs-placement="top" title="{{ share.type }}" aria-label="{{ share.type }}" + {%- endcapture -%} + {% if share.type == 'Mastodon' %} - @@ -34,15 +32,7 @@ {% assign link = share.link | replace: 'TITLE', title | replace: 'URL', url %} - + {% endfor %} diff --git a/_sass/layout/post.scss b/_sass/layout/post.scss index 431e161..efbde82 100644 --- a/_sass/layout/post.scss +++ b/_sass/layout/post.scss @@ -90,9 +90,9 @@ h1 + .post-meta { } button { - position: relative; - bottom: 1px; padding: 0; + border: none; + line-height: inherit; @extend %cursor-pointer; }