mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-14 08:23:59 +00:00
Fixed mobile expanding.
This commit is contained in:
parent
c5443b6e82
commit
ad77c3d2d5
1 changed files with 5 additions and 3 deletions
8
ui/src/components/post-listing.tsx
vendored
8
ui/src/components/post-listing.tsx
vendored
|
@ -191,7 +191,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
if (isImage(post.url)) {
|
if (isImage(post.url)) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
class="text-body pointer d-inline-block position-relative"
|
class="float-right text-body pointer d-inline-block position-relative"
|
||||||
data-tippy-content={i18n.t('expand_here')}
|
data-tippy-content={i18n.t('expand_here')}
|
||||||
onClick={linkEvent(this, this.handleImageExpandClick)}
|
onClick={linkEvent(this, this.handleImageExpandClick)}
|
||||||
>
|
>
|
||||||
|
@ -204,7 +204,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
} else if (post.thumbnail_url) {
|
} else if (post.thumbnail_url) {
|
||||||
return (
|
return (
|
||||||
<a
|
<a
|
||||||
class="text-body d-inline-block position-relative"
|
class="float-right text-body d-inline-block position-relative"
|
||||||
href={post.url}
|
href={post.url}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener"
|
rel="noopener"
|
||||||
|
@ -950,7 +950,9 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
mobileThumbnail() {
|
mobileThumbnail() {
|
||||||
return this.props.post.thumbnail_url || isImage(this.props.post.url) ? (
|
return this.props.post.thumbnail_url || isImage(this.props.post.url) ? (
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-8">{this.postTitleLine()}</div>
|
<div className={`${this.state.imageExpanded ? 'col-12' : 'col-8'}`}>
|
||||||
|
{this.postTitleLine()}
|
||||||
|
</div>
|
||||||
<div class="col-4">
|
<div class="col-4">
|
||||||
{/* Post body prev or thumbnail */}
|
{/* Post body prev or thumbnail */}
|
||||||
{!this.state.imageExpanded && this.thumbnail()}
|
{!this.state.imageExpanded && this.thumbnail()}
|
||||||
|
|
Loading…
Reference in a new issue