Skip to content

Commit

Permalink
perf(ui): avoid blank space at the bottom of the homepage preview image
Browse files Browse the repository at this point in the history
When the title of the post has a line break, there will be a blank space at the bottom of the preview image.
  • Loading branch information
cotes2020 committed Jun 4, 2023
1 parent c4da99c commit ce2f6f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

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

<img src="{{ src }}" w="15" h="8" alt="{{ alt }}" {{ lqip }}>
<img src="{{ src }}" w="17" h="10" alt="{{ alt }}" {{ lqip }}>
{% endif %}

<div class="card-body d-flex flex-column">
Expand Down
2 changes: 1 addition & 1 deletion _sass/layout/home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ce2f6f5

Please sign in to comment.