1
0
Fork 0
peertube/client/src/app/shared/video-playlist/video-playlist-element-miniature.component.scss

218 lines
3.7 KiB
SCSS

@import '_variables';
@import '_mixins';
@import '_miniature';
$thumbnail-width: 130px;
$thumbnail-height: 72px;
my-video-thumbnail {
@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;
}
.video {
display: flex;
align-items: center;
background-color: var(--mainBackgroundColor);
padding: 10px;
border-bottom: 1px solid $separator-border-color;
&:hover {
background-color: rgba(0, 0, 0, 0.05);
.more {
opacity: 1;
}
}
&.playing {
background-color: rgba(0, 0, 0, 0.02);
}
a {
@include disable-default-a-behaviour;
color: var(--mainForegroundColor);
display: flex;
min-width: 0;
align-items: center;
cursor: pointer;
.position {
font-weight: $font-semibold;
margin-right: 10px;
color: $grey-foreground-color;
min-width: 25px;
my-global-icon {
@include apply-svg-color($grey-foreground-color);
width: 17px;
position: relative;
left: -2px;
}
}
.video-info {
display: flex;
flex-direction: column;
align-self: flex-start;
min-width: 0;
a {
width: auto;
}
.video-info-account, .video-info-timestamp {
color: $grey-foreground-color;
}
}
}
.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 {
opacity: 1;
}
.icon-more {
@include apply-svg-color($grey-foreground-color);
display: flex;
&::after {
border: none;
}
}
.dropdown-item {
@include dropdown-with-icon-item;
}
.timestamp-options {
padding-top: 0;
padding-left: 35px;
margin-bottom: 15px;
> div {
display: flex;
align-items: center;
}
input {
@include peertube-button;
@include orange-button;
margin-top: 10px;
}
}
}
}
@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();
}
}