X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fsass%2Finclude%2F_miniature.scss;h=c937a0f72c3fc7e44f559d0afcb91311efcd8518;hb=36f772fd8f1fb26cd5fe6f50332e4f44fc2c4e03;hp=25a024aaca2a007a2cd9926e2a681374f1439c2d;hpb=c5a1ae500e68b759f76851552be6dd10631d34f4;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/sass/include/_miniature.scss b/client/src/sass/include/_miniature.scss index 25a024aac..c937a0f72 100644 --- a/client/src/sass/include/_miniature.scss +++ b/client/src/sass/include/_miniature.scss @@ -2,16 +2,12 @@ @import '_mixins'; @mixin miniature-name { - @include ellipsis-multiline( - $font-size: 1rem, - $line-height: 1, - $lines-to-show: 2 - ); + @include ellipsis-multiline(1.1em, 2); + transition: color 0.2s; - font-size: 16px; font-weight: $font-semibold; color: var(--mainForegroundColor); - margin-top: 5px; + margin-top: 10px; margin-bottom: 5px; &:hover { @@ -28,15 +24,16 @@ $play-overlay-transition: 0.2s ease; $play-overlay-height: 26px; $play-overlay-width: 18px; -@mixin miniature-thumbnail($width: $video-thumbnail-width, $height: $video-thumbnail-height) { +@mixin miniature-thumbnail { @include disable-outline; - display: inline-block; + display: flex; + flex-direction: column; position: relative; border-radius: 3px; overflow: hidden; - width: $width; - height: $height; + width: $video-thumbnail-width; + height: $video-thumbnail-height; background-color: #ececec; transition: filter $play-overlay-transition; @@ -48,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; @@ -83,7 +80,8 @@ $play-overlay-width: 18px; } &.focus-visible { - box-shadow: 0 0 0 2px var(--mainColor); + box-shadow: #{$focus-box-shadow-form} var(--mainColorLightest); + outline: none; } img { @@ -91,12 +89,19 @@ $play-overlay-width: 18px; height: inherit; &.blur-filter { - filter: blur(5px); + filter: blur(20px); transform : scale(1.03); } } } +@mixin thumbnail-size-component ($width, $height) { + ::ng-deep .video-thumbnail { + width: $width; + height: $height; + } +} + @mixin static-thumbnail-overlay { display: inline-block; background-color: rgba(0, 0, 0, 0.7); @@ -106,7 +111,7 @@ $play-overlay-width: 18px; @mixin video-miniature-small-screen { text-align: center; - /deep/ .video-miniature { + ::ng-deep .video-miniature { padding-right: 0; height: auto; width: 100%; @@ -114,6 +119,7 @@ $play-overlay-width: 18px; .video-miniature-information { width: 100% !important; + text-align: left; span { width: 100%; @@ -121,13 +127,126 @@ $play-overlay-width: 18px; } .video-thumbnail { + margin-bottom: 10px; width: 100%; - height: auto; + height: calc(100% / #{$video-thumbnail-ratio}); + border-radius: 0; img { width: 100%; - height: auto; + height: 100%; + } + } + } +} + +@mixin miniature-rows { + &:first-child { + padding-top: 30px; + + .section-title { + border-top: none !important; + } + } + + my-video-miniature { + text-align: left; + } + + .section-title { + font-size: 24px; + font-weight: $font-semibold; + padding-top: 15px; + margin-bottom: 15px; + display: flex; + justify-content: space-between; + border-top: 1px solid $separator-border-color; + + a { + &:hover, &:focus:not(.focus-visible), &:active { + text-decoration: none; + outline: none; + } + + color: var(--mainForegroundColor); + } + } + + &.channel { + .section-title { + a { + display: flex; + width: fit-content; + align-items: center; + + img { + @include avatar(28px); + + margin-right: 8px; + } } + + .followers { + color: $grey-foreground-color; + 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: $grey-foreground-color; + margin-bottom: 10px; + font-weight: $font-semibold; + text-decoration: none; + } + + @media screen and (max-width: $mobile-view) { + max-height: initial; + overflow: initial; + + @include video-miniature-small-screen; + + .section-title { + font-size: 17px; + } + } +} + +@mixin adapt-margin-content-width { + width: $video-miniature-width * 6; + margin: auto !important; + + @media screen and (max-width: 1800px) { + width: $video-miniature-width * 5; + } + + @media screen and (max-width: 1800px - $video-miniature-width) { + width: $video-miniature-width * 4; + } + + @media screen and (max-width: 1800px - (2* $video-miniature-width)) { + width: $video-miniature-width * 3; + } + + @media screen and (max-width: 1800px - (3* $video-miniature-width)) { + width: $video-miniature-width * 2; + } + + @media screen and (max-width: $mobile-view) { + width: auto; + margin: 0 !important; + + .videos { + @include video-miniature-small-screen; } } }