mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-27 06:41:18 +00:00
Adding image thumbnails.
This commit is contained in:
parent
897fa78e89
commit
fbdb2e410a
2 changed files with 9 additions and 1 deletions
|
@ -66,6 +66,9 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
<svg class="icon downvote"><use xlinkHref="#icon-arrow-down"></use></svg>
|
<svg class="icon downvote"><use xlinkHref="#icon-arrow-down"></use></svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{post.url && isImage(post.url) &&
|
||||||
|
<a href={post.url} target="_blank"><img class="mx-2 float-left img-fluid thumbnail rounded" src={post.url} /></a>
|
||||||
|
}
|
||||||
<div className="ml-4">
|
<div className="ml-4">
|
||||||
{post.url
|
{post.url
|
||||||
? <div className="mb-0">
|
? <div className="mb-0">
|
||||||
|
@ -86,7 +89,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
<span>
|
<span>
|
||||||
<span class="pointer ml-2 badge badge-light text-muted small" onClick={linkEvent(this, this.handleImageExpandClick)}>-</span>
|
<span class="pointer ml-2 badge badge-light text-muted small" onClick={linkEvent(this, this.handleImageExpandClick)}>-</span>
|
||||||
<div>
|
<div>
|
||||||
<img class="img-fluid" src={post.url} />
|
<a href={post.url} target="_blank"><img class="img-fluid" src={post.url} /></a>
|
||||||
</div>
|
</div>
|
||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,3 +95,8 @@ blockquote {
|
||||||
.new-comments:hover {
|
.new-comments:hover {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.thumbnail {
|
||||||
|
max-height: 50px;
|
||||||
|
max-width: 50px;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue