2 rows per overview section
authorChocobozzz <me@florianbigard.com>
Fri, 5 Apr 2019 15:00:09 +0000 (17:00 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 5 Apr 2019 15:00:09 +0000 (17:00 +0200)
client/src/app/shared/video/video-miniature.component.scss
client/src/app/videos/video-list/video-overview.component.scss
server/controllers/api/overviews.ts

index fa2739f005d26d280a3e60f96087ba7dbdb58037..80d6c4fdaa9ba366f584805ff336597b350492d3 100644 (file)
   height: 195px;
   vertical-align: top;
 
-  .video-miniature-information {
-    width: 200px;
-    line-height: normal;
+  .video-bottom {
+    display: flex;
 
-    .video-miniature-name {
-      @include miniature-name;
-    }
+    .video-miniature-information {
+      width: 200px;
+      line-height: normal;
 
-    .video-miniature-created-at-views {
-      display: block;
-      font-size: 13px;
-    }
+      .video-miniature-name {
+        @include miniature-name;
+      }
 
-    .video-miniature-account,
-    .video-miniature-channel {
-      @include disable-default-a-behaviour;
-      @include ellipsis;
+      .video-miniature-created-at-views {
+        display: block;
+        font-size: 13px;
+      }
 
-      display: block;
-      font-size: 13px;
-      color: $grey-foreground-color;
+      .video-miniature-account,
+      .video-miniature-channel {
+        @include disable-default-a-behaviour;
+        @include ellipsis;
 
-      &:hover {
-        color: $grey-foreground-hover-color;
+        display: block;
+        font-size: 13px;
+        color: $grey-foreground-color;
+
+        &:hover {
+          color: $grey-foreground-hover-color;
+        }
       }
-    }
 
-    .video-info-privacy,
-    .video-info-blacklisted .blacklisted-label,
-    .video-info-nsfw {
-      font-weight: $font-semibold;
-    }
+      .video-info-privacy,
+      .video-info-blacklisted .blacklisted-label,
+      .video-info-nsfw {
+        font-weight: $font-semibold;
+      }
 
-    .video-info-blacklisted {
-      color: red;
+      .video-info-blacklisted {
+        color: red;
 
-      .blacklisted-reason::before {
-        content: ' - ';
+        .blacklisted-reason::before {
+          content: ' - ';
+        }
       }
-    }
 
-    .video-info-nsfw {
-      color: red;
+      .video-info-nsfw {
+        color: red;
+      }
     }
-  }
-
-  .video-bottom {
-    display: flex;
 
     .video-actions {
       margin-top: 3px;
       margin-right: 10px;
-    }
 
-    /deep/ .dropdown-root:not(.show) {
-      display: none;
-    }
+      /deep/ .dropdown-root:not(.show) {
+        display: none;
+      }
 
-    &:hover /deep/ .dropdown-root {
-      display: block;
+      /deep/ .playlist-dropdown.show + my-action-dropdown .dropdown-root {
+        display: block;
+      }
     }
 
-    /deep/ .playlist-dropdown.show + my-action-dropdown .dropdown-root {
+    &:hover .video-actions /deep/ .dropdown-root {
       display: block;
     }
 
     @media screen and (max-width: $small-view) {
-      .video-actions {
-        margin-right: 0;
+      .video-miniature-information .video-miniature-name {
+        margin-top: 0;
       }
 
-      /deep/ .dropdown-root {
-        display: block !important;
+      .video-actions {
+        margin: 0;
+        top: -3px;
+
+        /deep/ .dropdown-root {
+          display: block !important;
+        }
       }
     }
   }
       margin-right: 10px;
     }
 
-    .video-miniature-information {
-      width: auto;
-      min-width: 500px;
-
-      .video-miniature-name {
-        @include ellipsis-multiline(1.3em, 2);
-
-        margin-top: 2px;
-        margin-bottom: 5px;
-      }
-
-      .video-miniature-created-at-views,
-      .video-miniature-account,
-      .video-miniature-channel {
-        font-size: 14px;
-        width: fit-content;
-      }
-
-      .video-info-privacy {
-        margin-top: 5px;
+    .video-bottom {
+      .video-miniature-information {
+        width: auto;
+        min-width: 500px;
+
+        .video-miniature-name {
+          @include ellipsis-multiline(1.3em, 2);
+
+          margin-top: 2px;
+          margin-bottom: 5px;
+        }
+
+        .video-miniature-created-at-views,
+        .video-miniature-account,
+        .video-miniature-channel {
+          font-size: 14px;
+          width: fit-content;
+        }
+
+        .video-info-privacy {
+          margin-top: 5px;
+        }
+
+        .video-info-blacklisted {
+          margin-top: 3px;
+        }
       }
 
-      .video-info-blacklisted {
-        margin-top: 3px;
+      .video-actions {
+        margin: 0;
+        top: -3px;
       }
     }
 
-    .video-bottom .video-actions {
-      margin: 0;
-      top: -3px;
-    }
-
     @media screen and (max-width: $small-view) {
       flex-direction: column;
       height: auto;
index 42b542233031e5b3cad7c9aa6ccb1c6cf742d3a8..a24766783e198faffe3739357d0b0320e8421572 100644 (file)
@@ -3,6 +3,8 @@
 @import '_miniature';
 
 .section {
+  max-height: 500px; // 2 rows max
+  overflow: hidden;
   padding-top: 10px;
 
   &:first-child {
 }
 
 @media screen and (max-width: 500px) {
+  .margin-content {
+    margin: 0 !important;
+  }
+
   .section-title {
     font-size: 17px;
   }
 
   .section {
+    max-height: initial;
+    overflow: initial;
+
     @include video-miniature-small-screen;
   }
 }
index 8b67730565d99224d68d290e3b0e99ad24e4a18f..b052acdb7485282c37d97fa4a9f87dcb6c326b0e 100644 (file)
@@ -94,7 +94,7 @@ async function getVideos (
 ) {
   const query = Object.assign({
     start: 0,
-    count: 10,
+    count: 12,
     sort: '-createdAt',
     includeLocalVideos: true,
     nsfw: buildNSFWFilter(res),