From 0f7407d926cf7774f8f730dba08327569c11680c Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 1 Apr 2021 11:10:27 +0200 Subject: Refactor video miniature Less dirty code, better responsive Prepare for some regressions Increase default miniature size --- .../video-playlist-miniature.component.scss | 119 +++++++++++++-------- 1 file changed, 75 insertions(+), 44 deletions(-) (limited to 'client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.scss') diff --git a/client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.scss b/client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.scss index 1b16dbb01..c5be5f292 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.scss +++ b/client/src/app/shared/shared-video-playlist/video-playlist-miniature.component.scss @@ -4,6 +4,7 @@ .miniature { display: inline-block; + width: 100%; &.no-videos:not(.to-manage){ a { @@ -17,62 +18,92 @@ display: none; } } +} - .miniature-thumbnail { - @include miniature-thumbnail; - - .miniature-playlist-info-overlay { - @include static-thumbnail-overlay; - - position: absolute; - right: 0; - bottom: 0; - height: $video-thumbnail-height; - padding: 0 10px; - display: flex; - align-items: center; - font-size: 14px; - font-weight: $font-semibold; - } +.miniature-thumbnail { + @include miniature-thumbnail; + + .miniature-playlist-info-overlay { + @include static-thumbnail-overlay; + + position: absolute; + right: 0; + bottom: 0; + height: 100%; + padding: 0 10px; + display: flex; + align-items: center; + font-size: 14px; + font-weight: $font-semibold; } +} - .miniature-info { - width: 200px; - margin-top: 2px; - line-height: normal; - - .miniature-name { - @include miniature-name; +.miniature-info { - @include ellipsis-multiline(1.3em, 2); + .miniature-name { + @include miniature-name; + @include ellipsis-multiline(1.3em, 2); - margin: 0; - } + margin: 0; + } - .by { - @include disable-default-a-behaviour; + .by { + @include disable-default-a-behaviour; - display: block; - color: pvar(--greyForegroundColor); - } + display: block; + color: pvar(--greyForegroundColor); + } - .privacy-date { - margin-top: 5px; + .privacy-date { + margin-top: 5px; - .video-info-privacy { - font-size: 14px; - font-weight: $font-semibold; + .video-info-privacy { + font-size: 14px; + font-weight: $font-semibold; - &::after { - content: '-'; - margin: 0 3px; - } + &::after { + content: '-'; + margin: 0 3px; } } + } - .video-info-description { - margin-top: 10px; - color: pvar(--greyForegroundColor); - } + .video-info-description { + margin-top: 10px; + color: pvar(--greyForegroundColor); + } +} + +.miniature:not(.display-as-row) { + .miniature-thumbnail { + margin-top: 10px; + margin-bottom: 5px; + } +} + +.miniature.display-as-row { + --rowThumbnailWidth: #{$video-thumbnail-width}; + --rowThumbnailHeight: #{$video-thumbnail-height}; + + display: flex; + + .miniature-thumbnail { + width: var(--rowThumbnailWidth); + height: var(--rowThumbnailHeight); + margin-right: 10px; + } +} + +@include on-small-main-col { + .miniature.display-as-row { + --rowThumbnailWidth: #{$video-thumbnail-medium-width}; + --rowThumbnailHeight: #{$video-thumbnail-medium-height}; + } +} + +@include on-mobile-main-col { + .miniature.display-as-row { + --rowThumbnailWidth: #{$video-thumbnail-small-width}; + --rowThumbnailHeight: #{$video-thumbnail-small-height}; } } -- cgit v1.2.3