From ce2f6f5abef7a8b874e08d1f18c1fd002650dbf1 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Thu, 25 May 2023 22:14:46 +0800 Subject: [PATCH] perf(ui): avoid blank space at the bottom of the homepage preview image When the title of the post has a line break, there will be a blank space at the bottom of the preview image. --- _layouts/home.html | 2 +- _sass/layout/home.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_layouts/home.html b/_layouts/home.html index f1580f9..fa2f58e 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -65,7 +65,7 @@ refactor: true {% assign alt = post.image.alt | default: 'Preview Image' %} - {{ alt }} + {{ alt }} {% endif %}
diff --git a/_sass/layout/home.scss b/_sass/layout/home.scss index 5092c69..499de47 100644 --- a/_sass/layout/home.scss +++ b/_sass/layout/home.scss @@ -148,7 +148,7 @@ .card { .preview-img { width: 20rem; - height: 11.5rem; // can hold 2 lines each for title and content + height: 11.55rem; // can hold 2 lines each for title and content } .card-body {