Skip to content

Commit ce2f6f5

Browse files
committed
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.
1 parent c4da99c commit ce2f6f5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

_layouts/home.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
{% assign alt = post.image.alt | default: 'Preview Image' %}
6767

68-
<img src="{{ src }}" w="15" h="8" alt="{{ alt }}" {{ lqip }}>
68+
<img src="{{ src }}" w="17" h="10" alt="{{ alt }}" {{ lqip }}>
6969
{% endif %}
7070

7171
<div class="card-body d-flex flex-column">

_sass/layout/home.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
.card {
149149
.preview-img {
150150
width: 20rem;
151-
height: 11.5rem; // can hold 2 lines each for title and content
151+
height: 11.55rem; // can hold 2 lines each for title and content
152152
}
153153

154154
.card-body {

0 commit comments

Comments
 (0)