Fixed post bookmark shifting layout bug

This commit is contained in:
Sanne de Vries 2022-06-01 18:26:20 -04:00
parent 5e7678b239
commit 1e76022a28
2 changed files with 16 additions and 13 deletions

View File

@ -6,17 +6,17 @@
<img src={{imageUrl}} alt="" role="presentation" />
</div>
{{/if}}
{{/let}}
<div class="gh-post-bookmark-content">
<div class="gh-post-bookmark-title">{{@post.title}}</div>
<div class="gh-post-bookmark-text truncate">{{@post.excerpt}}</div>
<div class="gh-post-bookmark-details">
{{#if (get-setting "icon")}}
<div class="gh-post-bookmark-site-icon"><img src={{get-setting "icon"}} alt="" role="presentation" /></div>
{{/if}}
<div class="gh-post-bookmark-site-title">{{get-setting "title"}}</div>
<div class="gh-post-bookmark-authors">{{post-author-names @post}}</div>
<div class="gh-post-bookmark-content {{if imageUrl "" "no-image"}}">
<div class="gh-post-bookmark-title">{{@post.title}}</div>
<div class="gh-post-bookmark-text truncate">{{@post.excerpt}}</div>
<div class="gh-post-bookmark-details">
{{#if (get-setting "icon")}}
<div class="gh-post-bookmark-site-icon"><img src={{get-setting "icon"}} alt="" role="presentation" /></div>
{{/if}}
<div class="gh-post-bookmark-site-title">{{get-setting "title"}}</div>
<div class="gh-post-bookmark-authors">{{post-author-names @post}}</div>
</div>
</div>
</div>
{{/let}}
</div>
</div>

View File

@ -752,7 +752,7 @@
.gh-post-bookmark {
display: grid;
grid-template-columns: auto auto;
grid-template-columns: 1fr minmax(0, 2fr);
width: 100%;
max-width: 640px;
margin-top: 1.6rem;
@ -780,7 +780,6 @@
.gh-post-bookmark-image img {
width: 100%;
max-width: 222px;
height: 100%;
max-height: 152px;
object-fit: cover;
@ -795,6 +794,10 @@
overflow: hidden;
}
.gh-post-bookmark-content.no-image {
grid-column: span 2;
}
.gh-post-bookmark-title {
display: -webkit-box;
margin-bottom: .4rem;