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