X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fvideos%2F%2Bvideo-watch%2Fvideo-watch.component.scss;h=2874847cd31c2d6f26487197eae03bd00a69941a;hb=11dd0c2e4202e7ad68d8b7e6706de846401d29ff;hp=281b9240b8a03e086bd796352b19e5f232534498;hpb=bce47964f6241ae56f61089d144b29eb9b5da6d3;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/videos/+video-watch/video-watch.component.scss b/client/src/app/videos/+video-watch/video-watch.component.scss index 281b9240b..2874847cd 100644 --- a/client/src/app/videos/+video-watch/video-watch.component.scss +++ b/client/src/app/videos/+video-watch/video-watch.component.scss @@ -4,9 +4,41 @@ @import '_miniature'; $other-videos-width: 260px; +$player-factor: 1.7; // 16/9 -.root-row { - flex-direction: column; +@function getPlayerHeight($width){ + @return calc(#{$width} / #{$player-factor}) +} + +@function getPlayerWidth($height){ + @return calc(#{$height} * #{$player-factor}) +} + +@mixin playlist-below-player { + width: 100%; + border-bottom: 1px solid $separator-border-color; +} + +.root { + &.theater-enabled #video-wrapper { + flex-direction: column; + justify-content: center; + + #videojs-wrapper { + width: 100%; + } + + /deep/ .video-js { + $height: calc(100vh - #{$header-height} - #{$theater-bottom-space}); + + height: $height; + width: 100%; + } + + .playlist { + @include playlist-below-player; + } + } } .blacklisted-label { @@ -17,7 +49,7 @@ $other-videos-width: 260px; background-color: #000; display: flex; justify-content: center; - flex-grow: 1; + margin: 0 -15px; .remote-server-down { color: #fff; @@ -93,14 +125,9 @@ $other-videos-width: 260px; } /deep/ .video-js { - width: calc(66vh * 1.77); + width: getPlayerWidth(66vh); height: 66vh; - &.vjs-theater-enabled { - height: calc(100vh - #{$header-height} - #{$theater-bottom-space}); - width: 100%; - } - // VideoJS create an inner video player video { outline: 0; @@ -112,7 +139,7 @@ $other-videos-width: 260px; .remote-server-down, /deep/ .video-js { width: 100vw; - height: calc(100vw / 1.7); // 16/9 + height: getPlayerHeight(100vw) } } } @@ -131,6 +158,7 @@ $other-videos-width: 260px; } .video-bottom { + display: flex; margin-top: 40px; .video-info { @@ -366,7 +394,7 @@ $other-videos-width: 260px; /deep/ .other-videos { padding-left: 15px; - width: $other-videos-width; + flex-basis: $other-videos-width; .title-page { margin-top: 0 !important; @@ -374,14 +402,11 @@ $other-videos-width: 260px; .video-miniature { display: flex; + width: $other-videos-width; height: 100%; margin-bottom: 20px; flex-wrap: wrap; - .video-miniature-information { - flex-grow: 1; - } - .video-thumbnail { margin-right: 10px } @@ -455,12 +480,6 @@ my-video-comments { } } -@media screen and (min-width: map-get($grid-breakpoints, xl)) { - .video-bottom .video-info { - max-width: calc(100% - #{$other-videos-width}); - } -} - @media screen and (max-width: 1600px) { .video-bottom .video-info .video-attributes .video-attribute { margin-bottom: 5px; @@ -478,9 +497,40 @@ my-video-comments { } } +@media screen and (max-width: 1100px) { + .video-bottom { + flex-direction: column; + + /deep/ .other-videos { + padding-left: 0 !important; + + /deep/ .video-miniature { + flex-direction: row; + width: auto; + } + } + } +} + +@media screen and (max-width: 900px) { + #video-wrapper { + flex-direction: column; + justify-content: center; + + #videojs-wrapper { + display: flex; + justify-content: center; + } + + .playlist { + @include playlist-below-player; + } + } +} + @media screen and (max-width: 600px) { .video-bottom { - margin: 20px 0 0 0; + margin: 20px 0 0 0 !important; .video-info { padding: 0; @@ -495,12 +545,8 @@ my-video-comments { } } - /deep/ .other-videos { - padding-left: 0 !important; - - /deep/ .video-miniature { - flex-direction: column; - } + /deep/ .other-videos .video-miniature { + flex-direction: column; } .privacy-concerns {