1
0
Fork 0
peertube/client/src/app/videos/+video-watch/video-watch.component.scss

608 lines
12 KiB
SCSS
Raw Normal View History

2017-12-11 16:36:46 +00:00
@import '_variables';
@import '_mixins';
@import '_bootstrap-variables';
2019-03-13 13:18:58 +00:00
@import '_miniature';
2019-03-18 09:26:53 +00:00
$player-factor: 1.7; // 16/9
2019-12-15 20:27:37 +00:00
$video-info-margin-left: 44px;
2017-12-11 16:36:46 +00:00
2019-03-18 09:26:53 +00:00
@function getPlayerHeight($width){
@return calc(#{$width} / #{$player-factor})
}
@function getPlayerWidth($height){
@return calc(#{$height} * #{$player-factor})
}
@mixin playlist-below-player {
width: 100% !important;
height: auto !important;
max-height: 300px !important;
2019-05-17 12:17:38 +00:00
max-width: initial;
border-bottom: 1px solid $separator-border-color !important;
2019-03-18 09:26:53 +00:00
}
.root {
&.theater-enabled #video-wrapper {
flex-direction: column;
justify-content: center;
#videojs-wrapper {
width: 100%;
}
2019-07-24 14:12:35 +00:00
::ng-deep .video-js {
2019-03-18 09:26:53 +00:00
$height: calc(100vh - #{$header-height} - #{$theater-bottom-space});
height: $height;
width: 100%;
2019-08-06 07:49:46 +00:00
max-width: initial;
2019-03-18 09:26:53 +00:00
}
2019-07-24 14:12:35 +00:00
my-video-watch-playlist ::ng-deep .playlist {
2019-03-18 09:26:53 +00:00
@include playlist-below-player;
}
}
2018-08-14 07:08:47 +00:00
}
.blocked-label {
2018-08-14 07:08:47 +00:00
font-weight: $font-semibold;
}
2019-03-13 13:18:58 +00:00
#video-wrapper {
2017-12-05 09:44:11 +00:00
background-color: #000;
display: flex;
justify-content: center;
2019-04-05 13:23:41 +00:00
#videojs-wrapper {
display: flex;
justify-content: center;
flex-grow: 1;
}
.remote-server-down {
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
justify-content: center;
background-color: #141313;
width: 100%;
font-size: 24px;
2018-07-17 15:06:34 +00:00
height: 500px;
@media screen and (max-width: 1000px) {
font-size: 20px;
}
2017-12-07 09:02:01 +00:00
2018-02-28 08:39:08 +00:00
@media screen and (max-width: 600px) {
font-size: 16px;
2017-12-11 08:08:15 +00:00
}
}
2019-07-24 14:12:35 +00:00
::ng-deep .video-js {
2019-08-02 09:16:42 +00:00
width: 100%;
max-width: getPlayerWidth(66vh);
2019-02-20 10:42:30 +00:00
height: 66vh;
2018-07-17 15:06:34 +00:00
2017-12-07 09:02:01 +00:00
// VideoJS create an inner video player
video {
outline: 0;
2017-12-11 08:08:15 +00:00
position: relative !important;
2017-12-07 09:02:01 +00:00
}
2017-12-05 09:44:11 +00:00
}
2018-06-11 14:49:56 +00:00
2018-07-17 15:06:34 +00:00
@media screen and (max-width: 600px) {
.remote-server-down,
2019-07-24 14:12:35 +00:00
::ng-deep .video-js {
2018-07-17 15:06:34 +00:00
width: 100vw;
2019-03-18 09:26:53 +00:00
height: getPlayerHeight(100vw)
2018-07-17 15:06:34 +00:00
}
2018-06-11 14:49:56 +00:00
}
}
.alert {
text-align: center;
border-radius: 0;
}
.flex-direction-column {
flex-direction: column;
}
#video-not-found {
height: 300px;
line-height: 300px;
margin-top: 50px;
text-align: center;
2017-12-21 14:24:49 +00:00
font-weight: $font-semibold;
font-size: 15px;
}
2017-12-06 16:15:59 +00:00
.video-bottom {
2019-03-18 09:26:53 +00:00
display: flex;
2017-12-06 16:15:59 +00:00
margin-top: 40px;
2017-12-06 16:15:59 +00:00
.video-info {
flex-grow: 1;
2018-03-26 07:36:30 +00:00
// Set min width for flex item
min-width: 1px;
2018-09-17 13:28:32 +00:00
max-width: 100%;
2017-05-01 16:05:28 +00:00
2018-01-31 10:38:05 +00:00
.video-info-first-row {
2017-12-06 16:15:59 +00:00
display: flex;
2018-01-31 10:38:05 +00:00
& > div:first-child {
2018-01-31 10:38:05 +00:00
flex-grow: 1;
}
2017-12-06 16:15:59 +00:00
.video-info-name {
2017-12-12 13:41:59 +00:00
margin-right: 30px;
min-height: 40px; // Align with the action buttons
2017-12-06 16:15:59 +00:00
font-size: 27px;
font-weight: $font-semibold;
flex-grow: 1;
}
2017-04-21 14:40:45 +00:00
.video-info-first-row-bottom {
display: flex;
flex-wrap: wrap;
align-items: center;
width: 100%;
}
2018-01-31 10:38:05 +00:00
.video-info-date-views {
align-self: start;
2018-09-05 09:20:44 +00:00
margin-bottom: 10px;
margin-right: 10px;
font-size: 1em;
2018-01-31 10:38:05 +00:00
}
.video-info-channel {
font-weight: $font-semibold;
font-size: 15px;
a {
@include disable-default-a-behaviour;
color: pvar(--mainForegroundColor);
&:hover {
opacity: 0.8;
}
img {
@include avatar(18px);
margin: -2px 5px 0 0;
}
}
2018-08-21 14:18:59 +00:00
2019-12-15 20:27:37 +00:00
.video-info-channel-left {
flex-grow: 1;
2018-01-31 10:38:05 +00:00
2019-12-15 20:27:37 +00:00
.video-info-channel-left-links {
display: flex;
flex-direction: column;
position: relative;
line-height: 1.37;
2019-12-15 20:27:37 +00:00
a:nth-of-type(2) {
font-weight: 500;
font-size: 90%;
}
}
}
2019-12-15 20:27:37 +00:00
my-subscribe-button {
margin-left: 5px;
}
2018-01-31 10:38:05 +00:00
}
2017-12-12 13:41:59 +00:00
2018-10-18 12:35:31 +00:00
my-feed {
margin-left: 5px;
margin-top: 1px;
}
2018-01-31 10:38:05 +00:00
.video-actions-rates {
margin: 0 0 10px 0;
align-items: start;
width: max-content;
margin-left: auto;
2017-04-21 14:40:45 +00:00
2018-01-31 10:38:05 +00:00
.video-actions {
height: 40px; // Align with the title
display: flex;
align-items: center;
2017-04-21 14:40:45 +00:00
2019-04-05 08:52:27 +00:00
.action-button:not(:first-child),
.action-dropdown,
my-video-actions-dropdown {
margin-left: 5px;
2018-01-31 10:38:05 +00:00
}
2017-12-07 09:27:33 +00:00
::ng-deep.action-button {
2018-01-31 10:38:05 +00:00
@include peertube-button;
@include button-with-icon(21px, 0, -1px);
@include apply-svg-color(pvar(--actionButtonColor));
2017-12-07 09:02:01 +00:00
font-size: 100%;
2018-01-31 10:38:05 +00:00
font-weight: $font-semibold;
display: inline-block;
padding: 0 10px 0 10px;
2018-02-20 15:13:05 +00:00
white-space: nowrap;
background-color: transparent !important;
color: pvar(--actionButtonColor);
text-transform: uppercase;
2017-12-07 09:02:01 +00:00
&::after {
display: none;
}
&:hover {
opacity: 0.9;
}
&.action-button-like,
&.action-button-dislike {
filter: brightness(120%);
.count {
margin-right: 5px;
}
}
2018-01-31 10:38:05 +00:00
&.action-button-like.activated {
.count {
color: pvar(--activatedActionButtonColor);
}
my-global-icon {
@include apply-svg-color(pvar(--activatedActionButtonColor));
2018-01-31 10:38:05 +00:00
}
2017-12-07 09:02:01 +00:00
}
2018-01-31 10:38:05 +00:00
&.action-button-dislike.activated {
.count {
color: pvar(--activatedActionButtonColor);
}
my-global-icon {
@include apply-svg-color(pvar(--activatedActionButtonColor));
2018-01-31 10:38:05 +00:00
}
2017-12-07 09:02:01 +00:00
}
2019-12-03 19:10:27 +00:00
&.action-button-support {
color: pvar(--supportButtonColor);
2019-12-03 19:10:27 +00:00
my-global-icon {
@include apply-svg-color(pvar(--supportButtonColor));
2019-12-03 19:10:27 +00:00
}
}
2019-12-03 19:10:27 +00:00
&.action-button-support {
2019-12-03 19:10:27 +00:00
my-global-icon {
::ng-deep path:first-child {
fill: pvar(--supportButtonHeartColor) !important;
}
2019-12-03 19:10:27 +00:00
}
}
2019-03-07 16:06:00 +00:00
&.action-button-save {
my-global-icon {
top: 0 !important;
right: -1px;
}
}
.icon-text {
margin-left: 3px;
}
2017-12-06 16:15:59 +00:00
}
2017-07-06 15:18:10 +00:00
}
2017-12-06 17:04:40 +00:00
.video-info-likes-dislikes-bar-outer-container {
2019-12-15 23:13:31 +00:00
position: relative;
}
.video-info-likes-dislikes-bar-inner-container {
2019-12-15 23:13:31 +00:00
position: absolute;
height: 20px;
2019-12-15 23:13:31 +00:00
}
2018-01-31 10:38:05 +00:00
.video-info-likes-dislikes-bar {
$likes-bar-height: 2px;
height: $likes-bar-height;
margin-top: -$likes-bar-height;
width: 120px;
background-color: #ccc;
position: relative;
top: 10px;
2017-12-06 17:04:40 +00:00
2018-01-31 10:38:05 +00:00
.likes-bar {
height: 100%;
background-color: #909090;
&.liked {
background-color: pvar(--activatedActionButtonColor);
}
2018-01-31 10:38:05 +00:00
}
2017-12-06 17:04:40 +00:00
}
}
}
2017-12-06 16:15:59 +00:00
.video-info-description {
margin: 20px 0;
2019-12-15 20:27:37 +00:00
margin-left: $video-info-margin-left;
2017-12-06 16:15:59 +00:00
font-size: 15px;
.video-info-description-html {
2018-04-20 06:19:46 +00:00
@include peertube-word-wrap;
/deep/ a {
text-decoration: none;
}
}
.glyphicon, .description-loading {
margin-left: 3px;
}
.description-loading {
display: inline-block;
}
2017-12-06 16:15:59 +00:00
.video-info-description-more {
cursor: pointer;
2017-12-06 16:15:59 +00:00
font-weight: $font-semibold;
color: pvar(--greyForegroundColor);
2017-12-06 16:15:59 +00:00
font-size: 14px;
.glyphicon {
position: relative;
top: 2px;
}
}
2017-04-21 14:40:45 +00:00
}
2019-12-15 20:27:37 +00:00
.video-attributes {
margin-left: $video-info-margin-left;
}
2018-01-31 10:38:05 +00:00
.video-attributes .video-attribute {
font-size: 13px;
display: block;
margin-bottom: 12px;
.video-attribute-label {
2019-01-12 13:45:39 +00:00
min-width: 142px;
padding-right: 5px;
2018-01-31 10:38:05 +00:00
display: inline-block;
color: pvar(--greyForegroundColor);
2018-01-31 10:38:05 +00:00
font-weight: $font-bold;
2017-05-01 16:05:28 +00:00
}
a.video-attribute-value {
@include disable-default-a-behaviour;
color: pvar(--mainForegroundColor);
&:hover {
opacity: 0.9;
}
}
&.video-attribute-tags {
.video-attribute-value:not(:nth-child(2)) {
&::before {
content: ', '
}
}
}
2017-05-01 16:05:28 +00:00
}
}
2019-07-24 14:12:35 +00:00
::ng-deep .other-videos {
padding-left: 15px;
min-width: $video-miniature-width;
@media screen and (min-width: 1800px - (3* $video-miniature-width)) {
width: min-content;
}
.title-page {
2019-12-15 20:27:37 +00:00
margin: 0 !important;
}
2018-09-05 09:20:44 +00:00
.video-miniature {
display: flex;
width: max-content;
height: 100%;
margin-bottom: 20px;
flex-wrap: wrap;
2019-12-17 21:42:19 +00:00
}
2017-11-06 10:46:11 +00:00
2019-12-17 21:42:19 +00:00
.video-bottom {
@media screen and (max-width: 1800px - (3* $video-miniature-width)) {
margin-left: 1rem;
}
@media screen and (max-width: 500px) {
margin-left: 0;
margin-top: .5rem;
}
}
2017-11-06 10:46:11 +00:00
}
}
my-video-comments {
display: inline-block;
width: 100%;
margin-bottom: 20px;
}
// If the view is not expanded, take into account the menu
.privacy-concerns {
z-index: z(dropdown) + 1;
width: calc(100% - #{$menu-width});
}
2018-09-05 09:20:44 +00:00
@media screen and (max-width: $small-view) {
.privacy-concerns {
2019-04-15 07:43:23 +00:00
margin-left: $menu-width - 15px; // Menu is absolute
2018-09-05 09:20:44 +00:00
}
}
:host-context(.expanded) {
.privacy-concerns {
width: 100%;
2019-04-15 07:43:23 +00:00
margin-left: -15px;
}
}
.privacy-concerns {
position: fixed;
bottom: 0;
z-index: z(privacymsg);
padding: 5px 15px;
display: flex;
2019-04-15 07:43:23 +00:00
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
background-color: rgba(0, 0, 0, 0.9);
color: #fff;
.privacy-concerns-text {
margin: 0 5px;
}
a {
@include disable-default-a-behaviour;
color: pvar(--mainColor);
transition: color 0.3s;
&:hover {
color: #fff;
}
}
.privacy-concerns-button {
padding: 5px 8px 5px 7px;
margin-left: auto;
border-radius: 3px;
white-space: nowrap;
cursor: pointer;
transition: background-color 0.3s;
font-weight: $font-semibold;
&:hover {
background-color: #000;
}
}
.privacy-concerns-okay {
background-color: pvar(--mainColor);
margin-left: 10px;
}
}
2018-02-20 15:13:05 +00:00
@media screen and (max-width: 1600px) {
2018-09-05 09:20:44 +00:00
.video-bottom .video-info .video-attributes .video-attribute {
margin-bottom: 5px;
2017-12-11 08:08:15 +00:00
}
}
2017-12-12 13:41:59 +00:00
@media screen and (max-width: 1300px) {
.privacy-concerns {
font-size: 12px;
padding: 2px 5px;
.privacy-concerns-text {
margin: 0;
}
}
2018-02-20 15:13:05 +00:00
}
2019-03-18 09:26:53 +00:00
@media screen and (max-width: 1100px) {
2019-04-05 13:23:41 +00:00
#video-wrapper {
flex-direction: column;
justify-content: center;
2019-07-24 14:12:35 +00:00
my-video-watch-playlist ::ng-deep .playlist {
2019-04-05 13:23:41 +00:00
@include playlist-below-player;
}
}
2019-03-18 09:26:53 +00:00
.video-bottom {
flex-direction: column;
2019-07-24 14:12:35 +00:00
::ng-deep .other-videos {
2019-03-18 09:26:53 +00:00
padding-left: 0 !important;
2019-07-24 14:12:35 +00:00
::ng-deep .video-miniature {
2019-03-18 09:26:53 +00:00
flex-direction: row;
width: auto;
}
}
}
}
2018-01-31 10:38:05 +00:00
@media screen and (max-width: 600px) {
2017-12-12 13:41:59 +00:00
.video-bottom {
margin-top: 20px !important;
margin-bottom: 20px !important;
2018-01-31 10:38:05 +00:00
.video-info {
2018-09-20 12:49:12 +00:00
padding: 0;
2018-01-31 10:38:05 +00:00
.video-info-first-row {
.video-info-name {
font-size: 20px;
height: auto;
}
}
}
2017-12-12 13:41:59 +00:00
}
2019-07-24 14:12:35 +00:00
::ng-deep .other-videos .video-miniature {
2019-03-18 09:26:53 +00:00
flex-direction: column;
2018-07-24 15:54:43 +00:00
}
.privacy-concerns {
width: 100%;
strong {
display: none;
}
}
2017-12-12 13:41:59 +00:00
}
2018-02-20 15:13:05 +00:00
@media screen and (max-width: 450px) {
2018-09-20 12:49:12 +00:00
.video-bottom {
.action-button .icon-text {
display: none !important;
}
.video-info .video-info-first-row {
.video-info-name {
font-size: 18px;
}
.video-info-date-views {
font-size: 14px;
}
.video-actions-rates {
margin-top: 10px;
}
}
.video-info-description {
font-size: 14px !important;
}
2018-02-20 15:13:05 +00:00
}
}