]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Relax watch CSS
authorChocobozzz <me@florianbigard.com>
Wed, 30 Jun 2021 06:50:20 +0000 (08:50 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 30 Jun 2021 06:50:20 +0000 (08:50 +0200)
client/src/app/+videos/+video-watch/video-watch.component.scss
client/src/app/shared/shared-video-miniature/video-miniature.component.html

index 1d83fa139ea30dd45f8d59101e3d80967f3945ee..ee74cb0b0fb419428e7832ad5875c197e5d0ed0b 100644 (file)
@@ -4,6 +4,8 @@
 @use '_bootstrap-variables';
 @use '_miniature' as *;
 
+$video-height: 66vh;
+
 @function getPlayerHeight ($width) {
   @return calc(#{$width} / #{$video-watch-player-factor});
 }
   border-bottom: 1px solid $separator-border-color !important;
 }
 
+.blocked-label {
+  font-weight: $font-semibold;
+}
+
+.placeholder-image {
+  height: 100%;
+}
+
+.alert {
+  text-align: center;
+  border-radius: 0;
+}
+
+.flex-direction-column {
+  flex-direction: column;
+}
+
 .root {
   &.theater-enabled #video-wrapper {
     $height: calc(100vh - #{$header-height} - #{$theater-bottom-space});
   }
 }
 
-.blocked-label {
-  font-weight: $font-semibold;
-}
-
-.placeholder-image {
-  height: 100%;
-}
-
 #video-wrapper {
-  $video-height: 66vh;
-
   background-color: #000;
   display: flex;
   justify-content: center;
 
-  #videojs-wrapper {
-    display: flex;
-    justify-content: center;
-    flex-grow: 1;
-    height: $video-height;
-  }
-
-  .remote-server-down {
-    color: #fff;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    text-align: center;
-    justify-content: center;
-    background-color: #141313;
-    width: 100%;
-    font-size: 24px;
-    height: 500px;
-
-    @media screen and (max-width: 1000px) {
-      font-size: 20px;
-    }
-
-    @media screen and (max-width: 600px) {
-      font-size: 16px;
-    }
-  }
-
   ::ng-deep .video-js {
     width: 100%;
-    max-width: getPlayerWidth(66vh);
+    max-width: getPlayerWidth($video-height);
     height: $video-height;
 
     // VideoJS create an inner video player
       position: relative !important;
     }
   }
-
-  @media screen and (max-width: 600px) {
-    #videojs-wrapper {
-      height: getPlayerHeight(100vw) !important;
-    }
-
-    .remote-server-down,
-    ::ng-deep .video-js {
-      width: 100vw;
-      height: getPlayerHeight(100vw) !important;
-    }
-  }
 }
 
-.alert {
-  text-align: center;
-  border-radius: 0;
+#videojs-wrapper {
+  display: flex;
+  justify-content: center;
+  flex-grow: 1;
+  height: $video-height;
 }
 
