summaryrefslogtreecommitdiff
path: root/kvmd/web/css
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2018-07-25 10:34:44 +0300
committerDevaev Maxim <[email protected]>2018-07-25 10:34:44 +0300
commit922e303c7045e2b1da8116611e53efb8e8d77e08 (patch)
tree68d98aa1504a69d548a431073a9763f2a67fbb56 /kvmd/web/css
parent22c060956e37a9cb1733a3e7f808048779a5a72a (diff)
virtual keyboard prototype
Diffstat (limited to 'kvmd/web/css')
-rw-r--r--kvmd/web/css/keyboard.css92
-rw-r--r--kvmd/web/css/leds.css44
-rw-r--r--kvmd/web/css/main.css169
-rw-r--r--kvmd/web/css/msd.css45
-rw-r--r--kvmd/web/css/stream.css21
-rw-r--r--kvmd/web/css/vars.css177
-rw-r--r--kvmd/web/css/windows.css33
7 files changed, 429 insertions, 152 deletions
diff --git a/kvmd/web/css/keyboard.css b/kvmd/web/css/keyboard.css
new file mode 100644
index 00000000..e1af292f
--- /dev/null
+++ b/kvmd/web/css/keyboard.css
@@ -0,0 +1,92 @@
+div#keyboard {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+ zoom: 0.8;
+}
+
+div#keyboard div.keyboard-block {
+ padding-right: 15px;
+ display: table-cell;
+}
+div#keyboard div.keyboard-block:last-child {
+ padding-right: 0;
+}
+
+div#keyboard div.keyboard-row {
+ white-space: nowrap;
+ height: 40px;
+ margin-bottom: 5px;
+}
+div#keyboard div.keyboard-row:last-child {
+ margin-bottom: 0;
+}
+
+div#keyboard div.key, div.empty-key {
+ box-sizing: border-box;
+ display: inline-block;
+ margin-right: 5px;
+ padding: 0;
+ width: 40px;
+ height: 40px;
+}
+div#keyboard div.key {
+ font-size: 0.9em;
+ text-align: center;
+ vertical-align: top;
+ box-shadow: var(--micro-shadow);
+ border: var(--grey-border);
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+ color: var(--fg-color-normal);
+ background-color: var(--bg-color-gray);
+ cursor: pointer;
+}
+div#keyboard div.key:hover {
+ color: var(--fg-color-intensive);
+ background-color: var(--bg-color-ctl);
+}
+div#keyboard div.key:active {
+ box-shadow: none;
+ color: var(--fg-color-selected);
+ background-color: var(--bg-color-dark);
+}
+div#keyboard div.key:last-child, div.empty-key:last-child {
+ margin-right: 0;
+}
+div#keyboard div.wide-1 {
+ width: 61px;
+}
+div#keyboard div.wide-2 {
+ width: 64px;
+}
+div#keyboard div.wide-3 {
+ width: 77px;
+}
+div#keyboard div.wide-4 {
+ width: 102px;
+}
+div#keyboard div.wide-5 {
+ width: 288px;
+}
+div#keyboard div.left {
+ text-align: left !important;
+ padding-left: 6px !important;
+}
+div#keyboard div.right {
+ text-align: right !important;
+ padding-right: 6px !important;
+}
+div#keyboard div.small {
+ font-size: 0.7em;
+}
+
+div#keyboard div.key p {
+ margin: 0;
+ position: relative;
+ top: 50%;
+ -webkit-transform: translateY(-50%);
+ -moz-transform: translateY(-50%);
+ transform: translateY(-50%);
+}
diff --git a/kvmd/web/css/leds.css b/kvmd/web/css/leds.css
new file mode 100644
index 00000000..d7ac1d8e
--- /dev/null
+++ b/kvmd/web/css/leds.css
@@ -0,0 +1,44 @@
+@-webkit-keyframes spin {
+ 100% {
+ -webkit-transform: rotate(360deg);
+ }
+}
+@-moz-keyframes spin {
+ 100% {
+ -moz-transform: rotate(360deg);
+ }
+}
+@keyframes spin {
+ 100% {
+ -webkit-transform: rotate(360deg);
+ -moz-transform: rotate(360deg);
+ transform: rotate(360deg);
+ }
+}
+
+img.led-on {
+ -webkit-filter: invert(0.5) sepia(1) saturate(5) hue-rotate(100deg);
+ -moz-filter: invert(0.5) sepia(1) saturate(5) hue-rotate(100deg);
+ filter: invert(0.5) sepia(1) saturate(5) hue-rotate(100deg);
+}
+
+img.led-off {
+ -webkit-filter: invert(0.5);
+ -moz-filter: invert(0.5);
+ filter: invert(0.5);
+}
+
+img.led-hdd-busy {
+ -webkit-filter: invert(0.5) sepia(1) saturate(15) hue-rotate(320deg);
+ -moz-filter: invert(0.5) sepia(1) saturate(15) hue-rotate(320deg);
+ filter: invert(0.5) sepia(1) saturate(15) hue-rotate(320deg);
+}
+
+img.led-msd-writing {
+ -webkit-filter: invert(0.5) sepia(1) saturate(5) hue-rotate(0deg);
+ -moz-filter: invert(0.5) sepia(1) saturate(5) hue-rotate(0deg);
+ filter: invert(0.5) sepia(1) saturate(5) hue-rotate(0deg);
+ -webkit-animation: spin 2s linear infinite;
+ -moz-animation: spin 2s linear infinite;
+ animation: spin 2s linear infinite;
+}
diff --git a/kvmd/web/css/main.css b/kvmd/web/css/main.css
index 0416732a..3089a6d1 100644
--- a/kvmd/web/css/main.css
+++ b/kvmd/web/css/main.css
@@ -1,28 +1,3 @@
-:root {
- --dark-border: 1px solid #17191d;
- --black-border: 1px solid black;
-
- --small-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
- --big-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.4);
-
- --bg-color-normal: #36393f;
- --bg-color-light: #484b51;
- --bg-color-dark: #17191d;
- --bg-color-ctl: #202225;
- --bg-color-hovered: #1a1c1f;
- --bg-color-selected: #171717;
- --bg-color-progress: #171717;
-
- --fg-color-normal: #c3c3c3;
- --fg-color-dark: #aaaaaa;
- --fg-color-intensive: white;
- --fg-color-inactive: #6c7481;
- --fg-color-selected: #6c7481;
- --fg-color-progress: #436a8a;
-
- --bg-color-stream-screen: black;
-}
-
body {
margin: 0;
overflow: hidden;
@@ -32,34 +7,15 @@ body {
}
img#logo {
-webkit-filter: invert(0.7);
+ -moz-filter: invert(0.7);
filter: invert(0.7);
vertical-align: middle;
padding: 13px 15px;
}
-div.window {
- user-select: none;
- position: absolute;
- border: var(--dark-border);
- border-radius: 8px;
- box-sizing: border-box;
- box-shadow: var(--big-shadow);
- display: inline-block;
- background-color: var(--bg-color-light);
- padding: 3px 10px 10px 10px;
- top: 70px;
- left: 50%;
- -webkit-transform: translate(-50%);
- -moz-transform: translate(-50%);
- transform: translate(-50%);
-}
-div.window-header {
- color: var(--fg-color-dark);
- cursor: move;
- padding-bottom: 3px;
-}
-
ul#ctl {
+ -webkit-user-select: none;
+ -moz-user-select: none;
user-select: none;
box-shadow: var(--small-shadow);
list-style-type: none;
@@ -95,10 +51,14 @@ ul#ctl li a.ctl-item:hover:not(.active) {
background-color: var(--bg-color-hovered);
}
div.ctl-dropdown-content {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
overflow: hidden;
- user-select: text;
white-space: nowrap;
border: var(--dark-border);
+ -webkit-border-radius: 0 0 8px 8px;
+ -moz-border-radius: 0 0 8px 8px;
border-radius: 0 0 8px 8px;
position: absolute;
background-color: var(--bg-color-ctl);
@@ -160,106 +120,7 @@ div.ctl-dropdown-content-text {
font-size: 14px;
}
-img#stream-image {
- width: 640px;
- height: 480px;
- display: inline-block;
- border: var(--dark-border);
- background-color: var(--bg-color-stream-screen);
-}
-img.stream-image-active {
- cursor: crosshair;
- -webkit-filter: none;
- filter: none;
-}
-img.stream-image-inactive {
- cursor: wait;
- -webkit-filter: grayscale(100%) brightness(75%);
- filter: grayscale(100%) brightness(75%);
-}
-
-img.led-on {
- -webkit-filter: invert(0.5) sepia(1) saturate(5) hue-rotate(100deg);
- filter: invert(0.5) sepia(1) saturate(5) hue-rotate(100deg);
-}
-img.led-off {
- -webkit-filter: invert(0.5);
- filter: invert(0.5);
-}
-img.led-hdd-busy {
- -webkit-filter: invert(0.5) sepia(1) saturate(15) hue-rotate(320deg);
- filter: invert(0.5) sepia(1) saturate(15) hue-rotate(320deg);
-}
-img.led-msd-writing {
- -webkit-filter: invert(0.5) sepia(1) saturate(5) hue-rotate(0deg);
- filter: invert(0.5) sepia(1) saturate(5) hue-rotate(0deg);
- -webkit-animation:spin 2s linear infinite;
- -moz-animation:spin 2s linear infinite;
- animation:spin 2s linear infinite;
-}
-@-webkit-keyframes spin {
- 100% {
- -webkit-transform: rotate(360deg);
- }
-}
-@-moz-keyframes spin {
- 100% {
- -moz-transform: rotate(360deg);
- }
-}
-@keyframes spin {
- 100% {
- -webkit-transform: rotate(360deg);
- -moz-transform: rotate(360deg);
- transform:rotate(360deg);
- }
-}
-
-div#msd-menu {
- width: 450px;
-}
-
-table#msd-info {
- user-select: text;
- border-spacing: 5px;
- margin: 0 10px 0 10px;
- font-size: 12px;
-}
-table#msd-info
-td#msd-status,
-td#msd-current-image-name,
-td#msd-current-image-size,
-td#msd-storage-size,
-td#msd-new-image-name,
-td#msd-new-image-size {
- font-weight: bold;
- max-width: 310px;
- overflow: hidden;
-}
-
-div#msd-progress {
- background-color: var(--bg-color-progress);
- height: 1.5em;
- width: 100%;
- position: relative;
-}
-div#msd-progress:before {
- color: var(--fg-color-intensive);
- content: attr(data-label);
- font-size: 0.8em;
- position: absolute;
- text-align: center;
- top: 4px;
- left: 0;
- right: 0;
-}
-div#msd-progress span#msd-progress-value {
- background-color: var(--fg-color-progress);
- display: inline-block;
- height: 100%;
-}
-
-ul#bottom {
+ul#footer {
list-style-type: none;
bottom: 0;
position: fixed;
@@ -269,16 +130,20 @@ ul#bottom {
color: var(--fg-color-inactive);
z-index: -10;
}
-ul#bottom li {
+ul#footer li {
padding: 0 10px;
}
-ul#bottom li.bottom-left {
+ul#footer li.footer-left {
float: left;
}
-ul#bottom li.bottom-right {
+ul#footer li.footer-right {
float: right;
}
-ul#bottom li a {
+ul#footer li a {
text-decoration: underline dotted;
color: var(--fg-color-inactive);
}
+ul#footer li a:hover {
+ text-decoration: underline;
+ color: var(--fg-color-inactive);
+}
diff --git a/kvmd/web/css/msd.css b/kvmd/web/css/msd.css
new file mode 100644
index 00000000..ee9fb147
--- /dev/null
+++ b/kvmd/web/css/msd.css
@@ -0,0 +1,45 @@
+div#msd-menu {
+ width: 450px;
+}
+
+table#msd-info {
+ -webkit-user-select: text;
+ -moz-user-select: text;
+ user-select: text;
+ border-spacing: 5px;
+ margin: 0 10px 0 10px;
+ font-size: 12px;
+}
+table#msd-info
+td#msd-status,
+td#msd-current-image-name,
+td#msd-current-image-size,
+td#msd-storage-size,
+td#msd-new-image-name,
+td#msd-new-image-size {
+ font-weight: bold;
+ max-width: 310px;
+ overflow: hidden;
+}
+
+div#msd-progress {
+ background-color: var(--bg-color-progress);
+ height: 1.5em;
+ width: 100%;
+ position: relative;
+}
+div#msd-progress:before {
+ color: var(--fg-color-intensive);
+ content: attr(data-label);
+ font-size: 0.8em;
+ position: absolute;
+ text-align: center;
+ top: 4px;
+ left: 0;
+ right: 0;
+}
+div#msd-progress span#msd-progress-value {
+ background-color: var(--fg-color-progress);
+ display: inline-block;
+ height: 100%;
+}
diff --git a/kvmd/web/css/stream.css b/kvmd/web/css/stream.css
new file mode 100644
index 00000000..0312d411
--- /dev/null
+++ b/kvmd/web/css/stream.css
@@ -0,0 +1,21 @@
+img#stream-image {
+ width: 640px;
+ height: 480px;
+ display: inline-block;
+ border: var(--dark-border);
+ background-color: var(--bg-color-stream-screen);
+}
+
+img.stream-image-active {
+ cursor: crosshair;
+ -webkit-filter: none;
+ -moz-filter: none;
+ filter: none;
+}
+
+img.stream-image-inactive {
+ cursor: wait;
+ -webkit-filter: grayscale(100%) brightness(75%);
+ -moz-filter: grayscale(100%) brightness(75%);
+ filter: grayscale(100%) brightness(75%);
+}
diff --git a/kvmd/web/css/vars.css b/kvmd/web/css/vars.css
new file mode 100644
index 00000000..a83469c6
--- /dev/null
+++ b/kvmd/web/css/vars.css
@@ -0,0 +1,177 @@
+:root {
+ --dark-border: 1px solid #17191d;
+ --grey-border: 1px solid #202225;
+ --black-border: 1px solid black;
+
+ --micro-shadow: 1px 2px 4px 0 rgba(0, 0, 0, 0.4);
+ --small-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
+ --big-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.4);
+
+ --bg-color-normal: #36393f;
+ --bg-color-light: #484b51;
+ --bg-color-gray: #3b3e43;
+ --bg-color-dark: #17191d;
+ --bg-color-ctl: #202225;
+ --bg-color-hovered: #1a1c1f;
+ --bg-color-selected: #171717;
+ --bg-color-progress: #171717;
+
+ --fg-color-normal: #c3c3c3;
+ --fg-color-dark: #aaaaaa;
+ --fg-color-intensive: white;
+ --fg-color-inactive: #6c7481;
+ --fg-color-selected: #6c7481;
+ --fg-color-progress: #436a8a;
+
+ --bg-color-stream-screen: black;
+}
+
+body {
+ margin: 0;
+ overflow: hidden;
+ color: var(--fg-color-normal);
+ background-color: var(--bg-color-normal);
+ font-family: sans-serif !important;
+}
+img#logo {
+ -webkit-filter: invert(0.7);
+ -moz-filter: invert(0.7);
+ filter: invert(0.7);
+ vertical-align: middle;
+ padding: 13px 15px;
+}
+
+ul#ctl {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+ box-shadow: var(--small-shadow);
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ background-color: var(--bg-color-ctl);
+ position: fixed;
+ top: 0;
+ width: 100%;
+ z-index: 10;
+}
+ul#ctl li.ctl-logo {
+ float: left;
+}
+ul#ctl li.ctl-right-actions {
+ float: right;
+}
+ul#ctl img {
+ vertical-align: middle;
+ margin-right: 10px;
+ height: 20px;
+}
+ul#ctl li a.ctl-item {
+ cursor: pointer;
+ border-left: var(--black-border);
+ display: inline-block;
+ color: var(--fg-color-normal);
+ padding: 15px 16px;
+ text-decoration: none;
+ height: 20px;
+}
+ul#ctl li a.ctl-item:hover:not(.active) {
+ background-color: var(--bg-color-hovered);
+}
+div.ctl-dropdown-content {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+ overflow: hidden;
+ white-space: nowrap;
+ border: var(--dark-border);
+ -webkit-border-radius: 0 0 8px 8px;
+ -moz-border-radius: 0 0 8px 8px;
+ border-radius: 0 0 8px 8px;
+ position: absolute;
+ background-color: var(--bg-color-ctl);
+ min-width: 180px;
+ box-shadow: var(--big-shadow);
+ z-index: 9;
+}
+div.ctl-dropdown-content div.buttons-row {
+ margin: 0;
+ padding: 0;
+ font-size: 0;
+}
+div.ctl-dropdown-content button {
+ box-shadow: none;
+ border: none;
+ color: var(--fg-color-normal);
+ background-color: var(--bg-color-normal);
+ display: block;
+ width: 100%;
+ height: 30px;
+ font-size: 16px;
+ text-align: left;
+ padding: 0 15px;
+ outline: none;
+ cursor: pointer;
+}
+div.ctl-dropdown-content button:enabled:hover {
+ color: var(--fg-color-intensive);
+ background-color: var(--bg-color-dark) !important;
+}
+div.ctl-dropdown-content button:disabled {
+ color: var(--fg-color-inactive);
+ cursor: default;
+}
+div.ctl-dropdown-content button:active {
+ color: var(--fg-color-selected) !important;
+}
+div.ctl-dropdown-content button.row50 {
+ display: inline-block;
+ width: 50%;
+}
+div.ctl-dropdown-content button.row25 {
+ display: inline-block;
+ width: 25%;
+}
+div.ctl-dropdown-content button.row50:not(:first-child), button.row25:not(:first-child) {
+ border-left: var(--dark-border);
+}
+div.ctl-dropdown-content hr {
+ margin: 0;
+ display: block;
+ height: 1px;
+ border: 0;
+ padding: 0;
+ background-color: var(--bg-color-dark);
+}
+div.ctl-dropdown-content-text {
+ margin: 10px 15px 10px 15px;
+ font-size: 14px;
+}
+
+ul#footer {
+ list-style-type: none;
+ bottom: 0;
+ position: fixed;
+ width: 100%;
+ padding: 0;
+ font-size: 0.7em;
+ color: var(--fg-color-inactive);
+ z-index: -10;
+}
+ul#footer li {
+ padding: 0 10px;
+}
+ul#footer li.footer-left {
+ float: left;
+}
+ul#footer li.footer-right {
+ float: right;
+}
+ul#footer li a {
+ text-decoration: underline dotted;
+ color: var(--fg-color-inactive);
+}
+ul#footer li a:hover {
+ text-decoration: underline;
+ color: var(--fg-color-inactive);
+}
diff --git a/kvmd/web/css/windows.css b/kvmd/web/css/windows.css
new file mode 100644
index 00000000..f576c97d
--- /dev/null
+++ b/kvmd/web/css/windows.css
@@ -0,0 +1,33 @@
+div.window {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ user-select: none;
+ position: absolute;
+ border: var(--dark-border);
+ -webkit-border-radius: 8px;
+ -moz-border-radius: 8px;
+ border-radius: 8px;
+ box-sizing: border-box;
+ box-shadow: var(--big-shadow);
+ display: inline-block;
+ background-color: var(--bg-color-light);
+ padding: 3px 10px 10px 10px;
+ -webkit-transform: translate(-50%);
+ -moz-transform: translate(-50%);
+ transform: translate(-50%);
+}
+
+div.window-header {
+ color: var(--fg-color-dark);
+ font-size: 0.8em;
+ cursor: move;
+ padding-left: 6px;
+ padding-bottom: 4px;
+}
+
+div.window hr.window-sep {
+ margin: 0 0 6px 0;
+ display: block;
+ border: none;
+ border-top: 1px solid var(--bg-color-normal);
+}