]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/include/_miniature.scss
Fix transcoding job priority
[github/Chocobozzz/PeerTube.git] / client / src / sass / include / _miniature.scss
CommitLineData
830b4faf
C
1@import '_variables';
2@import '_mixins';
3
4@mixin miniature-name {
8fc02e47 5 @include ellipsis-multiline(1.1em, 2);
0c9945d9 6
33253c1a 7 word-break: break-all;
0f7407d9 8 word-wrap: break-word;
830b4faf 9 transition: color 0.2s;
830b4faf 10 font-weight: $font-semibold;
e66883b3 11 color: pvar(--mainForegroundColor);
830b4faf
C
12
13 &:hover {
14 text-decoration: none;
15 }
16
17 &.blur-filter {
18 filter: blur(3px);
19 padding-left: 4px;
20 }
21}
22
e2f01c47 23@mixin miniature-thumbnail {
0f7407d9
C
24 $play-overlay-transition: 0.2s ease;
25 $play-overlay-height: 26px;
26 $play-overlay-width: 18px;
27
931d3430
C
28 @include disable-outline;
29
8fc02e47
C
30 display: flex;
31 flex-direction: column;
830b4faf
C
32 position: relative;
33 border-radius: 3px;
0f7407d9
C
34 width: 100%;
35 height: 100%;
830b4faf 36 overflow: hidden;
830b4faf
C
37 background-color: #ececec;
38 transition: filter $play-overlay-transition;
39
40 .play-overlay {
41 position: absolute;
42 right: 0;
43 bottom: 0;
44
c5a1ae50
C
45 width: inherit;
46 height: inherit;
830b4faf 47 opacity: 0;
41f8f620 48 background-color: rgba(0, 0, 0, 0.3);
830b4faf 49
931d3430
C
50 &,
51 .icon {
830b4faf
C
52 transition: all $play-overlay-transition;
53 }
54
55 .icon {
3efa3f4d 56 @include play-icon($play-overlay-width, $play-overlay-height);
830b4faf
C
57 }
58 }
59
60 &:hover {
61 text-decoration: none !important;
62
63 .play-overlay {
64 opacity: 1;
65
66 .icon {
67 transform: translate(-50%, -50%) scale(1);
68 }
69 }
70 }
71
72 &.focus-visible {
e66883b3 73 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
6a4c30de 74 outline: none;
830b4faf
C
75 }
76
77 img {
c5a1ae50
C
78 width: inherit;
79 height: inherit;
830b4faf
C
80
81 &.blur-filter {
1b8a8905 82 filter: blur(20px);
931d3430 83 transform: scale(1.03);
830b4faf
C
84 }
85 }
86}
87
e2f01c47 88@mixin thumbnail-size-component ($width, $height) {
03652b31 89 ::ng-deep .video-thumbnail {
e2f01c47
C
90 width: $width;
91 height: $height;
92 }
93}
94
830b4faf
C
95@mixin static-thumbnail-overlay {
96 display: inline-block;
97 background-color: rgba(0, 0, 0, 0.7);
98 color: #fff;
99}
100
900f7820 101// Use margin by default, or padding if $margin is false
0f7407d9
C
102@mixin grid-videos-miniature-margins ($margin: true, $min-margin: 0) {
103 --gridVideosMiniatureMargins: #{pvar(--videosHorizontalMarginContent)};
d7941370 104
900f7820 105 @if $margin {
0f7407d9
C
106 margin-left: var(--gridVideosMiniatureMargins) !important;
107 margin-right: var(--gridVideosMiniatureMargins) !important;
900f7820 108 } @else {
0f7407d9
C
109 padding-left: var(--gridVideosMiniatureMargins) !important;
110 padding-right: var(--gridVideosMiniatureMargins) !important;
900f7820 111 }
c8487f3f 112
cf78883c 113 @media screen and (max-width: $mobile-view) {
0f7407d9 114 --gridVideosMiniatureMargins: #{$min-margin};
c8487f3f 115
d7941370 116 width: auto;
900f7820
C
117 }
118}
119
0f7407d9
C
120@mixin grid-videos-miniature-layout {
121 @include grid-videos-miniature-margins;
cf78883c 122
cf78883c 123 @media screen and (min-width: $mobile-view) {
0f7407d9
C
124 .videos,
125 .playlists {
126 --miniatureMinWidth: #{$video-thumbnail-width - 25px};
33253c1a 127 --miniatureMaxWidth: #{$video-thumbnail-width};
cf78883c
C
128
129 display: grid;
0f7407d9 130 column-gap: 30px;
cf78883c
C
131 grid-template-columns: repeat(
132 auto-fill,
931d3430 133 minmax(var(--miniatureMinWidth), 1fr)
cf78883c
C
134 );
135
0f7407d9
C
136 .video-wrapper,
137 .playlist-wrapper {
cf78883c
C
138 margin: 0 auto;
139 width: 100%;
c8487f3f 140
0f7407d9
C
141 my-video-miniature,
142 my-video-playlist-miniature {
cf78883c 143 display: block;
33253c1a
C
144 min-width: var(--miniatureMinWidth);
145 max-width: var(--miniatureMaxWidth);
cf78883c 146 }
e66883b3 147 }
0f7407d9
C
148
149 @media screen and (min-width: #{breakpoint(xm)}) {
150 column-gap: 15px;
151 }
152
153 @media screen and (min-width: #{breakpoint(fhd)}) {
154 column-gap: 2%;
155 }
156 }
157 }
c8487f3f 158}