fix: Fix mobile thumbnail being too small (#1814)
authorJay Sitter <jsit@users.noreply.github.com>
Wed, 5 Jul 2023 19:31:08 +0000 (15:31 -0400)
committerGitHub <noreply@github.com>
Wed, 5 Jul 2023 19:31:08 +0000 (15:31 -0400)
Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
src/assets/css/main.css
src/shared/components/post/post-listing.tsx

index b92f08666e94707aa9362f92f50dad22305e902a..36566b9b969846d9e1f5405777aec87b0c10e5d3 100644 (file)
@@ -204,6 +204,11 @@ blockquote {
   height: 5rem;
 }
 
+.mobile-thumbnail-container .thumbnail {
+  width: 100%;
+  height: auto;
+}
+
 .thumbnail svg {
   height: 1.25rem;
   width: 1.25rem;
index d9b3ad287b3240802f1a9ec3014f6d7fab079bf3..eb4dc8d974807547758e5d785ece3debf0510c35 100644 (file)
@@ -1327,10 +1327,10 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
     const post = this.postView.post;
     return post.thumbnail_url || (post.url && isImage(post.url)) ? (
       <div className="row">
-        <div className={`${this.state.imageExpanded ? "col-12" : "col-8"}`}>
+        <div className={`${this.state.imageExpanded ? "col-12" : "col-9"}`}>
           {this.postTitleLine()}
         </div>
-        <div className="col-4">
+        <div className="col-3 mobile-thumbnail-container">
           {/* Post thumbnail */}
           {!this.state.imageExpanded && this.thumbnail()}
         </div>