]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/+videos/+video-watch/video-watch.component.scss
Fix live image aspect ratio in theatre mode
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / video-watch.component.scss
index a676052173a11a76bac1025047f1f5598cfaf5cc..af807a208b40d0a40473b3ddadaf8875f8b66916 100644 (file)
@@ -3,15 +3,15 @@
 @import '_bootstrap-variables';
 @import '_miniature';
 
-$player-factor: 1.7; // 16/9
+$player-factor: 16/9;
 $video-info-margin-left: 44px;
 
-@function getPlayerHeight($width){
-  @return calc(#{$width} / #{$player-factor})
+@function getPlayerHeight ($width) {
+  @return calc(#{$width} / #{$player-factor});
 }
 
-@function getPlayerWidth($height){
-  @return calc(#{$height} * #{$player-factor})
+@function getPlayerWidth ($height) {
+  @return calc(#{$height} * #{$player-factor});
 }
 
 @mixin playlist-below-player {
@@ -24,11 +24,11 @@ $video-info-margin-left: 44px;
 
 .root {
   &.theater-enabled #video-wrapper {
+    $height: calc(100vh - #{$header-height} - #{$theater-bottom-space});
+
     flex-direction: column;
     justify-content: center;
 
-    $height: calc(100vh - #{$header-height} - #{$theater-bottom-space});
-
     #videojs-wrapper {
       width: 100%;
       height: $height;
@@ -50,6 +50,10 @@ $video-info-margin-left: 44px;
   font-weight: $font-semibold;
 }
 
+.placeholder-image {
+  height: 100%;
+}
+
 #video-wrapper {
   $video-height: 66vh;
 
@@ -141,11 +145,13 @@ $video-info-margin-left: 44px;
     .video-info-first-row {
       display: flex;
 
-      > div:first-child {
+      > div:first-child {
         flex-grow: 1;
       }
 
       .video-info-name {
+        @include peertube-word-wrap;
+
         margin-right: 30px;
         min-height: 40px; // Align with the action buttons
         font-size: 27px;
@@ -173,6 +179,7 @@ $video-info-margin-left: 44px;
 
         a {
           @include disable-default-a-behaviour;
+          @include peertube-word-wrap;
 
           color: pvar(--mainForegroundColor);
 
@@ -206,13 +213,8 @@ $video-info-margin-left: 44px;
         }
       }
 
-      my-feed {
-        margin-left: 5px;
-        margin-top: 1px;
-      }
-
       .video-actions-rates {
-        margin: 0 0 10px 0;
+        margin: 0 0 10px;
         align-items: start;
         width: max-content;
         margin-left: auto;
@@ -236,7 +238,7 @@ $video-info-margin-left: 44px;
             font-size: 100%;
             font-weight: $font-semibold;
             display: inline-block;
-            padding: 0 10px 0 10px;
+            padding: 0 10px;
             white-space: nowrap;
             background-color: transparent !important;
             color: pvar(--actionButtonColor);
@@ -351,7 +353,8 @@ $video-info-margin-left: 44px;
         }
       }
 
-      .glyphicon, .description-loading {
+      .glyphicon,
+      .description-loading {
         margin-left: 3px;
       }
 
@@ -401,43 +404,18 @@ $video-info-margin-left: 44px;
       &.video-attribute-tags {
         .video-attribute-value:not(:nth-child(2)) {
           &::before {
-            content: ', '
+            content: ', ';
           }
         }
       }
     }
   }
+}
 
-  ::ng-deep .other-videos {
-    padding-left: 15px;
-    min-width: $video-miniature-width;
-
-    @media screen and (min-width: 1800px - (3* $video-miniature-width)) {
-      width: min-content;
-    }
-
-    .title-page {
-      margin: 0 !important;
-    }
-
-    .video-miniature {
-      display: flex;
-      width: max-content;
-      height: 100%;
-      padding-bottom: 20px;
-      flex-wrap: wrap;
-    }
-
-    .video-bottom {
-      @media screen and (max-width: 1800px - (3* $video-miniature-width)) {
-        margin-left: 1rem;
-      }
-      @media screen and (max-width: 500px) {
-        margin-left: 0;
-        margin-top: .5rem;
-      }
-    }
-  }
+my-recommended-videos {
+  display: block;
+  padding-left: 15px;
+  min-width: 250px;
 }
 
 my-video-comments {
@@ -531,6 +509,7 @@ my-video-comments {
   }
 }
 
+// Use the same breakpoint than in the typescript component to display the other video miniatures as row
 @media screen and (max-width: 1100px) {
   #video-wrapper {
     flex-direction: column;
@@ -543,15 +522,10 @@ my-video-comments {
 
   .video-bottom {
     flex-direction: column;
+  }
 
-    ::ng-deep .other-videos {
-      padding-left: 0 !important;
-
-      ::ng-deep .video-miniature  {
-        flex-direction: row;
-        width: auto;
-      }
-    }
+  my-recommended-videos {
+    padding-left: 0;
   }
 }
 
@@ -573,10 +547,6 @@ my-video-comments {
     }
   }
 
-  ::ng-deep .other-videos .video-miniature  {
-    flex-direction: column;
-  }
-
   .privacy-concerns {
     width: 100%;
   }