/* * noVNC base CSS * Copyright (C) 2019 The noVNC authors * noVNC is licensed under the MPL 2.0 (see LICENSE.txt) * This file is licensed under the 2-Clause BSD license (see LICENSE.txt). */ /* * Z index layers: * * 0: Main screen * 10: Control bar * 50: Transition blocker * 60: Connection popups * 100: Status bar * ... * 1000: Javascript crash * ... * 10000: Max (used for polyfills) */ /* * State variables (set on :root): * * noVNC_loading: Page is still loading * noVNC_connecting: Connecting to server * noVNC_reconnecting: Re-establishing a connection * noVNC_connected: Connected to server (most common state) * noVNC_disconnecting: Disconnecting from server */ :root { font-family: sans-serif; line-height: 1.6; } body { margin:0; padding:0; /*Background image with light grey curve.*/ background-color:#494949; background-repeat:no-repeat; background-position:right bottom; height:100%; touch-action: none; } html { height:100%; } .noVNC_only_touch.noVNC_hidden { display: none; } .noVNC_disabled { color: var(--novnc-grey); } /* ---------------------------------------- * Spinner * ---------------------------------------- */ .noVNC_spinner { position: relative; } .noVNC_spinner, .noVNC_spinner::before, .noVNC_spinner::after { width: 10px; height: 10px; border-radius: 2px; box-shadow: -60px 10px 0 rgba(255, 255, 255, 0); animation: noVNC_spinner 1.0s linear infinite; } .noVNC_spinner::before { content: ""; position: absolute; left: 0px; top: 0px; animation-delay: -0.1s; } .noVNC_spinner::after { content: ""; position: absolute; top: 0px; left: 0px; animation-delay: 0.1s; } @keyframes noVNC_spinner { 0% { box-shadow: -60px 10px 0 rgba(255, 255, 255, 0); width: 20px; } 25% { box-shadow: 20px 10px 0 rgba(255, 255, 255, 1); width: 10px; } 50% { box-shadow: 60px 10px 0 rgba(255, 255, 255, 0); width: 10px; } } /* ---------------------------------------- * WebKit centering hacks * ---------------------------------------- */ .noVNC_center { /* * This is a workaround because webkit misrenders transforms and * uses non-integer coordinates, resulting in blurry content. * Ideally we'd use "top: 50%; transform: translateY(-50%);" on * the objects instead. */ display: flex; align-items: center; justify-content: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; } .noVNC_center > * { pointer-events: auto; } .noVNC_vcenter { display: flex !important; flex-direction: column; justify-content: center; position: fixed; top: 0; left: 0; height: 100%; margin: 0 !important; padding: 0 !important; pointer-events: none; } .noVNC_vcenter > * { pointer-events: auto; } /* ---------------------------------------- * Layering * ---------------------------------------- */ .noVNC_connect_layer { z-index: 60; } /* ---------------------------------------- * Fallback error * ---------------------------------------- */ #noVNC_fallback_error { z-index: 1000; visibility: hidden; /* Put a dark background in front of everything but the error, and don't let mouse events pass through */ background: rgba(0, 0, 0, 0.8); pointer-events: all; } #noVNC_fallback_error.noVNC_open { visibility: visible; } #noVNC_fallback_error > div { max-width: calc(100vw - 30px - 30px); max-height: calc(100vh - 30px - 30px); overflow: auto; padding: 15px; transition: 0.5s ease-in-out; transform: translateY(-50px); opacity: 0; text-align: center; font-weight: bold; color: #fff; border-radius: 12px; box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.5); background: rgba(200,55,55,0.8); } #noVNC_fallback_error.noVNC_open > div { transform: translateY(0); opacity: 1; } #noVNC_fallback_errormsg { font-weight: normal; } #noVNC_fallback_errormsg .noVNC_message { display: inline-block; text-align: left; font-family: monospace; white-space: pre-wrap; } #noVNC_fallback_error .noVNC_location { font-style: italic; font-size: 0.8em; color: rgba(255, 255, 255, 0.8); } #noVNC_fallback_error .noVNC_stack { padding: 10px; margin: 10px; font-size: 0.8em; text-align: left; font-family: monospace; white-space: pre; border: 1px solid rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.2); overflow: auto; } /* ---------------------------------------- * Control bar * ---------------------------------------- */ #noVNC_control_bar_anchor { /* The anchor is needed to get z-stacking to work */ position: fixed; z-index: 10; transition: 0.5s ease-in-out; /* Edge misrenders animations wihthout this */ transform: translateX(0); } :root.noVNC_connected #noVNC_control_bar_anchor.noVNC_idle { opacity: 0.8; } #noVNC_control_bar_anchor.noVNC_right { left: auto; right: 0; } #noVNC_control_bar { position: relative; left: -100%; transition: 0.5s ease-in-out; background-color: var(--novnc-blue); border-radius: 0 12px 12px 0; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; /* Disable iOS image long-press popup */ } #noVNC_control_bar.noVNC_open { box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.5); left: 0; } #noVNC_control_bar::before { /* This extra element is to get a proper shadow */ content: ""; position: absolute; z-index: -1; height: 100%; width: 30px; left: -30px; transition: box-shadow 0.5s ease-in-out; } #noVNC_control_bar.noVNC_open::before { box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.5); } .noVNC_right #noVNC_control_bar { left: 100%; border-radius: 12px 0 0 12px; } .noVNC_right #noVNC_control_bar.noVNC_open { left: 0; } .noVNC_right #noVNC_control_bar::before { visibility: hidden; } #noVNC_control_bar_handle { position: absolute; left: -15px; top: 0; transform: translateY(35px); width: calc(100% + 30px); height: 50px; z-index: -1; cursor: pointer; border-radius: 6px; background-color: var(--novnc-darkblue); background-image: url("../images/handle_bg.svg"); background-repeat: no-repeat; background-position: right; box-shadow: 3px 3px 0px rgba(0, 0, 0, 0.5); } #noVNC_control_bar_handle:after { content: ""; transition: transform 0.5s ease-in-out; background: url("../images/handle.svg"); position: absolute; top: 22px; /* (50px-6px)/2 */ right: 5px; width: 5px; height: 6px; } #noVNC_control_bar.noVNC_open #noVNC_control_bar_handle:after { transform: translateX(1px) rotate(180deg); } :root:not(.noVNC_connected) #noVNC_control_bar_handle { display: none; } .noVNC_right #noVNC_control_bar_handle { background-position: left; } .noVNC_right #noVNC_control_bar_handle:after { left: 5px; right: 0; transform: translateX(1px) rotate(180deg); } .noVNC_right #noVNC_control_bar.noVNC_open #noVNC_control_bar_handle:after { transform: none; } /* Larger touch area for the handle, used when a touch screen is available */ #noVNC_control_bar_handle div { position: absolute; right: -35px; top: 0; width: 50px; height: 100%; display: none; } @media (any-pointer: coarse) { #noVNC_control_bar_handle div { display: initial; } } .noVNC_right #noVNC_control_bar_handle div { left: -35px; right: auto; } #noVNC_control_bar > .noVNC_scroll { max-height: 100vh; /* Chrome is buggy with 100% */ overflow-x: hidden; overflow-y: auto; padding: 0 10px; } #noVNC_control_bar > .noVNC_scroll > * { display: block; margin: 10px auto; } /* Control bar hint */ #noVNC_hint_anchor { position: fixed; right: -50px; left: auto; } #noVNC_control_bar_anchor.noVNC_right + #noVNC_hint_anchor { left: -50px; right: auto; } #noVNC_control_bar_hint { position: relative; transform: scale(0); width: 100px; height: 50%; max-height: 600px; visibility: hidden; opacity: 0; transition: 0.2s ease-in-out; background: transparent; box-shadow: 0 0 10px black, inset 0 0 10px 10px var(--novnc-darkblue); border-radius: 12px; transition-delay: 0s; } #noVNC_control_bar_hint.noVNC_active { visibility: visible; opacity: 1; transition-delay: 0.2s; transform: scale(1); } #noVNC_control_bar_hint.noVNC_notransition { transition: none !important; } /* Control bar buttons */ #noVNC_control_bar .noVNC_button { min-width: unset; padding: 4px 4px; vertical-align: middle; border:1px solid rgba(255, 255, 255, 0.2); border-radius: 6px; background-color: transparent; } #noVNC_control_bar .noVNC_button.noVNC_selected { border-color: rgba(0, 0, 0, 0.8); background-color: rgba(0, 0, 0, 0.5); } #noVNC_control_bar .noVNC_button.noVNC_hidden { display: none !important; } /* Panels */ .noVNC_panel { transform: translateX(25px); transition: 0.5s ease-in-out; box-sizing: border-box; /* so max-width don't have to care about padding */ max-width: calc(100vw - 75px - 25px); /* minus left and right margins */ max-height: 100vh; /* Chrome is buggy with 100% */ overflow-x: hidden; overflow-y: auto; visibility: hidden; opacity: 0; padding: 15px; background: #fff; border-radius: 12px; color: #000; border: 2px solid #E0E0E0; box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.5); } .noVNC_panel.noVNC_open { visibility: visible; opacity: 1; transform: translateX(75px); } .noVNC_right .noVNC_vcenter { left: auto; right: 0; } .noVNC_right .noVNC_panel { transform: translateX(-25px); } .noVNC_right .noVNC_panel.noVNC_open { transform: translateX(-75px); } .noVNC_panel > * { display: block; margin: 10px auto; } .noVNC_panel > *:first-child { margin-top: 0 !important; } .noVNC_panel > *:last-child { margin-bottom: 0 !important; } .noVNC_panel hr { border: none; border-top: 1px solid var(--novnc-lightgrey); width: 100%; /*