]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/sass/bootstrap.scss
Put admin actions on the left
[github/Chocobozzz/PeerTube.git] / client / src / sass / bootstrap.scss
CommitLineData
2f4c784a
C
1$icon-font-path: '~@neos21/bootstrap3-glyphicons/assets/fonts/';
2@import '_bootstrap';
3
4@import '_variables';
5@import '_mixins';
6
7// Thanks https://gist.github.com/alexandrevicenzi/680147013e902a4eaa5d
8.glyphicon-refresh-animate {
9 animation: spin .7s infinite linear;
10}
11
f409f0c3
RK
12.flex-auto {
13 flex: auto;
14}
15
d3217560
RK
16.c-hand {
17 cursor: pointer;
18}
19
2f4c784a 20@keyframes spin {
a3705089
C
21 from {
22 transform: scale(1) rotate(0deg);
23 }
24 to {
25 transform: scale(1) rotate(360deg);
26 }
2f4c784a
C
27}
28
757ffdfe 29/* rules for dropdowns excepts when in button group, to avoid impacting the dropdown-toggle */
2856af48 30.dropdown {
f8cce49c 31 z-index: z(dropdown) !important;
2856af48 32}
26ede95e 33
2856af48
C
34.list-overflow-menu,
35.parent-entry {
36 z-index: z(header) - 1 !important;
eb7c7a51
RK
37}
38
2856af48
C
39.btn-group,
40.dropdown-root,
41.action-dropdown,
42.input-group-prepend,
43.column-toggle {
44 z-index: inherit !important;
45}
46
47
2f4c784a 48.dropdown-menu {
e0433a5f
C
49 z-index: z(dropdown) + 1 !important;
50
2f4c784a 51 border-radius: 3px;
6f6e89db 52 box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
2f4c784a
C
53 font-size: 15px;
54
0d3a2982
RK
55 .dropdown-header {
56 padding-left: 1rem;
57 }
58
2f4c784a
C
59 .dropdown-item {
60 padding: 3px 15px;
61
24e7916c 62 &.active {
e66883b3
RK
63 color: pvar(--mainBackgroundColor) !important;
64 background-color: pvar(--mainHoverColor);
24e7916c 65 opacity: .9;
2f4c784a 66 }
45c6bcf3 67
d3217560
RK
68 &::after {
69 display: none;
70 }
2f4c784a
C
71 }
72
73 button {
74 @include disable-default-a-behaviour;
75 }
76
77 a {
78 @include disable-default-a-behaviour;
79 color: #000 !important;
80 }
81}
82
3921166d 83
165ee292 84@media screen and (min-width: #{breakpoint(md)}) {
3921166d 85 .modal:before {
3921166d
RK
86 vertical-align: middle;
87 content: " ";
88 height: 100%;
89 }
90
91 .modal-dialog {
3921166d 92 text-align: left;
2bc9bd08
RK
93
94 &:not(.modal-lg):not(.modal-xl) {
95 min-width: 500px;
96 width: 40vw;
97 max-width: 900px;
98 }
3921166d
RK
99 }
100}
101
2f4c784a 102.modal {
3921166d
RK
103 text-align: center;
104
2f4c784a 105 .modal-content {
e66883b3 106 background-color: pvar(--mainBackgroundColor);
2f4c784a
C
107 }
108
109 .modal-header {
110 border-bottom: none;
111 margin-bottom: 5px;
112
113 .modal-title {
114 font-size: 20px;
115 font-weight: $font-semibold;
116 }
117
118 my-global-icon {
54e78847 119 @include icon(22px);
2f4c784a
C
120
121 position: relative;
54e78847 122 top: 5px;
2f4c784a
C
123 float: right;
124
125 margin: 0;
126 padding: 0;
54e78847 127 opacity: .5;
8319d6ae
RK
128
129 &[iconName="cross"] {
130 @include icon(16px);
131 top: -3px;
132 }
2f4c784a
C
133 }
134 }
135
136 .inputs {
137 margin-bottom: 0;
138 text-align: right;
139
140 .action-button-cancel {
141 @include peertube-button;
54e78847 142 @include tertiary-button;
2f4c784a
C
143
144 display: inline-block;
145 margin-right: 10px;
146 }
147
148 .action-button-submit {
149 @include peertube-button;
150 @include orange-button;
151 }
152 }
153}
154
8110705d 155
156// On desktop browsers, make the content and header horizontally sticked to right not move when modal open and close
157.modal-open {
158 overflow-y: scroll !important; // Make sure vertical scroll bar is always visible on desktop browsers to get disabled scrollbar effect
17384fd8 159 width: 100vw; // Make sure the content fits all the available width
8110705d 160}
161
245b9d27
K
162// On touchscreen devices, simply overflow: hidden to avoid detached overlay on scroll
163@media (hover: none) and (pointer: coarse) {
164 .modal-open, .menu-open {
165 overflow: hidden !important;
166 }
167
168 // On touchscreen devices display content overlay when opened menu
169 .menu-open {
170 .main-col {
171 &::before {
172 background-color: black;
173 width: 100vw;
174 height: 100vh;
175 opacity: 0.75;
176 content: '';
177 display: block;
178 position: fixed;
d6eace77 179 z-index: z('menu') - 1;
245b9d27
K
180 }
181 }
182 }
183}
184
2f4c784a
C
185// Nav customizations
186.nav .nav-link {
187 display: flex !important;
188 align-items: center;
189 height: 30px !important;
190 padding: 10px 15px !important;
191}
192
193.nav.nav-pills {
194 font-size: 16px !important;
ed5bb517 195 font-weight: $font-semibold !important;
2f4c784a 196
ed5bb517
K
197 .nav-link {
198 opacity: 0.6 !important;
199
200 &.active, &:hover, &:active, &:focus {
201 opacity: 1 !important;
202 }
2f4c784a
C
203 }
204
205 a {
206 @include disable-default-a-behaviour;
207
e66883b3 208 color: pvar(--mainForegroundColor);
2f4c784a
C
209 }
210}
211
ed5bb517
K
212.nav-tabs .nav-link {
213 @include disable-default-a-behaviour;
2f4c784a 214
ed5bb517
K
215 color: pvar(--mainForegroundColor);
216 font-weight: $font-semibold;
217 border: none;
218 border-bottom: 2px solid transparent;
219 opacity: 0.6;
2f4c784a 220
758f0d19 221 &.active {
ed5bb517 222 color: pvar(--mainForegroundColor);
e66883b3 223 background-color: pvar(--mainBackgroundColor) !important;
ed5bb517 224 border-bottom-color: pvar(--mainColor);
758f0d19 225 }
ed5bb517
K
226
227 &.active, &:hover, &:active, &:focus {
228 opacity: 1;
758f0d19 229 }
2f4c784a
C
230}
231
a4610bc6 232.card {
e66883b3 233 background-color: pvar(--mainBackgroundColor);
a4610bc6
JM
234 border-color: #dee2e6;
235}
236
2f4c784a
C
237.collapse-transition {
238 // Animation when we show/hide the filters
239 transition: max-height 0.3s;
240 display: block !important;
241 overflow: hidden !important;
242 max-height: 0;
243
244 &.show {
245 max-height: 1500px;
246 }
247}
bc584963
RK
248
249.dropdown-divider {
250 margin: 0.3rem 0;
000eb0e4
RK
251}
252
253ngb-modal-backdrop {
36f2981f
RK
254 z-index: z(modal) - 1 !important;
255}
256
257ngb-modal-window {
258 z-index: z(modal) !important;
000eb0e4 259}
aa0f1963 260
757ffdfe
RK
261ngb-popover-window {
262 z-index: z(popover) !important;
263}
264
265ngb-tooltip-window {
266 z-index: z(tooltip) !important;
267}
268
947d0102
RK
269.btn-outline-secondary {
270 border-color: $input-border-color;
271
272 &:focus-within,
273 &:focus,
274 &:hover {
275 color: #fff;
276 background-color: #6c757d;
277 }
278}
279
aa0f1963 280.btn-outline-tertiary {
e66883b3
RK
281 color: pvar(--secondaryColor);
282 border-color: pvar(--secondaryColor);
a3705089 283
947d0102
RK
284 &:focus-within,
285 &:focus,
aa0f1963 286 &:hover {
e66883b3
RK
287 color: pvar(--mainBackgroundColor);
288 background-color: pvar(--secondaryColor);
aa0f1963
RK
289 }
290}
a6d5ff76
RK
291
292// input box-shadow on focus
293.form-control {
294 font-size: 15px;
e66883b3
RK
295 color: pvar(--mainForegroundColor);
296 background-color: pvar(--inputBackgroundColor);
a6d5ff76
RK
297 outline: none;
298
299 &:focus-within,
300 &:focus {
e66883b3 301 box-shadow: #{$focus-box-shadow-form} pvar(--mainColorLightest);
a6d5ff76
RK
302
303 &.input-error {
6a4c30de 304 box-shadow: #{$focus-box-shadow-form} #{scale-color($red, $alpha: -75%)};
a6d5ff76
RK
305 }
306 }
307}
947d0102 308
0d3a2982
RK
309.input-group {
310 & > .form-control {
311 flex: initial;
312 }
25a42e29
RK
313 input.form-control {
314 width: unset !important;
315 flex-grow: 1;
0d3a2982
RK
316 }
317
318 .input-group-prepend + input {
319 border-top-left-radius: 0 !important;
320 border-bottom-left-radius: 0 !important;
321 }
947d0102 322}
25a42e29
RK
323
324.has-feedback.has-clear {
325 position: relative;
326
327 input {
328 padding-right: 1.5rem !important;
329 }
330
331 .form-control-clear {
332 color: rgba(0, 0, 0, 0.4);
333 /*
334 * Enable pointer events as they have been disabled since Bootstrap 3.3
335 * See https://github.com/twbs/bootstrap/pull/14104
336 */
337 pointer-events: all;
338 display: flex;
339 justify-content: center;
340 align-items: center;
341 position: absolute;
342 right: .5rem;
343 height: 95%;
4f5d0459 344 font-size: 14px;
25a42e29
RK
345
346 &:hover {
347 color: rgba(0, 0, 0, 0.7);
348 cursor: pointer;
349 }
350 }
351
352 input:placeholder-shown + .form-control-clear {
353 display: none;
354 }
355}