]> git.proxmox.com Git - mirror_novnc.git/blob - app/styles/base.css
Clean up panel layouts
[mirror_novnc.git] / app / styles / base.css
1 /*
2 * noVNC base CSS
3 * Copyright (C) 2012 Joel Martin
4 * Copyright (C) 2016 Samuel Mannehed for Cendio AB
5 * Copyright (C) 2016 Pierre Ossman for Cendio AB
6 * noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
7 * This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
8 */
9
10 body {
11 margin:0;
12 padding:0;
13 font-family: Helvetica;
14 /*Background image with light grey curve.*/
15 background-color:#494949;
16 background-repeat:no-repeat;
17 background-position:right bottom;
18 height:100%;
19 }
20
21 html {
22 height:100%;
23 }
24
25 .noVNC_only_touch.noVNC_hidden {
26 display: none;
27 }
28
29 /* ----------------------------------------
30 * Input Elements
31 * ----------------------------------------
32 */
33
34 input[type=input], input[type=password], input:not([type]), textarea {
35 /* Disable default rendering */
36 -webkit-appearance: none;
37 -moz-appearance: none;
38 background: none;
39
40 margin: 2px;
41 padding: 2px;
42 border: 1px solid rgb(192, 192, 192);
43 border-radius: 5px;
44 color: black;
45 background: linear-gradient(to top, rgb(255, 255, 255) 80%, rgb(240, 240, 240));
46 }
47
48 input[type=button], select {
49 /* Disable default rendering */
50 -webkit-appearance: none;
51 -moz-appearance: none;
52 background: none;
53
54 margin: 2px;
55 padding: 2px;
56 border: 1px solid rgb(192, 192, 192);
57 border-bottom-width: 2px;
58 border-radius: 5px;
59 color: black;
60 background: linear-gradient(to top, rgb(255, 255, 255), rgb(240, 240, 240));
61
62 /* This avoids it jumping around when :active */
63 vertical-align: middle;
64 }
65
66 input[type=button] {
67 padding-left: 20px;
68 padding-right: 20px;
69 }
70
71 option {
72 color: black;
73 background: white;
74 }
75
76 input[type=input]:focus, input[type=password]:focus,
77 input:not([type]):focus, input[type=button]:focus,
78 textarea:focus, select:focus {
79 box-shadow: 0px 0px 3px rgba(74, 144, 217, 0.5);
80 border-color: rgb(74, 144, 217);
81 outline: none;
82 }
83
84 input[type=button]::-moz-focus-inner {
85 border: none;
86 }
87
88 input[type=input]:disabled, input[type=password]:disabled,
89 input:not([type]):disabled, input[type=button]:disabled,
90 textarea:disabled, select:disabled {
91 color: rgb(128, 128, 128);
92 background: rgb(240, 240, 240);
93 }
94
95 input[type=button]:active, select:active {
96 border-bottom-width: 1px;
97 margin-top: 3px;
98 }
99
100 /* ----------------------------------------
101 * WebKit centering hacks
102 * ----------------------------------------
103 */
104
105 .noVNC_center {
106 /*
107 * This is a workaround because webkit misrenders transforms and
108 * uses non-integer coordinates, resulting in blurry content.
109 * Ideally we'd use "top: 50%; transform: translateY(-50%);" on
110 * the objects instead.
111 */
112 display: flex;
113 align-items: center;
114 justify-content: center;
115 position: fixed;
116 top: 0;
117 left: 0;
118 width: 100%;
119 height: 100%;
120 pointer-events: none;
121 }
122 .noVNC_center > * {
123 pointer-events: auto;
124 }
125 .noVNC_vcenter {
126 display: flex;
127 flex-direction: column;
128 justify-content: center;
129 position: fixed;
130 top: 0;
131 left: 0;
132 height: 100%;
133 pointer-events: none;
134 }
135 .noVNC_vcenter > * {
136 pointer-events: auto;
137 }
138
139 /* ----------------------------------------
140 * Control Bar
141 * ----------------------------------------
142 */
143
144 #noVNC_control_bar_anchor {
145 /* The anchor is needed to get z-stacking to work */
146 position: fixed;
147 z-index: 2;
148
149 transition: 0.5s ease-in-out;
150
151 /* Edge misrenders animations wihthout this */
152 transform: translateX(0);
153 }
154 :root.noVNC_connected #noVNC_control_bar_anchor.noVNC_idle {
155 opacity: 0.8;
156 }
157
158 #noVNC_control_bar {
159 position: relative;
160 /* left: calc(-35px - 10px - 5px - 30px), but IE doesn't animate calc */
161 left: -80px;
162
163 transition: 0.5s ease-in-out;
164
165 background-color: rgb(110, 132, 163);
166 border-radius: 0 10px 10px 0;
167
168 /* The extra border is to get a proper shadow */
169 border-color: rgb(110, 132, 163);
170 border-style: solid;
171 border-width: 0 0 0 30px;
172 }
173 #noVNC_control_bar.noVNC_open {
174 box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.5);
175 left: -30px;
176 }
177
178 #noVNC_control_bar_handle {
179 position: absolute;
180 right: -15px;
181 top: 0;
182 transform: translateY(35px);
183 width: 50px;
184 height: 50px;
185 z-index: -2;
186 cursor: pointer;
187 border-radius: 0 5px 5px 0;
188 background-color: rgb(83, 99, 122);
189 background-image: url("../images/handle_bg.svg");
190 background-repeat: no-repeat;
191 background-position: right;
192 box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.5);
193 }
194 #noVNC_control_bar_handle:after {
195 content: "";
196 transition: 0.5s ease-in-out;
197 background: url("../images/handle.svg");
198 position: absolute;
199 top: 22px; /* (50px-6px)/2 */
200 right: 5px;
201 width: 5px;
202 height: 6px;
203 }
204 #noVNC_control_bar.noVNC_open #noVNC_control_bar_handle:after {
205 transform: translateX(1px) rotate(180deg);
206 }
207 :root:not(.noVNC_connected) #noVNC_control_bar_handle {
208 display: none;
209 }
210 #noVNC_control_bar_handle div {
211 position: absolute;
212 right: -35px;
213 top: 0;
214 width: 50px;
215 height: 50px;
216 }
217 :root:not(.noVNC_touch) #noVNC_control_bar_handle div {
218 display: none;
219 }
220
221 #noVNC_control_bar .noVNC_scroll {
222 max-height: 100vh; /* Chrome is buggy with 100% */
223 overflow-x: hidden;
224 overflow-y: auto;
225 padding: 0 10px 0 5px;
226 }
227
228 /* General button style */
229 .noVNC_button {
230 display: block;
231 padding: 4px 4px;
232 margin: 10px 0;
233 vertical-align: middle;
234 border:1px solid rgba(255, 255, 255, 0.2);
235 -webkit-border-radius: 6px;
236 -moz-border-radius: 6px;
237 border-radius: 6px;
238 }
239 .noVNC_button.noVNC_selected {
240 border-color: rgba(0, 0, 0, 0.8);
241 background: rgba(0, 0, 0, 0.5);
242 }
243 .noVNC_button:disabled {
244 opacity: 0.4;
245 }
246 .noVNC_button:focus {
247 outline: none;
248 }
249 .noVNC_button:active {
250 padding-top: 5px;
251 padding-bottom: 3px;
252 }
253 .noVNC_button.noVNC_hidden {
254 display: none;
255 }
256
257 /* Panels */
258 .noVNC_panel {
259 transform: translateX(25px);
260
261 transition: 0.5s ease-in-out;
262
263 max-height: 100vh; /* Chrome is buggy with 100% */
264 overflow-x: hidden;
265 overflow-y: auto;
266
267 visibility: hidden;
268 opacity: 0;
269
270 padding: 15px;
271
272 background: #fff;
273 -webkit-border-radius: 10px;
274 -moz-border-radius: 10px;
275 border-radius: 10px;
276 color: #000;
277 border: 2px solid #E0E0E0;
278 box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.5);
279 }
280 .noVNC_panel.noVNC_open {
281 visibility: visible;
282 opacity: 1;
283 transform: translateX(75px);
284 }
285
286 .noVNC_panel hr {
287 border: none;
288 border-top: 1px solid rgb(192, 192, 192);
289 }
290
291 .noVNC_panel label {
292 display: block;
293 }
294
295 .noVNC_submit {
296 float: right;
297 }
298
299 :root:not(.noVNC_connected) #noVNC_view_drag_button {
300 display: none;
301 }
302
303 /* noVNC Touch Device only buttons */
304 :root:not(.noVNC_connected) #noVNC_mobile_buttons {
305 display: none;
306 }
307 :root:not(.noVNC_touch) #noVNC_mobile_buttons {
308 display: none;
309 }
310
311 #noVNC_keyboardinput {
312 width: 1px;
313 height: 1px;
314 background-color: #fff;
315 color: #fff;
316 border: 0;
317 position: relative;
318 left: -40px;
319 z-index: -1;
320 ime-mode: disabled;
321 }
322
323 /* Extra manual keys */
324 :root:not(.noVNC_connected) #noVNC_extra_keys {
325 display: none;
326 }
327
328 #noVNC_modifiers {
329 background-color: rgb(92, 92, 92);
330 border: none;
331 padding: 0 10px;
332 }
333
334 /* XVP Shutdown/Reboot */
335 :root:not(.noVNC_connected) #noVNC_xvp_button {
336 display: none;
337 }
338 #noVNC_xvp {
339 }
340 #noVNC_xvp_buttons {
341 display: none;
342 }
343
344 #noVNC_xvp input[type=button] {
345 width: 100%;
346 }
347
348 /* Clipboard */
349 :root:not(.noVNC_connected) #noVNC_clipboard_button {
350 display: none;
351 }
352 #noVNC_clipboard {
353 /* Full screen, minus padding and left and right margins */
354 max-width: calc(100vw - 2*15px - 75px - 25px);
355 }
356 #noVNC_clipboard_text {
357 width: 500px;
358 max-width: 100%;
359 }
360
361 /* Settings */
362 #noVNC_settings {
363 }
364 #noVNC_settings ul {
365 list-style: none;
366 margin: 0px;
367 padding: 0px;
368 }
369 #noVNC_setting_path {
370 width: 100px;
371 }
372
373 /* Connection Controls */
374 :root.noVNC_connected #noVNC_connect_controls_button {
375 display: none;
376 }
377 :root:not(.noVNC_connected) #noVNC_disconnect_button {
378 display: none;
379 }
380 #noVNC_connect_controls ul {
381 list-style: none;
382 margin: 0px;
383 padding: 0px;
384 }
385 #noVNC_setting_port {
386 width: 80px;
387 }
388
389 /* ----------------------------------------
390 * Status Dialog
391 * ----------------------------------------
392 */
393
394 #noVNC_status {
395 position: fixed;
396 top: 0;
397 left: 0;
398 width: 100%;
399 z-index: 3;
400 transform: translateY(-100%);
401
402 transition: 0.5s ease-in-out;
403
404 visibility: hidden;
405 opacity: 0;
406
407 padding: 5px;
408
409 display: flex;
410 flex-direction: row;
411 justify-content: center;
412 align-content: center;
413
414 line-height: 25px;
415 word-wrap: break-word;
416 color: #fff;
417
418 border-bottom: 1px solid rgba(0, 0, 0, 0.9);
419 }
420 #noVNC_status.noVNC_open {
421 transform: translateY(0);
422 visibility: visible;
423 opacity: 1;
424 }
425
426 #noVNC_status::before {
427 content: "";
428 display: inline-block;
429 width: 25px;
430 height: 25px;
431 margin-right: 5px;
432 }
433
434 #noVNC_status.noVNC_status_normal {
435 background: rgba(128,128,128,0.9);
436 }
437 #noVNC_status.noVNC_status_normal::before {
438 content: url("../images/info.svg") " ";
439 }
440 #noVNC_status.noVNC_status_error {
441 background: rgba(200,55,55,0.9);
442 }
443 #noVNC_status.noVNC_status_error::before {
444 content: url("../images/error.svg") " ";
445 }
446 #noVNC_status.noVNC_status_warn {
447 background: rgba(180,180,30,0.9);
448 }
449 #noVNC_status.noVNC_status_warn::before {
450 content: url("../images/warning.svg") " ";
451 }
452
453 /* ----------------------------------------
454 * Password Dialog
455 * ----------------------------------------
456 */
457
458 #noVNC_password_dlg {
459 transform: translateY(-50px);
460 }
461 #noVNC_password_dlg.noVNC_open {
462 transform: translateY(0);
463 }
464 #noVNC_password_dlg ul {
465 list-style: none;
466 margin: 0px;
467 padding: 0px;
468 }
469
470 /* ----------------------------------------
471 * Main Area
472 * ----------------------------------------
473 */
474
475 #noVNC_container {
476 display: table;
477 width: 100%;
478 height: 100%;
479 background-color: #313131;
480 border-bottom-right-radius: 800px 600px;
481 /*border-top-left-radius: 800px 600px;*/
482 }
483
484 /* HTML5 Canvas */
485 #noVNC_screen {
486 position: absolute;
487 margin: 0px;
488 padding: 0px;
489 bottom: 0px;
490 top: 0px;
491 left: 0px;
492 right: 0px;
493 width: auto;
494 height: auto;
495 }
496 :root:not(.noVNC_connected) #noVNC_screen {
497 display: none;
498 }
499
500 /* Do not set width/height for VNC_canvas or incorrect
501 * scaling will occur. Canvas size depends on remote VNC
502 * settings and noVNC settings. */
503 #noVNC_canvas {
504 position: absolute;
505 left: 0;
506 right: 0;
507 margin-left: auto;
508 margin-right: auto;
509 }
510
511 /*Default noVNC logo.*/
512 /* From: http://fonts.googleapis.com/css?family=Orbitron:700 */
513 @font-face {
514 font-family: 'Orbitron';
515 font-style: normal;
516 font-weight: 700;
517 src: local('?'), url('Orbitron700.woff') format('woff'),
518 url('Orbitron700.ttf') format('truetype');
519 }
520
521 .noVNC_logo {
522 color:yellow;
523 text-align:left;
524 font-family: 'Orbitron', 'OrbitronTTF', sans-serif;
525 font-size: 13px;
526 line-height:90%;
527 text-shadow: 1px 1px 0 #000;
528 }
529 .noVNC_logo span{
530 color:green;
531 }
532
533 #noVNC_logo {
534 margin-top: 60px;
535 margin-left: 60px;
536 font-size: 180px;
537 text-shadow:
538 5px 5px 0 #000,
539 -1px -1px 0 #000,
540 1px -1px 0 #000,
541 -1px 1px 0 #000,
542 1px 1px 0 #000;
543 }
544 :root.noVNC_connected #noVNC_logo {
545 display: none;
546 }
547
548 /* ----------------------------------------
549 * Media sizing
550 * ----------------------------------------
551 */
552
553 @media screen and (max-width: 640px){
554 #noVNC_logo {
555 font-size: 150px;
556 }
557 }
558
559 @media screen and (min-width: 321px) and (max-width: 480px) {
560 #noVNC_logo {
561 font-size: 110px;
562 }
563 }
564
565 @media screen and (max-width: 320px) {
566 #noVNC_logo {
567 font-size: 90px;
568 }
569 }