-.flex-direction-column {
+.remote-server-down {
+  color: #fff;
+  display: flex;
   flex-direction: column;
+  align-items: center;
+  text-align: center;
+  justify-content: center;
+  background-color: #141313;
+  width: 100%;
+  font-size: 24px;
+  height: 500px;
+
+  @media screen and (max-width: 1000px) {
+    font-size: 20px;
+  }
+
+  @media screen and (max-width: 600px) {
+    font-size: 16px;
+  }
 }
 
 #video-not-found {
 .video-bottom {
   display: flex;
   margin-top: 1.5rem;
+}
 
-  .video-info {
+.video-info {
+  flex-grow: 1;
+  // Set min width for flex item
+  min-width: 1px;
+  max-width: 100%;
+}
+
+.video-info-first-row {
+  display: flex;
+
+  > div:first-child {
     flex-grow: 1;
-    // Set min width for flex item
-    min-width: 1px;
-    max-width: 100%;
-
-    .video-info-first-row {
-      display: flex;
-
-      > div:first-child {
-        flex-grow: 1;
-      }
-
-      .video-info-name {
-        @include peertube-word-wrap;
-
-        @include margin-right(30px);
-
-        min-height: 40px; // Align with the action buttons
-        font-size: 27px;
-        font-weight: $font-semibold;
-        flex-grow: 1;
-      }
-
-      .video-info-first-row-bottom {
-        display: flex;
-        flex-wrap: wrap;
-        align-items: center;
-        width: 100%;
-      }
-
-      .video-info-date-views {
-        @include margin-right(10px);
-
-        margin-bottom: 10px;
-        align-self: start;
-        font-size: 1em;
-      }
-
-      .video-info-channel {
-        font-weight: $font-semibold;
-        font-size: 15px;
-
-        a {
-          @include disable-default-a-behaviour;
-          @include peertube-word-wrap;
-
-          color: pvar(--mainForegroundColor);
-
-          &:hover {
-            opacity: 0.8;
-          }
-        }
-
-        .video-info-channel-left {
-          flex-grow: 1;
-
-          .video-info-channel-left-links {
-            display: flex;
-            flex-direction: column;
-            position: relative;
-            line-height: 1.37;
-
-            a:nth-of-type(2) {
-              font-weight: $font-regular;
-              font-size: 90%;
-            }
-
-            a.single-link {
-              margin-top: 7px;
-            }
-          }
-        }
-
-        my-subscribe-button {
-          @include margin-left(5px);
-        }
-      }
+  }
+}
+
+.video-info-name {
+  @include peertube-word-wrap;
+
+  @include margin-right(30px);
+
+  min-height: 40px; // Align with the action buttons
+  font-size: 27px;
+  font-weight: $font-semibold;
+  flex-grow: 1;
+}
+
+.video-info-first-row-bottom {
+  display: flex;
+  flex-wrap: wrap;
+  align-items: center;
+  width: 100%;
+}
+
+.video-info-date-views {
+  @include margin-right(10px);
+
+  margin-bottom: 10px;
+  align-self: start;
+  font-size: 1em;
+}
+
+.video-info-channel {
+  font-weight: $font-semibold;
+  font-size: 15px;
+
+  a {
+    @include disable-default-a-behaviour;
+    @include peertube-word-wrap;
+
+    color: pvar(--mainForegroundColor);
+
+    &:hover {
+      opacity: 0.8;
+    }
+  }
+}
+
+.video-info-channel-left {
+  flex-grow: 1;
+
+  .video-info-channel-left-links {
+    display: flex;
+    flex-direction: column;
+    position: relative;
+    line-height: 1.37;
+
+    a:nth-of-type(2) {
+      font-weight: $font-regular;
+      font-size: 90%;
     }
 
-    .video-attributes {
-      @include margin-left($video-watch-info-margin-left);
+    a.single-link {
+      margin-top: 7px;
     }
+  }
+}
+
+my-subscribe-button {
+  @include margin-left(5px);
+}
+
+.video-attributes {
+  @include margin-left($video-watch-info-margin-left);
+
+  .video-attribute {
+    font-size: 13px;
+    display: block;
+    margin-bottom: 12px;
+  }
+}
+
+.video-attribute-label {
+  @include padding-right(5px);
 
-    .video-attributes .video-attribute {
-      font-size: 13px;
-      display: block;
-      margin-bottom: 12px;
-
-      .video-attribute-label {
-        @include padding-right(5px);
-
-        min-width: 142px;
-        display: inline-block;
-        color: pvar(--greyForegroundColor);
-        font-weight: $font-bold;
-      }
-
-      a.video-attribute-value {
-        @include disable-default-a-behaviour;
-        color: pvar(--mainForegroundColor);
-
-        &:hover {
-          opacity: 0.9;
-        }
-      }
-
-      &.video-attribute-tags {
-        .video-attribute-value:not(:nth-child(2)) {
-          &::before {
-            content: ', ';
-          }
-        }
-      }
+  min-width: 142px;
+  display: inline-block;
+  color: pvar(--greyForegroundColor);
+  font-weight: $font-bold;
+}
+
+a.video-attribute-value {
+  @include disable-default-a-behaviour;
+  color: pvar(--mainForegroundColor);
+
+  &:hover {
+    opacity: 0.9;
+  }
+}
+
+.video-attribute-tags {
+  .video-attribute-value:not(:nth-child(2)) {
+    &::before {
+      content: ', ';
     }
   }
 }
@@ -278,7 +266,7 @@ my-video-comments {
 }
 
 @media screen and (max-width: 1600px) {
-  .video-bottom .video-info .video-attributes .video-attribute {
+  .video-attributes .video-attribute {
     margin-bottom: 5px;
   }
 }
@@ -304,35 +292,38 @@ my-video-comments {
 }
 
 @media screen and (max-width: 600px) {
+  #videojs-wrapper {
+    height: getPlayerHeight(100vw) !important;
+
+    .remote-server-down,
+    ::ng-deep .video-js {
+      width: 100vw;
+      height: getPlayerHeight(100vw) !important;
+    }
+  }
+
   .video-bottom {
     margin-top: 20px !important;
     padding-bottom: 20px !important;
+  }
 
-    .video-info {
-      padding: 0;
-
-      .video-info-first-row {
+  .video-info {
+    padding: 0;
+  }
 
-        .video-info-name {
-          font-size: 20px;
-          height: auto;
-        }
-      }
-    }
+  .video-info-name {
+    font-size: 20px;
+    height: auto;
   }
 }
 
 @media screen and (max-width: 450px) {
-  .video-bottom {
-    .video-info .video-info-first-row {
-      .video-info-name {
-        font-size: 18px;
-      }
-
-      .video-info-date-views {
-        font-size: 14px;
-      }
-    }
+  .video-info-name {
+    font-size: 18px;
+  }
+
+  .video-info-date-views {
+    font-size: 14px;
   }
 
   my-action-buttons {
@@ -340,7 +331,6 @@ my-video-comments {
   }
 }
 
-
 // Special case for iOS, that takes into account the width for fullscreens
 #video-wrapper ::ng-deep .video-js.vjs-fullscreen {
   max-width: unset;
index 7765d5be702ee05c58e8b9cf9c48011b8c45ad36..f51c298f20a34af9311813fff42b078b0332f4f0 100644 (file)
     <div class="video-miniature-information">
       <div class="d-flex video-miniature-meta">
         <my-actor-avatar
-          *ngIf="displayOptions.avatar && displayOwnerVideoChannel()" [title]="channelLinkTitle"
+          *ngIf="displayOptions.avatar && displayOwnerVideoChannel() && !displayAsRow" [title]="channelLinkTitle"
           [channel]="video.channel" [size]="actorImageSize" [internalHref]="[ '/c', video.byVideoChannel ]"
         ></my-actor-avatar>
 
         <my-actor-avatar
-          *ngIf="displayOptions.avatar && displayOwnerAccount()" [title]="channelLinkTitle"
+          *ngIf="displayOptions.avatar && displayOwnerAccount() && !displayAsRow" [title]="channelLinkTitle"
           [account]="video.account" [size]="actorImageSize" [internalHref]="[ '/c', video.byVideoChannel ]"
         ></my-actor-avatar>