]> git.proxmox.com Git - mirror_novnc.git/blob - app/styles/base.css
Make control bar handle easier to hit on mobile
[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: 10%;
182 width: 50px;
183 height: 50px;
184 z-index: -2;
185 cursor: pointer;
186 border-radius: 0 5px 5px 0;
187 background-color: rgb(83, 99, 122);
188 background-image: url("../images/handle_bg.svg");
189 background-repeat: no-repeat;
190 background-position: right;
191 box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.5);
192 }
193 #noVNC_control_bar_handle:after {
194 content: "";
195 transition: 0.5s ease-in-out;
196 background: url("../images/handle.svg");
197 position: absolute;
198 top: 22px; /* (50px-6px)/2 */
199 right: 5px;
200 width: 5px;
201 height: 6px;
202 }
203 #noVNC_control_bar.noVNC_open #noVNC_control_bar_handle:after {
204 transform: translateX(1px) rotate(180deg);
205 }
206 :root:not(.noVNC_connected) #noVNC_control_bar_handle {
207 display: none;
208 }
209 #noVNC_control_bar_handle div {
210 position: absolute;
211 right: -35px;
212 top: 0;
213 width: 50px;
214 height: 50px;
215 }
216 :root:not(.noVNC_touch) #noVNC_control_bar_handle div {
217 display: none;
218 }
219
220 #noVNC_control_bar .noVNC_scroll {
221 max-height: 100vh; /* Chrome is buggy with 100% */
222 overflow-x: hidden;
223 overflow-y: auto;
224 padding: 0 10px 0 5px;
225 }
226
227 /* General button style */
228 .noVNC_button {
229 display: block;
230 padding: 4px 4px;
231 margin: 10px 0;
232 vertical-align: middle;
233 border:1px solid rgba(255, 255, 255, 0.2);
234 -webkit-border-radius: 6px;
235 -moz-border-radius: 6px;
236 border-radius: 6px;
237 }
238 .noVNC_button.noVNC_selected {
239 border-color: rgba(0, 0, 0, 0.8);
240 background: rgba(0, 0, 0, 0.5);
241 }
242 .noVNC_button:disabled {
243 opacity: 0.4;
244 }
245 .noVNC_button:focus {
246 outline: none;
247 }
248 .noVNC_button:active {
249 padding-top: 5px;
250 padding-bottom: 3px;
251 }
252 .noVNC_button.noVNC_hidden {
253 display: none;
254 }
255
256 /* Panels */
257 .noVNC_panel {
258 transform: translateX(25px);
259
260 transition: 0.5s ease-in-out;
261
262 max-height: 100vh; /* Chrome is buggy with 100% */
263 overflow-x: hidden;
264 overflow-y: auto;
265
266 visibility: hidden;
267 opacity: 0;
268
269 padding: 15px;
270
271 background: #fff;
272 -webkit-border-radius: 10px;
273 -moz-border-radius: 10px;
274 border-radius: 10px;
275 color: #000;
276 border: 2px solid #E0E0E0;
277 box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.5);
278 }
279 .noVNC_panel.noVNC_open {
280 visibility: visible;
281 opacity: 1;
282 transform: translateX(75px);
283 }
284
285 .noVNC_submit {
286 float: right;
287 }
288
289 :root:not(.noVNC_connected) #noVNC_view_drag_button {
290 display: none;
291 }
292
293 /* noVNC Touch Device only buttons */
294 :root:not(.noVNC_connected) #noVNC_mobile_buttons {
295 display: none;
296 }
297 :root:not(.noVNC_touch) #noVNC_mobile_buttons {
298 display: none;
299 }
300
301 #noVNC_keyboardinput {
302 width: 1px;
303 height: 1px;
304 background-color: #fff;
305 color: #fff;
306 border: 0;
307 position: relative;
308 left: -40px;
309 z-index: -1;
310 ime-mode: disabled;
311 }
312
313 /* Extra manual keys */
314 :root:not(.noVNC_connected) #noVNC_extra_keys {
315 display: none;
316 }
317
318 /* Send Ctrl+Alt+Delete */
319 :root:not(.noVNC_connected) #noVNC_send_ctrl_alt_del_button {
320 display: none;
321 }
322
323 #noVNC_modifiers {
324 background-color: rgb(92, 92, 92);
325 border: none;
326 padding: 0 10px;
327 }
328
329 /* XVP Shutdown/Reboot */
330 :root:not(.noVNC_connected) #noVNC_xvp_button {
331 display: none;
332 }
333 #noVNC_xvp {
334 }
335 #noVNC_xvp_buttons {
336 display: none;
337 }
338
339 /* Clipboard */
340 :root:not(.noVNC_connected) #noVNC_clipboard_button {
341 display: none;
342 }
343 #noVNC_clipboard {
344 /* Full screen, minus padding and left and right margins */
345 max-width: calc(100vw - 2*15px - 75px - 25px);
346 }
347 #noVNC_clipboard_text {
348 width: 500px;
349 max-width: 100%;
350 }
351
352 /* Settings */
353 #noVNC_settings {
354 }
355 #noVNC_settings ul {
356 list-style: none;
357 margin: 3px;
358 padding: 0px;
359 }
360 #noVNC_setting_path {
361 width: 100px;
362 }
363
364 /* Connection Controls */
365 :root.noVNC_connected #noVNC_connect_controls_button {
366 display: none;
367 }
368 :root:not(.noVNC_connected) #noVNC_disconnect_button {
369 display: none;
370 }
371 #noVNC_connect_controls ul {
372 list-style: none;
373 margin: 0px;
374 padding: 0px;
375 }
376 #noVNC_connect_controls li {
377 padding-bottom:8px;
378 }
379 #noVNC_setting_host {
380 width:150px;
381 }
382 #noVNC_setting_port {
383 width: 80px;
384 }
385 #noVNC_setting_password {
386 width: 150px;
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 #noVNC_password_dlg li {
470 padding-bottom:8px;
471 }
472 #noVNC_password_input {
473 width: 150px;
474 }
475
476 /* ----------------------------------------
477 * Main Area
478 * ----------------------------------------
479 */
480
481 #noVNC_container {
482 display: table;
483 width: 100%;
484 height: 100%;
485 background-color: #313131;
486 border-bottom-right-radius: 800px 600px;
487 /*border-top-left-radius: 800px 600px;*/
488 }
489
490 /* HTML5 Canvas */
491 #noVNC_screen {
492 position: absolute;
493 margin: 0px;
494 padding: 0px;
495 bottom: 0px;
496 top: 0px;
497 left: 0px;
498 right: 0px;
499 width: auto;
500 height: auto;
501 }
502 :root:not(.noVNC_connected) #noVNC_screen {
503 display: none;
504 }
505
506 /* Do not set width/height for VNC_canvas or incorrect
507 * scaling will occur. Canvas size depends on remote VNC
508 * settings and noVNC settings. */
509 #noVNC_canvas {
510 position: absolute;
511 left: 0;
512 right: 0;
513 margin-left: auto;
514 margin-right: auto;
515 }
516
517 /*Default noVNC logo.*/
518 /* From: http://fonts.googleapis.com/css?family=Orbitron:700 */
519 @font-face {
520 font-family: 'Orbitron';
521 font-style: normal;
522 font-weight: 700;
523 src: local('?'), url('Orbitron700.woff') format('woff'),
524 url('Orbitron700.ttf') format('truetype');
525 }
526
527 .noVNC_logo {
528 color:yellow;
529 text-align:left;
530 font-family: 'Orbitron', 'OrbitronTTF', sans-serif;
531 font-size: 13px;
532 line-height:90%;
533 text-shadow: 1px 1px 0 #000;
534 }
535 .noVNC_logo span{
536 color:green;
537 }
538
539 #noVNC_logo {
540 margin-top: 60px;
541 margin-left: 60px;
542 font-size: 180px;
543 text-shadow:
544 5px 5px 0 #000,
545 -1px -1px 0 #000,
546 1px -1px 0 #000,
547 -1px 1px 0 #000,
548 1px 1px 0 #000;
549 }
550 :root.noVNC_connected #noVNC_logo {
551 display: none;
552 }
553
554 /* ----------------------------------------
555 * Media sizing
556 * ----------------------------------------
557 */
558
559 @media screen and (max-width: 640px){
560 #noVNC_logo {
561 font-size: 150px;
562 }
563 }
564
565 @media screen and (min-width: 321px) and (max-width: 480px) {
566 #noVNC_logo {
567 font-size: 110px;
568 }
569 }
570
571 @media screen and (max-width: 320px) {
572 #noVNC_logo {
573 font-size: 90px;
574 }
575 }