]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/player/peertube-skin.scss
Translated using Weblate (Russian)
[github/Chocobozzz/PeerTube.git] / client / src / sass / player / peertube-skin.scss
CommitLineData
fa12eacc 1@use 'sass:math';
8cbc40b2
C
2@use '_variables' as *;
3@use '_mixins' as *;
4@use './_player-variables' as *;
3ec8dc09 5
122dbb57
C
6body {
7 --embedForegroundColor: #{$primary-foreground-color};
8
9 --embedBigPlayBackgroundColor: #{$primary-background-color};
10}
11
864e782b
C
12@mixin big-play-button-triangle-size($triangle-size) {
13 width: $triangle-size;
14 height: $triangle-size;
62ddc31a
C
15 top: calc(50% - #{math.div($triangle-size, 2)});
16 left: calc(53% - #{math.div($triangle-size, 2)});
864e782b
C
17}
18
be6a4802
C
19.video-js.vjs-peertube-skin {
20 font-size: $font-size;
e66883b3 21 color: pvar(--embedForegroundColor);
aa8b6df4 22
be6a4802
C
23 .vjs-audio-button {
24 display: none;
25 }
e14852b4 26
be6a4802 27 .vjs-big-play-button {
33d78552
C
28 $big-play-width: 1.2em;
29 $big-play-height: 1.2em;
e14852b4 30
8cbc40b2 31 @include margin-left(-(math.div($big-play-width, 2)));
27bc9586 32
931d3430
C
33 outline: 0;
34 font-size: 6em;
35
abb3097e 36 border: 2px solid #fff;
33d78552 37 border-radius: 100%;
e14852b4 38
e14852b4
C
39 left: 50%;
40 top: 50%;
8cac1b64
C
41 width: $big-play-width;
42 height: $big-play-height;
43 line-height: $big-play-height;
8cbc40b2 44 margin-top: -(math.div($big-play-height, 2));
2acb622c 45 transition: 0.2s background-color;
adcaf1a8
C
46
47 &::-moz-focus-inner {
48 border: 0;
931d3430 49 padding: 0;
adcaf1a8 50 }
80d1057b
C
51
52 .vjs-icon-placeholder::before {
864e782b
C
53 @include big-play-button-triangle-size(45px);
54
55 content: '';
2a19a1e4 56 background-image: url('#{$assets-path}/player/images/big-play-button.svg');
80d1057b
C
57 }
58
931d3430
C
59 &.focus-visible,
60 &:hover {
61 background-color: var(--mainColor, #696969);
80d1057b 62 }
8fa5653a
C
63 }
64
597ca6de 65 // Show poster and controls when playing audio-only content
66 &.vjs-playing-audio-only-content {
67 .vjs-poster {
68 display: block;
69 visibility: visible;
70 }
71
72 .vjs-control-bar {
73 opacity: $primary-foreground-opacity-hover;
74 }
75 }
76
41fafa9e 77 // Do not display poster when video is starting
78 &.vjs-has-autoplay:not(.vjs-has-started) {
79 .vjs-poster {
80 opacity: 0;
81 visibility: hidden;
82 }
83 }
84
e6f62797
C
85 // Hide the big play button on autoplay
86 &.vjs-has-autoplay {
87 .vjs-big-play-button {
88 display: none !important;
89 }
90 }
91
be6a4802
C
92 .vjs-control-bar,
93 .vjs-big-play-button,
c6352f2c 94 .vjs-settings-dialog {
e66883b3 95 background-color: pvar(--embedBigPlayBackgroundColor);
be6a4802 96 }
e14852b4 97
be6a4802 98 .vjs-poster {
be6a4802
C
99 outline: 0;
100 }
e14852b4 101
a5a79d15 102 @media screen and (max-width: $screen-width-750) {
6cf57b44
C
103 .vjs-big-play-button {
104 font-size: 5em;
e0812403 105 border-width: 3px;
6cf57b44
C
106
107 .vjs-icon-placeholder::before {
108 @include big-play-button-triangle-size(32px);
109 }
110 }
111 }
112
a5a79d15 113 @media screen and (max-width: $screen-width-570) {
8fa5653a 114 .vjs-big-play-button {
869968d7 115 font-size: 4.5em;
e0812403 116 border-width: 2.5px;
864e782b
C
117
118 .vjs-icon-placeholder::before {
119 @include big-play-button-triangle-size(27px);
120 }
8fa5653a 121 }
86f278cb
C
122 }
123
a5a79d15 124 @media screen and (max-width: $screen-width-350) {
8fa5653a 125 .vjs-big-play-button {
586f7c1b 126 font-size: 3em;
e0812403 127 border-width: 2px;
864e782b
C
128
129 .vjs-icon-placeholder::before {
130 @include big-play-button-triangle-size(20px);
131 }
8fa5653a 132 }
a86309b4 133 }
4555697f
C
134
135 // Theater mode is enabled
136 &.vjs-theater-enabled {
137 .vjs-theater-control {
138 width: 30px;
139
140 .vjs-icon-placeholder {
141 transform: scale(0.8);
142 }
143 }
144 }
145
146 // On fullscreen, hide theater control
147 &.vjs-fullscreen {
148 .vjs-theater-control {
149 display: none;
150 }
151 }
e14852b4 152}
b7a48512 153
c6352f2c
C
154// Play/pause animations
155.vjs-has-started .vjs-play-control {
156 &.vjs-playing {
157 animation: remove-pause-button 0.25s ease;
158 }
159
160 &.vjs-paused {
161 animation: add-play-button 0.25s ease;
162 }
163
164 @keyframes remove-pause-button {
165 0% {
166 transform: rotate(90deg);
167 }
168 100% {
169 transform: rotate(0deg);
170 }
171 }
172
173 @keyframes add-play-button {
174 0% {
175 transform: rotate(-90deg);
176 }
177 100% {
178 transform: rotate(0deg);
179 }
180 }
181}
182
bf5685f0
C
183// Error display disabled
184.vjs-error:not(.vjs-error-display-enabled) {
185 .vjs-error-display {
186 display: none;
187 }
188
189 .vjs-loading-spinner {
190 display: block;
191 }
192}
193
194// Error display enabled
195.vjs-error.vjs-error-display-enabled {
196 .vjs-error-display {
197 display: block;
198 }
e0812403 199}