Improve playlist element style
authorChocobozzz <me@florianbigard.com>
Fri, 5 Apr 2019 13:23:41 +0000 (15:23 +0200)
committerChocobozzz <me@florianbigard.com>
Fri, 5 Apr 2019 13:23:41 +0000 (15:23 +0200)
client/src/app/+my-account/my-account-video-playlists/my-account-video-playlist-elements.component.html
client/src/app/shared/video-playlist/video-playlist-element-miniature.component.scss
client/src/app/shared/video-playlist/video-playlist-element-miniature.component.ts
client/src/app/shared/video-playlist/video-playlist-miniature.component.html
client/src/app/shared/video-playlist/video-playlist-miniature.component.scss
client/src/app/videos/+video-watch/video-watch.component.scss

index 95d4519fa7474574746ced052b392d2cf4452753..284694b7fd1339d0049d008b8b3e6b5cad091761 100644 (file)
@@ -7,7 +7,7 @@
     ></my-video-playlist-miniature>
   </div>
 
-  <div class="col-xs-12 col-md-7 col-xl-9">
+  <div class="playlist-elements col-xs-12 col-md-7 col-xl-9">
     <div i18n class="no-results" *ngIf="pagination.totalItems === 0">No videos in this playlist.</div>
 
     <div
index f57fd2e1cadfbb3ffb160970555eb758c3f947c4..f8a068cbc4a5b076306c345f92064f95a6f99751 100644 (file)
@@ -13,7 +13,7 @@
     background-color: rgba(0, 0, 0, 0.05);
 
     .more {
-      display: block;
+      opacity: 1;
     }
   }
 
   a {
     @include disable-default-a-behaviour;
 
-    min-width: 0;
     display: flex;
+    min-width: 0;
     align-items: center;
     cursor: pointer;
-    flex-grow: 1;
 
     .position {
       font-weight: $font-semibold;
@@ -55,6 +54,7 @@
     .video-info {
       display: flex;
       flex-direction: column;
+      align-self: flex-start;
       min-width: 0;
 
       a {
@@ -69,6 +69,7 @@
       .video-info-name {
         font-size: 18px;
         font-weight: $font-semibold;
+        display: inline-block;
 
         @include ellipsis;
       }
     justify-self: flex-end;
     margin-left: auto;
     cursor: pointer;
-    display: none;
+    opacity: 0;
 
     &.show {
-      display: block;
+      opacity: 1;
     }
 
     .icon-more {
index 6cc5b87b4ac6d897ae7c0e15b591d1ba5d5ee633..57990707a3a38b9ab7efe1cdce2a15c4b4f6d87f 100644 (file)
@@ -1,4 +1,4 @@
-import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, Output, ViewChild } from '@angular/core'
+import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output, ViewChild } from '@angular/core'
 import { Video } from '@app/shared/video/video.model'
 import { VideoPlaylistElementUpdate } from '@shared/models'
 import { AuthService, ConfirmService, Notifier, ServerService } from '@app/core'
index faf906c593ec1e7b30e4214108a38cb4f89c3ffb..86f6664cbcb595f2bf461d8c6e04c1125f51b1bf 100644 (file)
       {{ playlist.displayName }}
     </a>
 
-    <div class="video-info-privacy" *ngIf="displayPrivacy">{{ playlist.privacy.label }}</div>
+    <a i18n [routerLink]="[ '/video-channels', playlist.videoChannelBy ]" class="by" *ngIf="displayChannel && playlist.videoChannelBy">
+      {{ playlist.videoChannelBy }}
+    </a>
 
-    <div class="video-info-by-date">
-      <a i18n [routerLink]="[ '/video-channels', playlist.videoChannelBy ]" class="by" *ngIf="displayChannel && playlist.videoChannelBy">
-        {{ playlist.videoChannelBy }}
-      </a>
+    <div class="privacy-date">
+      <span class="video-info-privacy" *ngIf="displayPrivacy">{{ playlist.privacy.label }}</span>
 
-      <div i18n class="updated-at">Updated {{ playlist.updatedAt | myFromNow }}</div>
+      <span i18n class="updated-at">Updated {{ playlist.updatedAt | myFromNow }}</span>
     </div>
 
     <div *ngIf="displayDescription" class="video-info-description">{{ playlist.description }}</div>
index 94edd11778e26fecaf3939eb818bbf8fa16f1a83..8947e72d1310255c56379c1a9d3b70d1535d5ac3 100644 (file)
 
     .miniature-name {
       @include miniature-name;
+
+      @include ellipsis-multiline(1.3em, 2);
+
+      margin: 0;
     }
 
-    .video-info-by-date {
-      display: flex;
-      font-size: 13px;
-      margin: 5px 0;
+    .by {
+      @include disable-default-a-behaviour;
 
-      .by {
-        @include disable-default-a-behaviour;
+      display: block;
+      color: $grey-foreground-color;
+    }
 
-        display: block;
-        color: var(--mainForegroundColor);
+    .privacy-date {
+      margin-top: 5px;
+
+      .video-info-privacy {
+        font-size: 14px;
+        font-weight: $font-semibold;
 
         &::after {
           content: '-';
       }
     }
 
-    .video-info-privacy {
-      font-size: 13px;
-      font-weight: $font-semibold;
-    }
-
     .video-info-description {
       margin-top: 10px;
       color: $grey-foreground-color;
index c1eaf9b2b0d192917ae880bf48bd15a06abe941f..d61a0bc3ee180949a01b36e6145b257cb43d312d 100644 (file)
@@ -16,6 +16,8 @@ $player-factor: 1.7; // 16/9
 
 @mixin playlist-below-player {
   width: 100%;
+  height: auto;
+  max-height: 300px;
   border-bottom: 1px solid $separator-border-color;
 }
 
@@ -51,6 +53,12 @@ $player-factor: 1.7; // 16/9
   justify-content: center;
   margin: 0 -15px;
 
+  #videojs-wrapper {
+    display: flex;
+    justify-content: center;
+    flex-grow: 1;
+  }
+
   .remote-server-down {
     color: #fff;
     display: flex;
@@ -73,10 +81,12 @@ $player-factor: 1.7; // 16/9
   }
 
   .playlist {
-    width: 400px;
+    min-width: 200px;
+    max-width: 470px;
     height: 66vh;
     background-color: var(--mainBackgroundColor);
     overflow-y: auto;
+    border-bottom: 1px solid $separator-border-color;
 
     .playlist-info {
       padding: 5px 30px;
@@ -492,6 +502,15 @@ my-video-comments {
 }
 
 @media screen and (max-width: 1100px) {
+  #video-wrapper {
+    flex-direction: column;
+    justify-content: center;
+
+    .playlist {
+      @include playlist-below-player;
+    }
+  }
+
   .video-bottom {
     flex-direction: column;
 
@@ -506,22 +525,6 @@ my-video-comments {
   }
 }
 
-@media screen and (max-width: 900px) {
-  #video-wrapper {
-    flex-direction: column;
-    justify-content: center;
-
-    #videojs-wrapper {
-      display: flex;
-      justify-content: center;
-    }
-
-    .playlist {
-      @include playlist-below-player;
-    }
-  }
-}
-
 @media screen and (max-width: 600px) {
   .video-bottom {
     margin: 20px 0 0 0 !important;