]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/include/_miniature.scss
Handle basic playlist in embed
[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
830b4faf 7 transition: color 0.2s;
830b4faf 8 font-weight: $font-semibold;
e66883b3 9 color: pvar(--mainForegroundColor);
8fc02e47 10 margin-top: 10px;
830b4faf
C
11 margin-bottom: 5px;
12
13 &:hover {
14 text-decoration: none;
15 }
16
17 &.blur-filter {
18 filter: blur(3px);
19 padding-left: 4px;
20 }
21}
22
23$play-overlay-transition: 0.2s ease;
24$play-overlay-height: 26px;
25$play-overlay-width: 18px;
26
e2f01c47 27@mixin miniature-thumbnail {
830b4faf
C
28 @include disable-outline;
29
8fc02e47
C
30 display: flex;
31 flex-direction: column;
830b4faf
C
32 position: relative;
33 border-radius: 3px;
34 overflow: hidden;
e2f01c47
C
35 width: $video-thumbnail-width;
36 height: $video-thumbnail-height;
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
C
49
50 &, .icon {
51 transition: all $play-overlay-transition;
52 }
53
54 .icon {
4572c3d0 55 @include play-icon($play-overlay-height, $play-overlay-width);
830b4faf
C
56 }
57 }
58
59 &:hover {
60 text-decoration: none !important;
61
62 .play-overlay {
63 opacity: 1;
64
65 .icon {
66 transform: translate(-50%, -50%) scale(1);
67 }
68 }
69 }
70
71 &.focus-visible {
e66883b3 72 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
6a4c30de 73 outline: none;
830b4faf
C
74 }
75
76 img {
c5a1ae50
C
77 width: inherit;
78 height: inherit;
830b4faf
C
79
80 &.blur-filter {
1b8a8905 81 filter: blur(20px);
830b4faf
C
82 transform : scale(1.03);
83 }
84 }
85}
86
e2f01c47 87@mixin thumbnail-size-component ($width, $height) {
03652b31 88 ::ng-deep .video-thumbnail {
e2f01c47
C
89 width: $width;
90 height: $height;
91 }
92}
93
830b4faf
C
94@mixin static-thumbnail-overlay {
95 display: inline-block;
96 background-color: rgba(0, 0, 0, 0.7);
97 color: #fff;
98}
99
c8487f3f 100@mixin miniature-rows {
c8487f3f
C
101 &:first-child {
102 padding-top: 30px;
dc890263
C
103
104 .section-title {
105 border-top: none !important;
106 }
c8487f3f
C
107 }
108
c8487f3f
C
109 .section-title {
110 font-size: 24px;
111 font-weight: $font-semibold;
dc890263
C
112 padding-top: 15px;
113 margin-bottom: 15px;
bc01017b
C
114 display: flex;
115 justify-content: space-between;
c9e3565d
CC
116
117 &:not(h2) {
118 border-top: 1px solid $separator-border-color;
119 }
c8487f3f
C
120
121 a {
122 &:hover, &:focus:not(.focus-visible), &:active {
123 text-decoration: none;
124 outline: none;
125 }
126
e66883b3 127 color: pvar(--mainForegroundColor);
c8487f3f
C
128 }
129 }
130
131 &.channel {
132 .section-title {
133 a {
134 display: flex;
135 width: fit-content;
136 align-items: center;
137
138 img {
139 @include avatar(28px);
140
141 margin-right: 8px;
142 }
143 }
144
145 .followers {
e66883b3 146 color: pvar(--greyForegroundColor);
c8487f3f
C
147 font-weight: normal;
148 font-size: 14px;
149 margin-left: 10px;
150 position: relative;
151 top: 2px;
152 }
153 }
154 }
155
dc890263
C
156 .show-more {
157 position: relative;
158 top: -5px;
159 display: inline-block;
160 font-size: 16px;
161 text-transform: uppercase;
e66883b3 162 color: pvar(--greyForegroundColor);
dc890263
C
163 margin-bottom: 10px;
164 font-weight: $font-semibold;
25266908 165 text-decoration: none;
dc890263
C
166 }
167
c8487f3f
C
168 @media screen and (max-width: $mobile-view) {
169 max-height: initial;
170 overflow: initial;
171
c8487f3f
C
172 .section-title {
173 font-size: 17px;
cf78883c 174 margin-left: 10px;
c8487f3f
C
175 }
176 }
177}
178
cf78883c 179@mixin fluid-videos-miniature-layout {
d39db21a
RK
180 margin-left: $not-expanded-horizontal-margins !important;
181 margin-right: $not-expanded-horizontal-margins !important;
c8487f3f 182
cf78883c
C
183 @media screen and (max-width: $mobile-view) {
184 width: auto;
185 margin: 0 !important;
c8487f3f 186
cf78883c
C
187 .videos {
188 text-align: center;
c8487f3f 189
cf78883c
C
190 ::ng-deep .video-miniature {
191 padding-right: 0;
192 height: auto;
193 width: 100%;
194 margin-bottom: 25px;
c8487f3f 195
cf78883c
C
196 .video-miniature-information {
197 width: 100% !important;
198 text-align: left;
199
200 span {
201 width: 100%;
202 }
203 }
204
205 .video-thumbnail {
206 border-radius: 0;
207 }
208 }
e66883b3 209 }
cf78883c
C
210 }
211
212 @media screen and (min-width: #{breakpoint(fhd)}) {
213 margin-left: 6vw !important;
214 margin-right: 6vw !important;
215 }
c8487f3f 216
cf78883c
C
217 @media screen and (min-width: $mobile-view) {
218
219 .videos {
220 --miniature-min-width: #{$video-thumbnail-width - 15px};
221 --miniature-max-width: #{$video-thumbnail-width};
222
223 display: grid;
224 column-gap: 5px;
225 grid-template-columns: repeat(
226 auto-fill,
227 minmax(
228 var(--miniature-min-width),
229 1fr
230 )
231 );
232
233 @media screen and (min-width: #{breakpoint(fhd)}) {
234 column-gap: 1%;
235 --miniature-min-width: #{$video-thumbnail-width};
236 }
237
238 .video-wrapper {
239 margin: 0 auto;
240 width: 100%;
c8487f3f 241
cf78883c
C
242 my-video-miniature {
243 display: block;
244 min-width: var(--miniature-min-width);
245 max-width: var(--miniature-max-width);
246 }
e66883b3 247 }
c8487f3f
C
248 }
249 }
250}