1
0
Fork 0
peertube/client/src/app/shared/shared-video-playlist/video-playlist-element-mini...

261 lines
4.3 KiB
SCSS
Raw Normal View History

2021-05-27 16:25:00 +00:00
@use '_variables' as *;
@use '_mixins' as *;
@use '_miniature' as *;
2019-03-13 13:18:58 +00:00
2019-07-31 13:57:32 +00:00
$thumbnail-width: 130px;
$thumbnail-height: 72px;
my-video-thumbnail {
2019-07-31 13:57:32 +00:00
@include thumbnail-size-component($thumbnail-width, $thumbnail-height);
}
2019-07-31 13:57:32 +00:00
.fake-thumbnail {
width: $thumbnail-width;
height: $thumbnail-height;
background-color: #ececec;
}
my-video-thumbnail,
.fake-thumbnail {
2021-06-07 15:38:31 +00:00
@include margin-right(10px);
display: flex; // Avoids an issue with line-height that adds space below the element
}
2019-03-13 13:18:58 +00:00
.video {
2020-08-19 09:06:58 +00:00
display: grid;
grid-template-columns: 1fr auto;
background-color: pvar(--mainBackgroundColor);
2019-03-13 13:18:58 +00:00
padding: 10px;
border-bottom: 1px solid $separator-border-color;
2020-08-19 09:06:58 +00:00
.more {
display: flex;
}
2019-03-13 13:18:58 +00:00
&:hover {
background-color: rgba(0, 0, 0, 0.05);
.more {
2019-04-05 13:23:41 +00:00
opacity: 1;
2019-03-13 13:18:58 +00:00
}
}
@media not all and (hover: hover) and (pointer: fine) {
.more {
opacity: 1 !important;
}
}
2019-03-13 13:18:58 +00:00
&.playing {
background-color: rgba(0, 0, 0, 0.02);
}
a {
@include disable-default-a-behaviour;
color: pvar(--mainForegroundColor);
2019-03-13 13:18:58 +00:00
display: flex;
2019-04-05 13:23:41 +00:00
min-width: 0;
2019-03-13 13:18:58 +00:00
align-items: center;
cursor: pointer;
.position {
2021-06-07 15:38:31 +00:00
@include margin-right(10px);
2019-03-13 13:18:58 +00:00
font-weight: $font-semibold;
color: pvar(--greyForegroundColor);
2019-03-14 13:05:36 +00:00
min-width: 25px;
2019-03-13 13:18:58 +00:00
my-global-icon {
@include apply-svg-color(pvar(--greyForegroundColor));
2019-03-13 13:18:58 +00:00
width: 17px;
position: relative;
left: -2px;
}
}
2019-07-31 13:57:32 +00:00
}
2021-04-28 14:41:07 +00:00
.more,
my-edit-button {
2021-06-07 15:38:31 +00:00
@include margin-left(auto);
2019-03-13 13:18:58 +00:00
justify-self: flex-end;
cursor: pointer;
min-width: 24px;
}
.more {
opacity: 0;
2019-03-13 13:18:58 +00:00
&.show {
2019-04-05 13:23:41 +00:00
opacity: 1;
2019-03-13 13:18:58 +00:00
}
.icon-more {
@include apply-svg-color(pvar(--greyForegroundColor));
2019-03-13 13:18:58 +00:00
display: flex;
&::after {
2021-04-28 14:41:07 +00:00
border: 0;
2019-03-13 13:18:58 +00:00
}
}
}
}
2019-03-13 13:18:58 +00:00
2022-06-15 12:59:25 +00:00
.video-info-name {
@include ellipsis;
font-size: 18px;
font-weight: $font-semibold;
display: inline-block;
}
.video-info {
display: flex;
flex-direction: column;
align-self: flex-start;
min-width: 0;
.video-info-header {
display: flex;
align-items: baseline;
a {
width: auto;
padding-right: 5px;
}
.pt-badge {
@include margin-right(5px);
}
}
.video-info-owner,
2022-06-15 12:59:25 +00:00
.video-info-timestamp {
color: pvar(--greyForegroundColor);
}
}
.video-info-owner,
2022-06-15 12:59:25 +00:00
.video-miniature-created-at-views {
font-size: 14px;
}
.dropdown-menu {
2019-03-13 13:18:58 +00:00
.dropdown-item {
@include dropdown-with-icon-item;
2019-03-13 13:18:58 +00:00
cursor: pointer;
}
2019-03-13 13:18:58 +00:00
.timestamp-options {
2021-06-07 15:38:31 +00:00
@include padding-left(35px);
padding-top: 0;
margin-bottom: 15px;
2019-03-13 13:18:58 +00:00
> div {
display: flex;
align-items: center;
margin-bottom: 5px;
}
my-peertube-checkbox {
2021-06-07 15:38:31 +00:00
@include margin-right(5px);
}
input {
@include peertube-button;
@include orange-button;
margin-top: 10px;
2019-03-13 13:18:58 +00:00
}
}
}
@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;
2020-08-19 09:06:58 +00:00
margin: auto;
}
}
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();
}
}