From cf78883c70dca99fc519374d55620d9403d482be Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 11 Jun 2020 14:33:33 +0200 Subject: Limit thumbnail sizes --- client/src/sass/include/_miniature.scss | 123 ++++++++++++++++---------------- 1 file changed, 62 insertions(+), 61 deletions(-) (limited to 'client/src/sass/include/_miniature.scss') diff --git a/client/src/sass/include/_miniature.scss b/client/src/sass/include/_miniature.scss index d89d6f9ff..d79086723 100644 --- a/client/src/sass/include/_miniature.scss +++ b/client/src/sass/include/_miniature.scss @@ -108,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-bottom: 10px; - width: 100%; - height: calc(100% / #{$video-thumbnail-ratio}); - border-radius: 0; - - img { - width: 100%; - height: 100%; - } - } - } -} - @mixin miniature-rows { &:first-child { padding-top: 30px; @@ -149,10 +117,6 @@ $play-overlay-width: 18px; } } - my-video-miniature { - text-align: left; - } - .section-title { font-size: 24px; font-weight: $font-semibold; @@ -213,44 +177,81 @@ $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($fluid: false) { - @if $fluid { - margin-left: 3vw !important; - margin-right: 3vw !important; - } @else { - width: $video-miniature-width * 6; - margin: auto !important; +@mixin fluid-videos-miniature-layout { + margin-left: 3vw !important; + margin-right: 3vw !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; - @media screen and (max-width: 1800px - (2* $video-miniature-width)) { - width: $video-miniature-width * 3; - } + ::ng-deep .video-miniature { + padding-right: 0; + height: auto; + width: 100%; + margin-bottom: 25px; - @media screen and (max-width: 1800px - (3* $video-miniature-width)) { - width: $video-miniature-width * 2; + .video-miniature-information { + width: 100% !important; + text-align: left; + + span { + width: 100%; + } + } + + .video-thumbnail { + border-radius: 0; + } + } } + } + + @media screen and (min-width: #{breakpoint(fhd)}) { + margin-left: 6vw !important; + margin-right: 6vw !important; + } - @media screen and (max-width: $mobile-view) { - width: auto; - margin: 0 !important; + @media screen and (min-width: $mobile-view) { + + .videos { + --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%; - .videos { - @include video-miniature-small-screen; + my-video-miniature { + display: block; + min-width: var(--miniature-min-width); + max-width: var(--miniature-max-width); + } } } } -- cgit v1.2.3