X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fvideo-playlist%2Fvideo-playlist-element-miniature.component.scss;h=649272c52093754731df2271fccbc442db196400;hb=c123027fd962a14433a325f85d2734b94a4df3ae;hp=cb7072d7f3fe4559ab3d19bef58bdb6023ef4155;hpb=72675ebe0181ab2389fb2f75a3b2acdca6e09c07;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.scss b/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.scss index cb7072d7f..649272c52 100644 --- a/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.scss +++ b/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.scss @@ -2,9 +2,21 @@ @import '_mixins'; @import '_miniature'; +$thumbnail-width: 130px; +$thumbnail-height: 72px; + my-video-thumbnail { - @include thumbnail-size-component(130px, 72px); + @include thumbnail-size-component($thumbnail-width, $thumbnail-height); +} + +.fake-thumbnail { + width: $thumbnail-width; + height: $thumbnail-height; + background-color: #ececec; +} +my-video-thumbnail, +.fake-thumbnail { display: flex; // Avoids an issue with line-height that adds space below the element margin-right: 10px; } @@ -24,6 +36,12 @@ my-video-thumbnail { } } + @media not all and (hover: hover) and (pointer: fine) { + .more { + opacity: 1 !important; + } + } + &.playing { background-color: rgba(0, 0, 0, 0.02); } @@ -31,6 +49,7 @@ my-video-thumbnail { a { @include disable-default-a-behaviour; + color: var(--mainForegroundColor); display: flex; min-width: 0; align-items: center; @@ -39,11 +58,11 @@ my-video-thumbnail { .position { font-weight: $font-semibold; margin-right: 10px; - color: $grey-foreground-color; + color: var(--greyForegroundColor); min-width: 25px; my-global-icon { - @include apply-svg-color($grey-foreground-color); + @include apply-svg-color(var(--greyForegroundColor)); width: 17px; position: relative; @@ -58,32 +77,31 @@ my-video-thumbnail { min-width: 0; a { - color: var(--mainForegroundColor); width: auto; - - &:hover { - text-decoration: underline !important; - } - } - - .video-info-name { - font-size: 18px; - font-weight: $font-semibold; - display: inline-block; - - @include ellipsis; } .video-info-account, .video-info-timestamp { - color: $grey-foreground-color; + color: var(--greyForegroundColor); } } } - .more { + .video-info-name { + font-size: 18px; + font-weight: $font-semibold; + display: inline-block; + + @include ellipsis; + } + + .more, my-edit-button { justify-self: flex-end; margin-left: auto; cursor: pointer; + min-width: 24px; + } + + .more { opacity: 0; &.show { @@ -91,7 +109,7 @@ my-video-thumbnail { } .icon-more { - @include apply-svg-color($grey-foreground-color); + @include apply-svg-color(var(--greyForegroundColor)); display: flex; @@ -123,3 +141,84 @@ my-video-thumbnail { } } } + +@mixin more-dropdown-control { + .video { + my-edit-button { + display: none; + + + .more { + display: inline-flex; + } + } + } +} + +@mixin edit-button-control { + .video { + my-edit-button { + display: none; + } + + &.playing { + my-edit-button { + display: inline-flex; + height: max-content; + } + } + + my-edit-button + .more { + display: none; + } + } +} + +@mixin edit-button-in-mobile-view { + .video { + my-edit-button { + ::ng-deep .action-button-edit { + padding: 0 13px; + + .button-label { + display: none; + } + } + } + } +} + +@media screen and (min-width: $small-view) { + :host-context(.expanded) { + @include more-dropdown-control(); + } +} + +@media screen and (max-width: $small-view) { + :host-context(.expanded) { + @include edit-button-control(); + } +} + +@media screen and (max-width: $mobile-view) { + :host-context(.expanded) { + @include edit-button-in-mobile-view(); + } +} + +@media screen and (min-width: #{$small-view + $menu-width}) { + :host-context(.main-col:not(.expanded)) { + @include more-dropdown-control(); + } +} + +@media screen and (max-width: #{$small-view + $menu-width}) { + :host-context(.main-col:not(.expanded)) { + @include edit-button-control(); + } +} + +@media screen and (max-width: #{$mobile-view + $menu-width}) { + :host-context(.main-col:not(.expanded)) { + @include edit-button-in-mobile-view(); + } +}