]> git.proxmox.com Git - mirror_novnc.git/blob - app/styles/base.css
Allow moving the controlbar handle
[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_submit {
287 float: right;
288 }
289
290 :root:not(.noVNC_connected) #noVNC_view_drag_button {
291 display: none;
292 }
293
294 /* noVNC Touch Device only buttons */
295 :root:not(.noVNC_connected) #noVNC_mobile_buttons {
296 display: none;
297 }
298 :root:not(.noVNC_touch) #noVNC_mobile_buttons {
299 display: none;
300 }
301
302 #noVNC_keyboardinput {
303 width: 1px;
304 height: 1px;
305 background-color: #fff;
306 color: #fff;
307 border: 0;
308 position: relative;
309 left: -40px;
310 z-index: -1;
311 ime-mode: disabled;
312 }
313
314 /* Extra manual keys */
315 :root:not(.noVNC_connected) #noVNC_extra_keys {
316 display: none;
317 }
318
319 /* Send Ctrl+Alt+Delete */
320 :root:not(.noVNC_connected) #noVNC_send_ctrl_alt_del_button {
321 display: none;
322 }
323
324 #noVNC_modifiers {
325 background-color: rgb(92, 92, 92);
326 border: none;
327 padding: 0 10px;
328 }
329
330 /* XVP Shutdown/Reboot */
331 :root:not(.noVNC_connected) #noVNC_xvp_button {
332 display: none;
333 }
334 #noVNC_xvp {
335 }
336 #noVNC_xvp_buttons {
337 display: none;
338 }
339
340 /* Clipboard */
341 :root:not(.noVNC_connected) #noVNC_clipboard_button {
342 display: none;
343 }
344 #noVNC_clipboard {
345 /* Full screen, minus padding and left and right margins */
346 max-width: calc(100vw - 2*15px - 75px - 25px);
347 }
348 #noVNC_clipboard_text {
349 width: 500px;
350 max-width: 100%;
351 }
352
353 /* Settings */
354 #noVNC_settings {
355 }
356 #noVNC_settings ul {
357 list-style: none;
358 margin: 3px;
359 padding: 0px;
360 }
361 #noVNC_setting_path {
362 width: 100px;
363 }
364
365 /* Connection Controls */
366 :root.noVNC_connected #noVNC_connect_controls_button {
367 display: none;
368 }
369 :root:not(.noVNC_connected) #noVNC_disconnect_button {
370 display: none;
371 }
372 #noVNC_connect_controls ul {
373 list-style: none;
374 margin: 0px;
375 padding: 0px;
376 }
377 #noVNC_connect_controls li {
378 padding-bottom:8px;
379 }
380 #noVNC_setting_host {
381 width:150px;
382 }
383 #noVNC_setting_port {
384 width: 80px;
385 }
386 #noVNC_setting_password {
387 width: 150px;
388 }
389
390 /* ----------------------------------------
391 * Status Dialog
392 * ----------------------------------------
393 */
394
395 #noVNC_status {
396 position: fixed;
397 top: 0;
398 left: 0;
399 width: 100%;
400 z-index: 3;
401 transform: translateY(-100%);
402
403 transition: 0.5s ease-in-out;
404
405 visibility: hidden;
406 opacity: 0;
407
408 padding: 5px;
409
410 display: flex;
411 flex-direction: row;
412 justify-content: center;
413 align-content: center;
414
415 line-height: 25px;
416 word-wrap: break-word;
417 color: #fff;
418
419 border-bottom: 1px solid rgba(0, 0, 0, 0.9);
420 }
421 #noVNC_status.noVNC_open {
422 transform: translateY(0);
423 visibility: visible;
424 opacity: 1;
425 }
426
427 #noVNC_status::before {
428 content: "";
429 display: inline-block;
430 width: 25px;
431 height: 25px;
432 margin-right: 5px;
433 }
434
435 #noVNC_status.noVNC_status_normal {
436 background: rgba(128,128,128,0.9);
437 }
438 #noVNC_status.noVNC_status_normal::before {
439 content: url("../images/info.svg") " ";
440 }
441 #noVNC_status.noVNC_status_error {
442 background: rgba(200,55,55,0.9);
443 }
444 #noVNC_status.noVNC_status_error::before {
445 content: url("../images/error.svg") " ";
446 }
447 #noVNC_status.noVNC_status_warn {
448 background: rgba(180,180,30,0.9);
449 }
450 #noVNC_status.noVNC_status_warn::before {
451 content: url("../images/warning.svg") " ";
452 }
453
454 /* ----------------------------------------
455 * Password Dialog
456 * ----------------------------------------
457 */
458
459 #noVNC_password_dlg {
460 transform: translateY(-50px);
461 }
462 #noVNC_password_dlg.noVNC_open {
463 transform: translateY(0);
464 }
465 #noVNC_password_dlg ul {
466 list-style: none;
467 margin: 0px;
468 padding: 0px;
469 }
470 #noVNC_password_dlg li {
471 padding-bottom:8px;
472 }
473 #noVNC_password_input {
474 width: 150px;
475 }
476
477 /* ----------------------------------------
478 * Main Area
479 * ----------------------------------------
480 */
481
482 #noVNC_container {
483 display: table;
484 width: 100%;
485 height: 100%;
486 background-color: #313131;
487 border-bottom-right-radius: 800px 600px;
488 /*border-top-left-radius: 800px 600px;*/
489 }
490
491 /* HTML5 Canvas */
492 #noVNC_screen {
493 position: absolute;
494 margin: 0px;
495 padding: 0px;
496 bottom: 0px;
497 top: 0px;
498 left: 0px;
499 right: 0px;
500 width: auto;
501 height: auto;
502 }
503 :root:not(.noVNC_connected) #noVNC_screen {
504 display: none;
505 }
506
507 /* Do not set width/height for VNC_canvas or incorrect
508 * scaling will occur. Canvas size depends on remote VNC
509 * settings and noVNC settings. */
510 #noVNC_canvas {
511 position: absolute;
512 left: 0;
513 right: 0;
514 margin-left: auto;
515 margin-right: auto;
516 }
517
518 /*Default noVNC logo.*/
519 /* From: http://fonts.googleapis.com/css?family=Orbitron:700 */
520 @font-face {
521 font-family: 'Orbitron';
522 font-style: normal;
523 font-weight: 700;
524 src: local('?'), url('Orbitron700.woff') format('woff'),
525 url('Orbitron700.ttf') format('truetype');
526 }
527
528 .noVNC_logo {
529 color:yellow;
530 text-align:left;
531 font-family: 'Orbitron', 'OrbitronTTF', sans-serif;
532 font-size: 13px;
533 line-height:90%;
534 text-shadow: 1px 1px 0 #000;
535 }
536 .noVNC_logo span{
537 color:green;
538 }
539
540 #noVNC_logo {
541 margin-top: 60px;
542 margin-left: 60px;
543 font-size: 180px;
544 text-shadow:
545 5px 5px 0 #000,
546 -1px -1px 0 #000,
547 1px -1px 0 #000,
548 -1px 1px 0 #000,
549 1px 1px 0 #000;
550 }
551 :root.noVNC_connected #noVNC_logo {
552 display: none;
553 }
554
555 /* ----------------------------------------
556 * Media sizing
557 * ----------------------------------------
558 */
559
560 @media screen and (max-width: 640px){
561 #noVNC_logo {
562 font-size: 150px;
563 }
564 }
565
566 @media screen and (min-width: 321px) and (max-width: 480px) {
567 #noVNC_logo {
568 font-size: 110px;
569 }
570 }
571
572 @media screen and (max-width: 320px) {
573 #noVNC_logo {
574 font-size: 90px;
575 }
576 }