mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-29 15:51:14 +00:00
Merge pull request #1353 from jsit/fix/fix-post-title-element
fix: Only post title should be inside h5, not the additional metadata icons
This commit is contained in:
commit
b17be67836
1 changed files with 73 additions and 81 deletions
|
@ -497,7 +497,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
const post = this.postView.post;
|
const post = this.postView.post;
|
||||||
return (
|
return (
|
||||||
<Link
|
<Link
|
||||||
className={`d-inline-block ${
|
className={`d-inline ${
|
||||||
!post.featured_community && !post.featured_local
|
!post.featured_community && !post.featured_local
|
||||||
? "text-body"
|
? "text-body"
|
||||||
: "text-primary"
|
: "text-primary"
|
||||||
|
@ -505,8 +505,8 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
to={`/post/${post.id}`}
|
to={`/post/${post.id}`}
|
||||||
title={i18n.t("comments")}
|
title={i18n.t("comments")}
|
||||||
>
|
>
|
||||||
<div
|
<span
|
||||||
className="d-inline-block"
|
className="d-inline"
|
||||||
dangerouslySetInnerHTML={mdToHtmlInline(post.name)}
|
dangerouslySetInnerHTML={mdToHtmlInline(post.name)}
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -519,30 +519,23 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="post-title overflow-hidden">
|
<div className="post-title overflow-hidden">
|
||||||
<h5>
|
<h5 className="d-inline">
|
||||||
{url ? (
|
{url && this.props.showBody ? (
|
||||||
this.props.showBody ? (
|
|
||||||
<a
|
<a
|
||||||
className={`d-inline-block ${
|
className={
|
||||||
!post.featured_community && !post.featured_local
|
!post.featured_community && !post.featured_local
|
||||||
? "text-body"
|
? "text-body"
|
||||||
: "text-primary"
|
: "text-primary"
|
||||||
}`}
|
}
|
||||||
href={url}
|
href={url}
|
||||||
title={url}
|
title={url}
|
||||||
rel={relTags}
|
rel={relTags}
|
||||||
>
|
|
||||||
<div
|
|
||||||
className="d-inline-block"
|
|
||||||
dangerouslySetInnerHTML={mdToHtmlInline(post.name)}
|
dangerouslySetInnerHTML={mdToHtmlInline(post.name)}
|
||||||
/>
|
></a>
|
||||||
</a>
|
|
||||||
) : (
|
|
||||||
this.postLink
|
|
||||||
)
|
|
||||||
) : (
|
) : (
|
||||||
this.postLink
|
this.postLink
|
||||||
)}
|
)}
|
||||||
|
</h5>
|
||||||
{(url && isImage(url)) ||
|
{(url && isImage(url)) ||
|
||||||
(post.thumbnail_url && (
|
(post.thumbnail_url && (
|
||||||
<button
|
<button
|
||||||
|
@ -600,7 +593,6 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
{i18n.t("nsfw")}
|
{i18n.t("nsfw")}
|
||||||
</small>
|
</small>
|
||||||
)}
|
)}
|
||||||
</h5>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue