]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Improve abstract videos list
authorChocobozzz <me@florianbigard.com>
Wed, 3 Apr 2019 11:25:52 +0000 (13:25 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 3 Apr 2019 11:25:52 +0000 (13:25 +0200)
Better responsive and align miniatures to the left

client/src/app/shared/video/abstract-video-list.scss
client/src/app/shared/video/video-miniature.component.scss
client/src/app/videos/+video-watch/video-watch.component.scss
client/src/sass/include/_miniature.scss
client/src/sass/include/_variables.scss

index 65842af35f71a037692845aa0830c5ac855f161c..a1d9168de8760116c868f5154abc2fb69f21a384 100644 (file)
@@ -1,14 +1,6 @@
 @import '_mixins';
 @import '_miniature';
 
-.videos {
-  text-align: center;
-
-  my-video-miniature {
-    text-align: left;
-  }
-}
-
 .videos-header {
   display: flex;
   height: 80px;
   }
 }
 
-@media screen and (max-width: 500px) {
-  .videos {
-    @include video-miniature-small-screen;
+.margin-content {
+  width: $video-miniature-width * 6;
+  margin: auto;
+
+  @media screen and (max-width: 1800px) {
+    width: $video-miniature-width * 5;
+  }
+
+  @media screen and (max-width: 1800px - $video-miniature-width) {
+    width: $video-miniature-width * 4;
+  }
+
+  @media screen and (max-width: 1800px - (2* $video-miniature-width)) {
+    width: $video-miniature-width * 3;
+  }
+
+  @media screen and (max-width: 1800px - (3* $video-miniature-width)) {
+    width: $video-miniature-width * 2;
+  }
+
+  @media screen and (max-width: 500px) {
+    width: auto;
+    margin: 0 !important;
+
+    .videos {
+      @include video-miniature-small-screen;
+    }
   }
 }
+
index 7d857a74e4c8c6e5a68b49563a3de46b7d65276a..4799e00c240dcf9ed46064f89b4cc1e92c8340e2 100644 (file)
@@ -3,8 +3,9 @@
 @import '_miniature';
 
 .video-miniature {
+  width: $video-miniature-width;
+
   display: inline-block;
-  padding-right: 15px;
   margin-bottom: 30px;
   height: 195px;
   vertical-align: top;
index 11406e88702c61ee765ce139d451442677dacccd..2874847cd31c2d6f26487197eae03bd00a69941a 100644 (file)
@@ -20,8 +20,6 @@ $player-factor: 1.7; // 16/9
 }
 
 .root {
-  margin: 0 -15px;
-
   &.theater-enabled #video-wrapper {
     flex-direction: column;
     justify-content: center;
@@ -51,6 +49,7 @@ $player-factor: 1.7; // 16/9
   background-color: #000;
   display: flex;
   justify-content: center;
+  margin: 0 -15px;
 
   .remote-server-down {
     color: #fff;
@@ -531,7 +530,7 @@ my-video-comments {
 
 @media screen and (max-width: 600px) {
   .video-bottom {
-    margin: 20px 0 0 0;
+    margin: 20px 0 0 0 !important;
 
     .video-info {
       padding: 0;
index 95b7592251315edd6938fef559f2f5738f3f460b..2ea4aa105614abd45ee54bdfa0fc57d386f7570d 100644 (file)
@@ -121,6 +121,7 @@ $play-overlay-width: 18px;
 
     .video-miniature-information {
       width: 100% !important;
+      text-align: left;
 
       span {
         width: 100%;
@@ -128,8 +129,9 @@ $play-overlay-width: 18px;
     }
 
     .video-thumbnail {
-      width: 100%;
+      width: calc(100% + 30px);
       height: auto;
+      margin: 0 -15px;
 
       img {
         width: 100%;
index b8eb06f2ce95c2e51f05c585320745391836237d..0e71a18673180785e65bc3384b2cfc1018b7e673 100644 (file)
@@ -46,6 +46,7 @@ $footer-border-color: $header-border-color;
 
 $separator-border-color: rgba(0, 0, 0, 0.10);
 
+$video-miniature-width: 238px;
 $video-thumbnail-height: 122px;
 $video-thumbnail-width: 223px;