summaryrefslogtreecommitdiff
path: root/web/share
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-07-15 10:34:49 +0300
committerDevaev Maxim <[email protected]>2020-07-15 10:34:49 +0300
commit6fa59bd7a136bdda7640abb1748910aa52031a02 (patch)
tree80dacd72bd058f492bbb1a31d9e639c5b7d70621 /web/share
parent3e7315c44872995108b5512c3a9b11d48dbc0f33 (diff)
kvm pug
Diffstat (limited to 'web/share')
-rw-r--r--web/share/css/navbar.css (renamed from web/share/css/menu.css)94
-rw-r--r--web/share/css/vars.css16
-rw-r--r--web/share/js/wm.js42
3 files changed, 76 insertions, 76 deletions
diff --git a/web/share/css/menu.css b/web/share/css/navbar.css
index 0a84b303..c52a6050 100644
--- a/web/share/css/menu.css
+++ b/web/share/css/navbar.css
@@ -20,12 +20,12 @@
*****************************************************************************/
-ul#menu {
+ul#navbar {
box-shadow: var(--shadow-small);
list-style-type: none;
margin: 0;
padding: 0;
- background-color: var(--cs-menu-default-bg);
+ background-color: var(--cs-navbar-default-bg);
position: fixed;
top: 0;
width: 100%;
@@ -33,107 +33,107 @@ ul#menu {
z-index: 2147483646;
}
-ul#menu li.menu-right-items {
- border-left: var(--border-menu-thin);
+ul#navbar li.right {
+ border-left: var(--border-navbar-item-thin);
float: right;
}
-ul#menu li.menu-left-items {
- border-right: var(--border-menu-thin);
+ul#navbar li.left {
+ border-right: var(--border-navbar-item-thin);
float: left;
}
-ul#menu li a#menu-logo {
+ul#navbar li a#logo {
line-height: 50px;
outline: none;
cursor: pointer;
display: inline-block;
- color: var(--cs-menu-default-fg);
+ color: var(--cs-navbar-default-fg);
padding-left: 16px;
padding-right: 16px;
text-decoration: none;
}
-ul#menu li a.menu-item img {
- vertical-align: middle;
- margin-right: 10px;
- height: 20px;
-}
-
-ul#menu li a#menu-logo img {
- margin-top: -2px;
- height: 24px;
-}
-
-ul#menu li a.menu-item {
+ul#navbar li a.menu-button {
line-height: 50px;
outline: none;
cursor: pointer;
display: inline-block;
- color: var(--cs-menu-default-fg);
+ color: var(--cs-navbar-default-fg);
padding-left: 16px;
padding-right: 16px;
text-decoration: none;
}
-ul#menu li a#menu-logo:hover:not(.active),
-ul#menu li a.menu-item:hover:not(.active) {
- background-color: var(--cs-menu-hovered-bg);
+ul#navbar li a#logo:hover:not(.active),
+ul#navbar li a.menu-button:hover:not(.active) {
+ background-color: var(--cs-navbar-item-hovered-bg);
}
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) {
/* iPad 8 */
- ul#menu li a#menu-item:hover:not(.active),
- ul#menu li a.menu-item:hover:not(.active) {
- background-color: var(--cs-menu-default-bg) !important;
+ ul#navbar li a#menu-button:hover:not(.active),
+ ul#navbar li a.menu-button:hover:not(.active) {
+ background-color: var(--cs-navbar-default-bg) !important;
}
}
-ul#menu li a.menu-item-selected {
- box-shadow: var(--shadow-menu-pressed);
- background-color: var(--cs-menu-pressed-bg) !important;
+ul#navbar li a#logo img {
+ margin-top: -2px;
+ height: 24px;
+}
+
+ul#navbar li a.menu-button img {
+ vertical-align: middle;
+ margin-right: 10px;
+ height: 20px;
+}
+
+ul#navbar li a.menu-button-pressed {
+ box-shadow: var(--shadow-navbar-item-pressed);
+ background-color: var(--cs-navbar-item-pressed-bg) !important;
}
-ul#menu li div.menu-item-content {
+ul#navbar li div.menu {
visibility: hidden;
outline: none;
overflow: hidden;
white-space: nowrap;
- border: var(--border-menu-item-content-default-2px);
- border-top: var(--border-menu-item-content-top-thin);
+ border: var(--border-navbar-menu-default-2px);
+ border-top: var(--border-navbar-menu-top-thin);
border-radius: 0 0 8px 8px;
position: absolute;
- background-color: var(--cs-menu-default-bg);
+ background-color: var(--cs-navbar-default-bg);
min-width: 180px;
box-shadow: var(--shadow-big);
z-index: 2147483645;
}
-ul#menu li div.menu-item-content-active {
- border: var(--border-menu-item-content-active-2px) !important;
- border-top: var(--border-menu-item-content-top-thin) !important;
+ul#navbar li div.menu-active {
+ border: var(--border-navbar-menu-active-2px) !important;
+ border-top: var(--border-navbar-menu-top-thin) !important;
}
-ul#menu li div.menu-item-content-buttons {
+ul#navbar li div.menu div.buttons {
background-color: var(--cs-control-default-bg);
}
-ul#menu li div.menu-item-content-text {
+ul#navbar li div.menu div.text {
margin: 10px 15px 10px 15px;
font-size: 14px;
}
-ul#menu li div.menu-item-content-text table.one-line-switch {
+ul#navbar li div.menu div.text table.one-line-switch {
width: 100%;
border-collapse: collapse;
}
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
@supports (-webkit-appearance: none) {
- ul#menu li div.menu-item-content-text table.one-line-switch {
+ ul#navbar li div.menu div.text table.one-line-switch {
margin: 20px 0 20px 0 !important;
}
}
}
-ul#menu li div.menu-item-content table.menu-item-content-kv {
+ul#navbar li div.menu table.kv {
-webkit-user-select: text;
-moz-user-select: text;
user-select: text;
@@ -141,14 +141,14 @@ ul#menu li div.menu-item-content table.menu-item-content-kv {
margin: 0 10px 0 10px;
font-size: 12px;
}
-ul#menu li div.menu-item-content table.menu-item-content-kv td.value {
+ul#navbar li div.menu table.kv td.value {
font-weight: bold;
max-width: 310px;
overflow: hidden;
}
-ul#menu li div.menu-item-content-buttons button,
-ul#menu li div.menu-item-content-buttons select {
+ul#navbar li div.menu div.buttons button,
+ul#navbar li div.menu div.buttons select {
box-shadow: none;
border: none;
border-radius: 0;
@@ -156,7 +156,7 @@ ul#menu li div.menu-item-content-buttons select {
padding: 0 16px;
}
-ul#menu li div.menu-item-content hr {
+ul#navbar li div.menu hr {
margin: 0;
display: block;
height: 0px;
@@ -165,7 +165,7 @@ ul#menu li div.menu-item-content hr {
border-top: var(--border-control-thin);
}
-ul#menu li div.menu-item-content img.sign {
+ul#navbar li div.menu img.sign {
vertical-align: middle;
margin-right: 10px;
height: 20px;
diff --git a/web/share/css/vars.css b/web/share/css/vars.css
index d4e5f49b..46ccf0a7 100644
--- a/web/share/css/vars.css
+++ b/web/share/css/vars.css
@@ -34,10 +34,10 @@
--cs-control-pressed-fg: #6c7481;
--cs-control-disabled-fg: #6c7481;
- --cs-menu-default-bg: #202225;
- --cs-menu-default-fg: #c3c3c3;
- --cs-menu-hovered-bg: #1a1c1f;
- --cs-menu-pressed-bg: #171717;
+ --cs-navbar-default-bg: #202225;
+ --cs-navbar-default-fg: #c3c3c3;
+ --cs-navbar-item-hovered-bg: #1a1c1f;
+ --cs-navbar-item-pressed-bg: #171717;
--cs-window-default-bg: #484b51;
--cs-window-default-fg: #c3c3c3;
@@ -69,18 +69,18 @@
--shadow-micro: 1px 2px 4px 0 rgba(0, 0, 0, 0.4);
--shadow-small: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
--shadow-big: 0 8px 16px 0 rgba(0, 0, 0, 0.4);
- --shadow-menu-pressed: 0 5px 0 #5b90bb inset;
+ --shadow-navbar-item-pressed: 0 5px 0 #5b90bb inset;
--border-default-thin: thin solid #36393f;
--border-default-2px: 2px solid #36393f;
- --border-menu-thin: thin solid black;
+ --border-navbar-item-thin: thin solid black;
--border-control-thin: thin solid #17191d;
--border-window-thin: thin solid #17191d;
--border-key-thin: thin solid #202225;
--border-intensive-2px: 2px solid #5b90bb;
--border-intensive-thin: thin solid #5b90bb;
- --border-menu-item-content-default-2px: 2px solid black;
- --border-menu-item-content-active-2px: 2px solid #5b90bb;
+ --border-navbar-menu-default-2px: 2px solid black;
+ --border-navbar-menu-active-2px: 2px solid #5b90bb;
--border-menu-item-content-top-thin: thin solid #17191d;
}
diff --git a/web/share/js/wm.js b/web/share/js/wm.js
index 9369d0c0..e53b8520 100644
--- a/web/share/js/wm.js
+++ b/web/share/js/wm.js
@@ -39,7 +39,7 @@ function __WindowManager() {
var __top_z_index = 0;
var __windows = [];
- var __menu_items = [];
+ var __menu_buttons = [];
var __init__ = function() {
for (let el_button of $$$("button")) {
@@ -48,10 +48,10 @@ function __WindowManager() {
el_button.ontouchstart = function() {};
}
- for (let el_item of $$("menu-item")) {
- el_item.parentElement.querySelector(".menu-item-content").setAttribute("tabindex", "-1");
- tools.setOnDown(el_item, () => __toggleMenu(el_item));
- __menu_items.push(el_item);
+ for (let el_button of $$("menu-button")) {
+ el_button.parentElement.querySelector(".menu").setAttribute("tabindex", "-1");
+ tools.setOnDown(el_button, () => __toggleMenu(el_button));
+ __menu_buttons.push(el_button);
}
for (let el_window of $$("window")) {
@@ -161,7 +161,7 @@ function __WindowManager() {
let el_to_focus = (
el.closest(".modal-window")
|| el.closest(".window")
- || el.closest(".menu-item-content")
+ || el.closest(".menu")
);
if (el_to_focus) {
el_to_focus.focus();
@@ -182,9 +182,9 @@ function __WindowManager() {
};
self.getViewGeometry = function() {
- let el_menu = $("menu");
+ let el_navbar = $("navbar");
return {
- top: (el_menu ? el_menu.clientHeight : 0), // Menu height
+ top: (el_navbar ? el_navbar.clientHeight : 0), // Navbar height
bottom: Math.max(document.documentElement.clientHeight, window.innerHeight || 0),
left: 0,
right: Math.max(document.documentElement.clientWidth, window.innerWidth || 0),
@@ -194,15 +194,15 @@ function __WindowManager() {
var __toggleMenu = function(el_a) {
let all_hidden = true;
- for (let el_item of __menu_items) {
- let el_menu = el_item.parentElement.querySelector(".menu-item-content");
- if (el_item === el_a && window.getComputedStyle(el_menu, null).visibility === "hidden") {
- el_item.classList.add("menu-item-selected");
+ for (let el_button of __menu_buttons) {
+ let el_menu = el_button.parentElement.querySelector(".menu");
+ if (el_button === el_a && window.getComputedStyle(el_menu, null).visibility === "hidden") {
+ el_button.classList.add("menu-button-pressed");
el_menu.style.visibility = "visible";
el_menu.focus();
all_hidden &= false;
} else {
- el_item.classList.remove("menu-item-selected");
+ el_button.classList.remove("menu-button-pressed");
el_menu.style.visibility = "hidden";
}
}
@@ -223,9 +223,9 @@ function __WindowManager() {
var __closeAllMenues = function() {
document.onkeyup = null;
- for (let el_item of __menu_items) {
- let el_menu = el_item.parentElement.querySelector(".menu-item-content");
- el_item.classList.remove("menu-item-selected");
+ for (let el_button of __menu_buttons) {
+ let el_menu = el_button.parentElement.querySelector(".menu");
+ el_button.classList.remove("menu-button-pressed");
el_menu.style.visibility = "hidden";
}
};
@@ -236,8 +236,8 @@ function __WindowManager() {
el_parent.classList.add("window-active");
} else if ((el_parent = event.target.closest(".window")) !== null) {
el_parent.classList.add("window-active");
- } else if ((el_parent = event.target.closest(".menu-item-content")) !== null) {
- el_parent.classList.add("menu-item-content-active");
+ } else if ((el_parent = event.target.closest(".menu")) !== null) {
+ el_parent.classList.add("menu-active");
}
tools.debug("Focus in:", el_parent);
};
@@ -248,14 +248,14 @@ function __WindowManager() {
el_parent.classList.remove("window-active");
} else if ((el_parent = event.target.closest(".window")) !== null) {
el_parent.classList.remove("window-active");
- } else if ((el_parent = event.target.closest(".menu-item-content")) !== null) {
- el_parent.classList.remove("menu-item-content-active");
+ } else if ((el_parent = event.target.closest(".menu")) !== null) {
+ el_parent.classList.remove("menu-active");
}
tools.debug("Focus out:", el_parent);
};
var __globalMouseButtonHandler = function(event) {
- if (!event.target.matches(".menu-item")) {
+ if (!event.target.matches(".menu-button")) {
for (let el_item = event.target; el_item && el_item !== document; el_item = el_item.parentNode) {
if (el_item.hasAttribute("data-force-hide-menu")) {
break;