]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/sass/include/_miniature.scss
allow sorting notifications
[github/Chocobozzz/PeerTube.git] / client / src / sass / include / _miniature.scss
index 4a1780b3f8ecbcc6cc9151b69da36f4392c13332..976bbf4d68b1b47e5334e5517610a9fe43e72683 100644 (file)
@@ -6,7 +6,7 @@
 
   transition: color 0.2s;
   font-weight: $font-semibold;
-  color: var(--mainForegroundColor);
+  color: pvar(--mainForegroundColor);
   margin-top: 10px;
   margin-bottom: 5px;
 
@@ -45,7 +45,7 @@ $play-overlay-width: 18px;
     width: inherit;
     height: inherit;
     opacity: 0;
-    background-color: rgba(0, 0, 0, 0.7);
+    background-color: rgba(0, 0, 0, 0.3);
 
     &, .icon {
       transition: all $play-overlay-transition;
@@ -80,7 +80,8 @@ $play-overlay-width: 18px;
   }
 
   &.focus-visible {
-    box-shadow: 0 0 0 2px var(--mainColor);
+    box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
+    outline: none;
   }
 
   img {
@@ -107,38 +108,6 @@ $play-overlay-width: 18px;
   color: #fff;
 }
 
-@mixin video-miniature-small-screen {
-  text-align: center;
-
-  ::ng-deep .video-miniature {
-    padding-right: 0;
-    height: auto;
-    width: 100%;
-    margin-bottom: 20px;
-
-    .video-miniature-information {
-      width: 100% !important;
-      text-align: left;
-
-      span {
-        width: 100%;
-      }
-    }
-
-    .video-thumbnail {
-      margin: 0 -15px 10px -15px;
-      width: 100vw;
-      height: calc(100vw / #{$video-thumbnail-ratio});
-      border-radius: 0;
-
-      img {
-        width: 100%;
-        height: 100%;
-      }
-    }
-  }
-}
-
 @mixin miniature-rows {
   &:first-child {
     padding-top: 30px;
@@ -148,10 +117,6 @@ $play-overlay-width: 18px;
     }
   }
 
-  my-video-miniature {
-    text-align: left;
-  }
-
   .section-title {
     font-size: 24px;
     font-weight: $font-semibold;
@@ -159,7 +124,10 @@ $play-overlay-width: 18px;
     margin-bottom: 15px;
     display: flex;
     justify-content: space-between;
-    border-top: 1px solid $separator-border-color;
+
+    &:not(h2) {
+      border-top: 1px solid $separator-border-color;
+    }
 
     a {
       &:hover, &:focus:not(.focus-visible), &:active {
@@ -167,7 +135,7 @@ $play-overlay-width: 18px;
         outline: none;
       }
 
-      color: var(--mainForegroundColor);
+      color: pvar(--mainForegroundColor);
     }
   }
 
@@ -186,7 +154,7 @@ $play-overlay-width: 18px;
       }
 
       .followers {
-        color: $grey-foreground-color;
+        color: pvar(--greyForegroundColor);
         font-weight: normal;
         font-size: 14px;
         margin-left: 10px;
@@ -202,7 +170,7 @@ $play-overlay-width: 18px;
     display: inline-block;
     font-size: 16px;
     text-transform: uppercase;
-    color: $grey-foreground-color;
+    color: pvar(--greyForegroundColor);
     margin-bottom: 10px;
     font-weight: $font-semibold;
     text-decoration: none;
@@ -212,40 +180,82 @@ $play-overlay-width: 18px;
     max-height: initial;
     overflow: initial;
 
-    @include video-miniature-small-screen;
-
     .section-title {
       font-size: 17px;
+      margin-left: 10px;
     }
   }
 }
 
-@mixin adapt-margin-content-width {
-  width: $video-miniature-width * 6;
-  margin: auto !important;
+@mixin fluid-videos-miniature-layout {
+  margin-left: $not-expanded-horizontal-margins !important;
+  margin-right: $not-expanded-horizontal-margins !important;
 
-  @media screen and (max-width: 1800px) {
-    width: $video-miniature-width * 5;
-  }
+  @media screen and (max-width: $mobile-view) {
+    width: auto;
+    margin: 0 !important;
 
-  @media screen and (max-width: 1800px - $video-miniature-width) {
-    width: $video-miniature-width * 4;
-  }
+    .videos {
+      text-align: center;
+
+      ::ng-deep .video-miniature {
+        padding-right: 0;
+        height: auto;
+        width: 100%;
+        margin-bottom: 25px;
+
+        .video-miniature-information {
+          width: 100% !important;
+          text-align: left;
 
-  @media screen and (max-width: 1800px - (2* $video-miniature-width)) {
-    width: $video-miniature-width * 3;
+          span {
+            width: 100%;
+          }
+        }
+
+        .video-thumbnail {
+          border-radius: 0;
+        }
+      }
+    }
   }
 
-  @media screen and (max-width: 1800px - (3* $video-miniature-width)) {
-    width: $video-miniature-width * 2;
+  @media screen and (min-width: #{breakpoint(fhd)}) {
+    margin-left: 6vw !important;
+    margin-right: 6vw !important;
   }
 
-  @media screen and (max-width: 500px) {
-    width: auto;
-    margin: 0 !important;
+  @media screen and (min-width: $mobile-view) {
 
     .videos {
-      @include video-miniature-small-screen;
+      --miniature-min-width: #{$video-thumbnail-width - 15px};
+      --miniature-max-width: #{$video-thumbnail-width};
+
+      display: grid;
+      column-gap: 5px;
+      grid-template-columns: repeat(
+        auto-fill,
+        minmax(
+          var(--miniature-min-width),
+          1fr
+        )
+      );
+
+      @media screen and (min-width: #{breakpoint(fhd)}) {
+        column-gap: 1%;
+        --miniature-min-width: #{$video-thumbnail-width};
+      }
+
+      .video-wrapper {
+        margin: 0 auto;
+        width: 100%;
+
+        my-video-miniature {
+          display: block;
+          min-width: var(--miniature-min-width);
+          max-width: var(--miniature-max-width);
+        }
+      }
     }
   }
 }