X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=client%2Fsrc%2Fsass%2Finclude%2F_miniature.scss;h=457a7151cd8ba3945d82f710ff757f6409998f37;hb=218f730c7bceda5511d46f26191e7b1726c9ffd3;hp=4926adb08e3185fb678ee53fa597d03ce0d18c10;hpb=8fc02e476869276d35759d19248ddfe7f84ec09c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/sass/include/_miniature.scss b/client/src/sass/include/_miniature.scss index 4926adb08..457a7151c 100644 --- a/client/src/sass/include/_miniature.scss +++ b/client/src/sass/include/_miniature.scss @@ -5,9 +5,8 @@ @include ellipsis-multiline(1.1em, 2); transition: color 0.2s; - font-size: 16px; font-weight: $font-semibold; - color: var(--mainForegroundColor); + color: pvar(--mainForegroundColor); margin-top: 10px; margin-bottom: 5px; @@ -46,25 +45,14 @@ $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; } .icon { - width: 0; - height: 0; - - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%) scale(0.5); - - border-top: ($play-overlay-height / 2) solid transparent; - border-bottom: ($play-overlay-height / 2) solid transparent; - - border-left: $play-overlay-width solid rgba(255, 255, 255, 0.95); + @include play-icon($play-overlay-width, $play-overlay-height); } } @@ -81,7 +69,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 { @@ -89,14 +78,14 @@ $play-overlay-width: 18px; height: inherit; &.blur-filter { - filter: blur(5px); + filter: blur(20px); transform : scale(1.03); } } } @mixin thumbnail-size-component ($width, $height) { - /deep/ .video-thumbnail { + ::ng-deep .video-thumbnail { width: $width; height: $height; } @@ -108,32 +97,174 @@ $play-overlay-width: 18px; color: #fff; } -@mixin video-miniature-small-screen { - text-align: center; +@mixin miniature-rows { + &:first-child { + padding-top: 30px; + + .section-title { + border-top: none !important; + } + } + + .section-title { + font-size: 24px; + font-weight: $font-semibold; + padding-top: 15px; + margin-bottom: 15px; + display: flex; + justify-content: space-between; + + &:not(h2) { + border-top: 1px solid $separator-border-color; + } + + a { + &:hover, &:focus:not(.focus-visible), &:active { + text-decoration: none; + outline: none; + } + + color: pvar(--mainForegroundColor); + } + } + + &.channel { + .section-title { + a { + display: flex; + width: fit-content; + align-items: center; + + img { + @include channel-avatar(28px); + + margin-right: 8px; + } + } + + .followers { + color: pvar(--greyForegroundColor); + font-weight: normal; + font-size: 14px; + margin-left: 10px; + position: relative; + top: 2px; + } + } + } + + .show-more { + position: relative; + top: -5px; + display: inline-block; + font-size: 16px; + text-transform: uppercase; + color: pvar(--greyForegroundColor); + margin-bottom: 10px; + font-weight: $font-semibold; + text-decoration: none; + } + + @media screen and (max-width: $mobile-view) { + max-height: initial; + overflow: initial; + + .section-title { + font-size: 17px; + margin-left: 10px; + } + } +} + +// Use margin by default, or padding if $margin is false +@mixin fluid-videos-miniature-margins ($margin: true, $min-margin: 0) { + @if $margin { + margin-left: $not-expanded-horizontal-margins !important; + margin-right: $not-expanded-horizontal-margins !important; + } @else { + padding-left: $not-expanded-horizontal-margins !important; + padding-right: $not-expanded-horizontal-margins !important; + } + + @media screen and (max-width: $mobile-view) { + width: auto; + + @if $margin { + margin: $min-margin !important; + } @else { + padding: $min-margin !important; + } + } + + @media screen and (min-width: #{breakpoint(fhd)}) { + @if $margin { + margin-left: 6vw !important; + margin-right: 6vw !important; + } @else { + padding-left: 6vw !important; + padding-right: 6vw !important; + } + } +} - /deep/ .video-miniature { - padding-right: 0; - height: auto; - width: 100%; - margin-bottom: 20px; +@mixin fluid-videos-miniature-layout { + @include fluid-videos-miniature-margins; - .video-miniature-information { - width: 100% !important; - text-align: left; + @media screen and (max-width: $mobile-view) { + .videos { + text-align: center; - span { + ::ng-deep .video-miniature { + padding-right: 0; + height: auto; width: 100%; + margin-bottom: 25px; + + .video-miniature-information { + width: 100% !important; + text-align: left; + + span { + width: 100%; + } + } + + .video-thumbnail { + border-radius: 0; + } } } + } + + @media screen and (min-width: $mobile-view) { + .videos { + --miniature-min-width: #{$video-thumbnail-width - 15px}; + --miniature-max-width: #{$video-thumbnail-width}; - .video-thumbnail { - margin: 0 -15px 10px -15px; - width: 100vw; - height: calc(100vw / #{$video-thumbnail-ratio}); + display: grid; + column-gap: 5px; + grid-template-columns: repeat( + auto-fill, + minmax( + var(--miniature-min-width), + 1fr + ) + ); - img { + @media screen and (min-width: #{breakpoint(fhd)}) { + column-gap: 1%; + --miniature-min-width: #{$video-thumbnail-width}; + } + + .video-wrapper { + margin: 0 auto; width: 100%; - height: 100%; + + my-video-miniature { + display: block; + min-width: var(--miniature-min-width); + max-width: var(--miniature-max-width); + } } } }