]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Fix overview page on mobile
authorChocobozzz <me@florianbigard.com>
Tue, 4 Sep 2018 15:30:57 +0000 (17:30 +0200)
committerChocobozzz <me@florianbigard.com>
Tue, 4 Sep 2018 15:31:30 +0000 (17:31 +0200)
client/src/app/shared/video/abstract-video-list.scss
client/src/app/videos/video-list/video-overview.component.html
client/src/app/videos/video-list/video-overview.component.scss
client/src/sass/include/_mixins.scss

index 91091a5bb23916c0bdac1cdcd3a56d22b69d0542..3f9c73a29251a291523db91292f1951cea1af11f 100644 (file)
@@ -18,31 +18,6 @@ my-video-feed {
 
 @media screen and (max-width: 500px) {
   .videos {
-    text-align: center;
-
-    /deep/ .video-miniature {
-      padding-right: 0;
-      height: auto;
-      width: 100%;
-      margin-bottom: 20px;
-
-      .video-miniature-information {
-        width: 100% !important;
-
-        span {
-          width: 100%;
-        }
-      }
-
-      .video-thumbnail {
-        width: 100%;
-        height: auto;
-
-        img {
-          width: 100%;
-          height: auto;
-        }
-      }
-    }
+    @include video-miniature-small-screen;
   }
 }
index be9db3d90095942185047f8380a15e130a7555a2..4150cd5e198e85167944ff271ed3fd5805efa9aa 100644 (file)
@@ -7,9 +7,7 @@
       <a routerLink="/search" [queryParams]="{ categoryOneOf: [ object.category.id ] }">{{ object.category.label }}</a>
     </div>
 
-    <div>
-      <my-video-miniature *ngFor="let video of object.videos" [video]="video" [user]="user"></my-video-miniature>
-    </div>
+    <my-video-miniature *ngFor="let video of object.videos" [video]="video" [user]="user"></my-video-miniature>
   </div>
 
   <div class="section" *ngFor="let object of overview.tags">
@@ -17,9 +15,7 @@
       <a routerLink="/search" [queryParams]="{ tagOneOf: [ object.tag ] }">{{ object.tag }}</a>
     </div>
 
-    <div>
-      <my-video-miniature *ngFor="let video of object.videos" [video]="video" [user]="user"></my-video-miniature>
-    </div>
+    <my-video-miniature *ngFor="let video of object.videos" [video]="video" [user]="user"></my-video-miniature>
   </div>
 
   <div class="section channel" *ngFor="let object of overview.channels">
@@ -31,9 +27,7 @@
       </a>
     </div>
 
-    <div>
-      <my-video-miniature *ngFor="let video of object.videos" [video]="video" [user]="user"></my-video-miniature>
-    </div>
+    <my-video-miniature *ngFor="let video of object.videos" [video]="video" [user]="user"></my-video-miniature>
   </div>
 
 </div>
index 73b6d2e53cf7042ab9cf6b56a7008d770639bb87..e7dc60b4b8164271952da6cc16034ee27d571883 100644 (file)
@@ -7,6 +7,10 @@
   &:first-child {
     padding-top: 30px;
   }
+
+  my-video-miniature {
+    text-align: left;
+  }
 }
 
 .section-title {
       margin-right: 10px;
     }
   }
+}
+
+@media screen and (max-width: 500px) {
+  .section {
+    @include video-miniature-small-screen;
+  }
 }
\ No newline at end of file
index 547f03caac89322f42c3cd935b95556bad57534e..765297c87f828c8cc11d6f4723ee8cad379c04c4 100644 (file)
     text-align: center;
     align-items: center;
   }
+}
+
+@mixin video-miniature-small-screen {
+  text-align: center;
+
+  /deep/ .video-miniature {
+    padding-right: 0;
+    height: auto;
+    width: 100%;
+    margin-bottom: 20px;
+
+    .video-miniature-information {
+      width: 100% !important;
+
+      span {
+        width: 100%;
+      }
+    }
+
+    .video-thumbnail {
+      width: 100%;
+      height: auto;
+
+      img {
+        width: 100%;
+        height: auto;
+      }
+    }
+  }
 }
\ No newline at end of file