]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/+videos/+video-watch/video-watch.component.scss
Move watch action buttons in a dedicated component
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-watch / video-watch.component.scss
CommitLineData
8cbc40b2
C
1@use 'sass:math';
2@use '_variables' as *;
3@use '_mixins' as *;
fa12eacc 4@use '_bootstrap-variables';
8cbc40b2 5@use '_miniature' as *;
19f22055 6
931d3430 7@function getPlayerHeight ($width) {
b0c43e36 8 @return calc(#{$width} / #{$video-watch-player-factor});
9a18a625
C
9}
10
931d3430 11@function getPlayerWidth ($height) {
b0c43e36 12 @return calc(#{$height} * #{$video-watch-player-factor});
9a18a625
C
13}
14
15@mixin playlist-below-player {
72675ebe
C
16 width: 100% !important;
17 height: auto !important;
18 max-height: 300px !important;
67c68723 19 max-width: initial;
72675ebe 20 border-bottom: 1px solid $separator-border-color !important;
9a18a625
C
21}
22
23.root {
9a18a625 24 &.theater-enabled #video-wrapper {
931d3430
C
25 $height: calc(100vh - #{$header-height} - #{$theater-bottom-space});
26
9a18a625
C
27 flex-direction: column;
28 justify-content: center;
29
30 #videojs-wrapper {
31 width: 100%;
f8c00564 32 height: $height;
9a18a625
C
33 }
34
03652b31 35 ::ng-deep .video-js {
9a18a625
C
36 height: $height;
37 width: 100%;
466e3f20 38 max-width: initial;
9a18a625
C
39 }
40
03652b31 41 my-video-watch-playlist ::ng-deep .playlist {
9a18a625
C
42 @include playlist-below-player;
43 }
44 }
191764f3
C
45}
46
5baee5fc 47.blocked-label {
191764f3
C
48 font-weight: $font-semibold;
49}
50
0114ee15
C
51.placeholder-image {
52 height: 100%;
53}
54
e2f01c47 55#video-wrapper {
a5cf76af
C
56 $video-height: 66vh;
57
be6a4802
C
58 background-color: #000;
59 display: flex;
60 justify-content: center;
6d88de72 61
3143ae17
C
62 #videojs-wrapper {
63 display: flex;
64 justify-content: center;
65 flex-grow: 1;
a5cf76af 66 height: $video-height;
3143ae17
C
67 }
68
6d88de72
C
69 .remote-server-down {
70 color: #fff;
71 display: flex;
72 flex-direction: column;
73 align-items: center;
74 text-align: center;
75 justify-content: center;
76 background-color: #141313;
77 width: 100%;
6d88de72 78 font-size: 24px;
3b492bff 79 height: 500px;
6d88de72
C
80
81 @media screen and (max-width: 1000px) {
82 font-size: 20px;
83 }
7b272fd7 84
acbffe9c 85 @media screen and (max-width: 600px) {
6d88de72 86 font-size: 16px;
b9828abe 87 }
6d88de72
C
88 }
89
03652b31 90 ::ng-deep .video-js {
58f3c3f1
C
91 width: 100%;
92 max-width: getPlayerWidth(66vh);
a5cf76af 93 height: $video-height;
3b492bff 94
7b272fd7
C
95 // VideoJS create an inner video player
96 video {
97 outline: 0;
b9828abe 98 position: relative !important;
7b272fd7 99 }
be6a4802 100 }
054a103b 101
3b492bff 102 @media screen and (max-width: 600px) {
dc13623b
C
103 #videojs-wrapper {
104 height: getPlayerHeight(100vw) !important;
105 }
106
3b492bff 107 .remote-server-down,
03652b31 108 ::ng-deep .video-js {
3b492bff 109 width: 100vw;
dc13623b 110 height: getPlayerHeight(100vw) !important;
3b492bff 111 }
054a103b 112 }
e56b20f5
C
113}
114
bbe0f064 115.alert {
2186386c 116 text-align: center;
2b3f1919 117 border-radius: 0;
2186386c
C
118}
119
7fc441cc
RK
120.flex-direction-column {
121 flex-direction: column;
122}
123
9c89a45c
C
124#video-not-found {
125 height: 300px;
126 line-height: 300px;
127 margin-top: 50px;
128 text-align: center;
fb4fd623
C
129 font-weight: $font-semibold;
130 font-size: 15px;
9c89a45c
C
131}
132
b1fa3eba 133.video-bottom {
9a18a625 134 display: flex;
46788f21 135 margin-top: 1.5rem;
d1992b93 136
b1fa3eba
C
137 .video-info {
138 flex-grow: 1;
20acba1c
C
139 // Set min width for flex item
140 min-width: 1px;
e452d2e2 141 max-width: 100%;
3eeeb87f 142
1f788f20 143 .video-info-first-row {
b1fa3eba 144 display: flex;
1f788f20 145
931d3430 146 > div:first-child {
1f788f20
C
147 flex-grow: 1;
148 }
d1992b93 149
b1fa3eba 150 .video-info-name {
b45afe12
C
151 @include peertube-word-wrap;
152
27bc9586 153 @include margin-right(30px);
06a55579 154
196b7790 155 min-height: 40px; // Align with the action buttons
b1fa3eba
C
156 font-size: 27px;
157 font-weight: $font-semibold;
158 flex-grow: 1;
159 }
09223546 160
7fc441cc 161 .video-info-first-row-bottom {
5def76eb
RK
162 display: flex;
163 flex-wrap: wrap;
7fc441cc
RK
164 align-items: center;
165 width: 100%;
166 }
167
1f788f20 168 .video-info-date-views {
27bc9586
C
169 @include margin-right(10px);
170
8ff3f883 171 margin-bottom: 10px;
27bc9586 172 align-self: start;
a0dedc02 173 font-size: 1em;
1f788f20
C
174 }
175
176 .video-info-channel {
177 font-weight: $font-semibold;
178 font-size: 15px;
95166f9a
C
179
180 a {
181 @include disable-default-a-behaviour;
b45afe12 182 @include peertube-word-wrap;
95166f9a 183
e66883b3 184 color: pvar(--mainForegroundColor);
95166f9a
C
185
186 &:hover {
187 opacity: 0.8;
188 }
189 }
22a16e36 190
dd4f25ee
RK
191 .video-info-channel-left {
192 flex-grow: 1;
1f788f20 193
dd4f25ee
RK
194 .video-info-channel-left-links {
195 display: flex;
196 flex-direction: column;
197 position: relative;
9d45db29 198 line-height: 1.37;
b7f5b524 199
dd4f25ee 200 a:nth-of-type(2) {
26171379 201 font-weight: $font-regular;
dd4f25ee
RK
202 font-size: 90%;
203 }
b40a2193
K
204
205 a.single-link {
206 margin-top: 7px;
207 }
b7f5b524
C
208 }
209 }
6e33bf28 210
dd4f25ee 211 my-subscribe-button {
27bc9586 212 @include margin-left(5px);
6e33bf28 213 }
1f788f20 214 }
d1992b93
C
215 }
216
dd4f25ee 217 .video-attributes {
b0c43e36 218 @include margin-left($video-watch-info-margin-left);
dd4f25ee
RK
219 }
220
1f788f20
C
221 .video-attributes .video-attribute {
222 font-size: 13px;
223 display: block;
224 margin-bottom: 12px;
225
226 .video-attribute-label {
27bc9586
C
227 @include padding-right(5px);
228
adb115f5 229 min-width: 142px;
1f788f20 230 display: inline-block;
e66883b3 231 color: pvar(--greyForegroundColor);
1f788f20 232 font-weight: $font-bold;
3eeeb87f 233 }
4278710d
C
234
235 a.video-attribute-value {
236 @include disable-default-a-behaviour;
e66883b3 237 color: pvar(--mainForegroundColor);
4278710d
C
238
239 &:hover {
240 opacity: 0.9;
241 }
242 }
243
244 &.video-attribute-tags {
245 .video-attribute-value:not(:nth-child(2)) {
246 &::before {
931d3430 247 content: ', ';
4278710d
C
248 }
249 }
250 }
3eeeb87f 251 }
41c3dfac 252 }
0f7407d9 253}
41c3dfac 254
06a55579
C
255my-action-buttons {
256 @include margin-left(auto);
257 @include margin-right(0);
258
259 display: block;
260 margin-top: 0;
261 margin-bottom: 10px;
262
263 align-items: start;
264 width: max-content;
265}
266
0f7407d9 267my-recommended-videos {
27bc9586
C
268 @include padding-left(15px);
269
0f7407d9 270 display: block;
0f7407d9 271 min-width: 250px;
d1992b93 272}
41c3dfac 273
1d6587aa
C
274my-video-comments {
275 display: inline-block;
66467298 276 width: 100%;
1d6587aa
C
277 margin-bottom: 20px;
278}
279
07fa4c97 280@media screen and (max-width: 1600px) {
8ff3f883
C
281 .video-bottom .video-info .video-attributes .video-attribute {
282 margin-bottom: 5px;
b9828abe
C
283 }
284}
b2731bff 285
0f7407d9 286// Use the same breakpoint than in the typescript component to display the other video miniatures as row
9a18a625 287@media screen and (max-width: 1100px) {
3143ae17
C
288 #video-wrapper {
289 flex-direction: column;
290 justify-content: center;
291
03652b31 292 my-video-watch-playlist ::ng-deep .playlist {
3143ae17
C
293 @include playlist-below-player;
294 }
295 }
296
9a18a625
C
297 .video-bottom {
298 flex-direction: column;
0f7407d9 299 }
9a18a625 300
0f7407d9 301 my-recommended-videos {
27bc9586 302 @include padding-left(0);
9a18a625
C
303 }
304}
305
1f788f20 306@media screen and (max-width: 600px) {
b2731bff 307 .video-bottom {
c2a89b70 308 margin-top: 20px !important;
46788f21 309 padding-bottom: 20px !important;
1f788f20
C
310
311 .video-info {
93ea9c47 312 padding: 0;
1f788f20
C
313
314 .video-info-first-row {
315
316 .video-info-name {
317 font-size: 20px;
318 height: auto;
319 }
320 }
321 }
b2731bff
C
322 }
323}
07fa4c97
C
324
325@media screen and (max-width: 450px) {
93ea9c47 326 .video-bottom {
93ea9c47
C
327 .video-info .video-info-first-row {
328 .video-info-name {
329 font-size: 18px;
330 }
331
332 .video-info-date-views {
333 font-size: 14px;
334 }
93ea9c47 335 }
07fa4c97 336 }
06a55579
C
337
338 my-action-buttons {
339 margin-top: 10px;
340 }
07fa4c97 341}
d45f3641
C
342
343
344// Special case for iOS, that takes into account the width for fullscreens
345#video-wrapper ::ng-deep .video-js.vjs-fullscreen {
346 max-width: unset;
347}