mirror of https://github.com/FreeTubeApp/FreeTube
293 lines
5.0 KiB
SCSS
293 lines
5.0 KiB
SCSS
$thumbnail-overlay-opacity: 0.85;
|
|
$watched-transition-duration: 0.5s;
|
|
|
|
@mixin is-result {
|
|
@at-root {
|
|
.result#{&} {
|
|
@content;
|
|
}
|
|
}
|
|
}
|
|
|
|
@mixin is-watch-playlist-item {
|
|
@at-root {
|
|
.watchPlaylistItem#{&} {
|
|
@content;
|
|
}
|
|
}
|
|
}
|
|
|
|
@mixin is-recommendation {
|
|
@at-root {
|
|
.recommendation#{&} {
|
|
@content;
|
|
}
|
|
}
|
|
}
|
|
|
|
@mixin is-sidebar-item {
|
|
@at-root {
|
|
.watchPlaylistItem#{&},
|
|
.recommendation#{&} {
|
|
@content;
|
|
}
|
|
}
|
|
}
|
|
|
|
@mixin low-contrast-when-watched($col) {
|
|
color: $col;
|
|
|
|
@at-root {
|
|
.watched &,
|
|
.watched#{&} {
|
|
color: var(tertiary-text-color);
|
|
transition-duration: $watched-transition-duration;
|
|
}
|
|
.watched:hover &,
|
|
.watched:hover#{&} {
|
|
color: $col;
|
|
transition-duration: $watched-transition-duration;
|
|
}
|
|
}
|
|
}
|
|
|
|
.ft-list-item {
|
|
padding: 6px;
|
|
|
|
&.watched {
|
|
@include low-contrast-when-watched(var(primary-text-color));
|
|
|
|
background-color: var(bg-color);
|
|
|
|
.thumbnailImage {
|
|
opacity: 0.3;
|
|
transition-duration: $watched-transition-duration;
|
|
}
|
|
|
|
&:hover .thumbnailImage {
|
|
opacity: 1;
|
|
transition-duration: $watched-transition-duration;
|
|
}
|
|
}
|
|
|
|
.videoThumbnail {
|
|
position: relative;
|
|
|
|
.thumbnailLink {
|
|
display: flex;
|
|
}
|
|
|
|
.thumbnailImage {
|
|
@include is-sidebar-item {
|
|
height: 75px;
|
|
}
|
|
|
|
@include is-recommendation {
|
|
height: auto;
|
|
width: 163px;
|
|
}
|
|
}
|
|
|
|
.videoWatched {
|
|
background-color: var(bg-color);
|
|
color: var(primary-text-color);
|
|
opacity: $thumbnail-overlay-opacity;
|
|
padding: 2px;
|
|
pointer-events: none;
|
|
position: absolute;
|
|
top: 0;
|
|
}
|
|
|
|
.videoDuration {
|
|
background-color: var(card-bg-color);
|
|
border-radius: 5px;
|
|
bottom: 4px;
|
|
color: var(primary-text-color);
|
|
font-size: 15px;
|
|
line-height: 1.2;
|
|
margin: 0;
|
|
opacity: $thumbnail-overlay-opacity;
|
|
padding: 3px 4px;
|
|
pointer-events: none;
|
|
position: absolute;
|
|
right: 4px;
|
|
|
|
@include is-watch-playlist-item {
|
|
font-size: 12px;
|
|
}
|
|
|
|
&.live {
|
|
background-color: #f22;
|
|
color: #fff;
|
|
}
|
|
}
|
|
|
|
.externalPlayerIcon {
|
|
bottom: 4px;
|
|
font-size: 17px;
|
|
left: 4px;
|
|
opacity: $thumbnail-overlay-opacity;
|
|
position: absolute;
|
|
}
|
|
|
|
.favoritesIcon {
|
|
font-size: 17px;
|
|
opacity: $thumbnail-overlay-opacity;
|
|
position: absolute;
|
|
right: 3px;
|
|
top: 3px;
|
|
}
|
|
|
|
.watchedProgressBar {
|
|
background-color: var(primary-color);
|
|
bottom: 0;
|
|
height: 2px;
|
|
max-width: 100%;
|
|
position: absolute;
|
|
z-index: 2;
|
|
}
|
|
|
|
.videoCountContainer {
|
|
bottom: 0;
|
|
font-size: 20px;
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
width: 60px;
|
|
|
|
.background,
|
|
.inner {
|
|
bottom: 0;
|
|
left: 0;
|
|
position: absolute;
|
|
right: 0;
|
|
top: 0;
|
|
}
|
|
|
|
.background {
|
|
background-color: var(bg-color);
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.inner {
|
|
align-items: center;
|
|
color: var(primary-text-color);
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
}
|
|
}
|
|
}
|
|
|
|
.channelThumbnail {
|
|
display: flex;
|
|
justify-content: center;
|
|
|
|
.channelImage {
|
|
border-radius: 50%;
|
|
height: 130px;
|
|
}
|
|
}
|
|
|
|
.info {
|
|
flex: 1;
|
|
position: relative;
|
|
|
|
.optionsButton {
|
|
float: right; // ohhhh man, float was finally the right choice for something;
|
|
}
|
|
|
|
.externalPlayerButton {
|
|
float: right;
|
|
}
|
|
|
|
.title {
|
|
@include low-contrast-when-watched(var(primary-text-color));
|
|
|
|
font-size: 20px;
|
|
text-decoration: none;
|
|
word-break: break-word;
|
|
word-wrap: break-word;
|
|
|
|
@include is-sidebar-item {
|
|
font-size: 15px;
|
|
}
|
|
}
|
|
|
|
.infoLine {
|
|
font-size: 14px;
|
|
margin-top: 5px;
|
|
|
|
@include is-sidebar-item {
|
|
font-size: 12px;
|
|
}
|
|
|
|
& {
|
|
@include low-contrast-when-watched(var(secondary-text-color));
|
|
}
|
|
|
|
.channelName {
|
|
@include low-contrast-when-watched(var(secondary-text-color));
|
|
}
|
|
}
|
|
|
|
.description {
|
|
@include low-contrast-when-watched(var(secondary-text-color));
|
|
|
|
font-size: 14px;
|
|
max-height: 50px;
|
|
overflow-y: hidden;
|
|
}
|
|
}
|
|
|
|
&.list {
|
|
align-items: flex-start;
|
|
display: flex;
|
|
|
|
@include is-sidebar-item {
|
|
.videoThumbnail {
|
|
margin-right: 10px;
|
|
}
|
|
}
|
|
|
|
.videoThumbnail,
|
|
.channelThumbnail {
|
|
margin-right: 20px;
|
|
}
|
|
|
|
.channelThumbnail {
|
|
width: 231px;
|
|
}
|
|
}
|
|
|
|
&.grid {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-height: 230px;
|
|
padding-bottom: 20px;
|
|
|
|
.videoThumbnail,
|
|
.channelThumbnail {
|
|
margin-bottom: 12px;
|
|
|
|
.thumbnailImage {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.title {
|
|
font-size: 18px;
|
|
}
|
|
|
|
.infoLine {
|
|
font-size: 13px;
|
|
margin-top: 8px;
|
|
}
|
|
}
|
|
}
|
|
|
|
.videoWatched,
|
|
.live {
|
|
text-transform: uppercase;
|
|
}
|