]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/search/search.component.scss
Add explicit step and aria-current attribute in register form
[github/Chocobozzz/PeerTube.git] / client / src / app / search / search.component.scss
index e0509ee15807440da5f4ce56d07d1852f6994290..6e59adb600d4890fb68861cb861567791eea05c7 100644 (file)
         }
       }
     }
-
-    .results-filter {
-      // Animation when we show/hide the filters
-      transition: max-height 0.3s;
-      display: block !important;
-      overflow: hidden !important;
-      max-height: 0;
-
-      &.show {
-        max-height: 1500px;
-      }
-    }
   }
 
   .entry {
     padding-bottom: 20px;
     margin-bottom: 20px;
 
-    &.video {
-
-      my-video-thumbnail {
-        margin-right: 10px;
-      }
-
-      .video-info {
-        flex-grow: 1;
-
-        .video-info-name {
-          @include disable-default-a-behaviour;
-
-          color: var(--mainForegroundColor);
-          display: block;
-          width: fit-content;
-          font-size: 18px;
-          font-weight: $font-semibold;
-        }
-
-        .video-info-date-views {
-          font-size: 14px;
-        }
-
-        .video-info-account {
-          @include disable-default-a-behaviour;
-          @include ellipsis;
-
-          display: block;
-          width: fit-content;
-          font-size: 14px;
-          color: $grey-foreground-color;
-
-          &:hover {
-            color: $grey-foreground-hover-color;
-          }
-        }
-      }
-    }
-
     &.video-channel {
-
       img {
-        @include avatar(120px);
+        $image-size: 130px;
+        $margin-size: ($video-thumbnail-width - $image-size) / 2; // So we have the same width than the video miniature
 
-        margin: 0 50px 0 40px;
+        @include avatar($image-size);
+
+        margin: 0 ($margin-size + 10) 0 $margin-size;
       }
 
       .video-channel-info {
 
           display: flex;
           align-items: baseline;
-          color: var(--mainForegroundColor);
+          color: pvar(--mainForegroundColor);
           width: fit-content;
 
           .video-channel-display-name {
   }
 }
 
-@media screen and (max-width: $small-view) {
-  .video-channel-names {
+@media screen and (min-width: $small-view) and (max-width: breakpoint(xl)) {
+  .video-channel-info .video-channel-names {
     flex-direction: column !important;
 
     .video-channel-name {
+      @include ellipsis; // Ellipsis and max-width on channel-name to not break screen
+
+      max-width: 250px;
       margin-left: 0 !important;
     }
   }
+
+  :host-context(.main-col:not(.expanded)) {
+    // Override the min-width: 500px to not break screen
+    ::ng-deep .video-miniature-information {
+      min-width: 300px !important;
+    }
+  }
 }
 
-@media screen and (max-width: $mobile-view) {
-  .search-result {
-    padding: 20px 10px;
+@media screen and (min-width: $small-view) and (max-width: breakpoint(lg)) {
+  :host-context(.main-col:not(.expanded)) {
+    .video-channel-info .video-channel-names {
+      .video-channel-name {
+        max-width: 160px;
+      }
+    }
 
-    .results-header {
-      font-size: 15px !important;
+    // Override the min-width: 500px to not break screen
+    ::ng-deep .video-miniature-information {
+      min-width: $video-thumbnail-width !important;
     }
+  }
 
-    .entry {
+  :host-context(.expanded) {
+    // Override the min-width: 500px to not break screen
+    ::ng-deep .video-miniature-information {
+      min-width: 300px !important;
+    }
+  }
+}
+
+@media screen and (max-width: $small-view) {
+  .search-result {
+    .entry.video-channel,
+    .entry.video {
       flex-direction: column;
       height: auto;
       justify-content: center;
       align-items: center;
       text-align: center;
 
+      img {
+        margin: 0;
+      }
+
+      img {
+        margin: 0;
+      }
+
+      .video-channel-info .video-channel-names {
+        align-items: center;
+        flex-direction: column !important;
+
+        .video-channel-name {
+          margin-left: 0 !important;
+        }
+      }
+
+      my-subscribe-button {
+        margin-top: 5px;
+      }
+    }
+  }
+}
+
+@media screen and (max-width: $mobile-view) {
+  .search-result {
+    padding: 20px 10px;
+
+    .results-header {
+      font-size: 15px !important;
+    }
+
+    .entry {
       &.video {
         .video-info-name,
         .video-info-account {
         my-video-thumbnail {
           margin-right: 0 !important;
 
-          /deep/ .video-thumbnail {
+          ::ng-deep .video-thumbnail {
             width: 100%;
             height: auto;
 
           }
         }
       }
-
-      &.video-channel {
-        .video-channel-info .video-channel-names {
-          align-items: center;
-        }
-
-        my-subscribe-button {
-          margin-top: 5px;
-        }
-      }
     }
   }
 }