diff --git a/components/sidemenu/sidemenu.js b/components/sidemenu/sidemenu.js index f025fd35e..ef3558861 100644 --- a/components/sidemenu/sidemenu.js +++ b/components/sidemenu/sidemenu.js @@ -98,7 +98,7 @@ SideMenu.prototype.__refresh = function() { if (this.setting.top) { this.elt.style.top = this.setting.top; } else { - this.elt.style.top = '0'; + this.elt.style.top = '42px'; } if (this.setting.position === 'right') { diff --git a/components/toolbar/toolbar.css b/components/toolbar/toolbar.css index 8711122d4..7521512f1 100644 --- a/components/toolbar/toolbar.css +++ b/components/toolbar/toolbar.css @@ -1,3 +1,5 @@ + + ul.tools > li.handler { width: 1.2rem; height: 100%; @@ -14,7 +16,7 @@ ul.tools { left: 0; padding: 0; margin: 0; - height: 2.4rem; + height: 36px; border-radius: 0 0.5rem 0.5rem 0; border: solid #365f9c 0.2rem; background-color: #365f9c; @@ -23,7 +25,6 @@ ul.tools { ul.tools > li { cursor: pointer; height: 100%; - width: 2.4rem; float: left; margin-left: 0.2rem; list-style: none; @@ -54,6 +55,7 @@ ul.tools > li:not(.handler) > input[type="checkbox"]:checked + label { background-color: #365f9c; color: #fff; /*box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.3);*/ + padding: 0 2px 2px 2px; } ul.tools > li:not(.handler) > input[type="checkbox"] + label:hover { @@ -62,13 +64,8 @@ ul.tools > li:not(.handler) > input[type="checkbox"] + label:hover { /* ------------- */ -.drop_down_container{ - position: relative; - padding: 5px; -} - ul.drop_down { - width: 2.4rem; + z-index: 100; font-size: 1.4rem; padding: 0; margin: 0; @@ -78,12 +75,30 @@ ul.drop_down { } ul.tools > li:hover ul.drop_down { - flex-direction: row; /* Consumes less space */ - display: flex; + flex-direction: column; /* Consumes less space */ + display: block; width: fit-content; width: -moz-fit-content; } +.camic-logo{ + min-width: 25px; + min-height: 25px; +} + +.material-icons.md-36 { + font-size: 36px; +} + +@media (max-width: 750px) { + .material-icons.md-36 { + font-size: 24px; + } +} + + + + ul.drop_down li { cursor: pointer; /* width: 2.4rem; diff --git a/components/toolbar/toolbar.js b/components/toolbar/toolbar.js index 798778eac..0c7fce5b8 100644 --- a/components/toolbar/toolbar.js +++ b/components/toolbar/toolbar.js @@ -54,6 +54,42 @@ * changing status(check/radio/dropdown), return a object which has value and status. * */ + +const camic_svg = ` + + + + + + + + + + + + +` + function CaToolbar(options) { this.name = 'CaToolbar'; // DOM elts @@ -80,7 +116,7 @@ function CaToolbar(options) { // may be it can be extension in future... mainTools: [ { - icon: 'apps', + icon: 'camic', title: 'Applications', type: 'check', value: 'apps', @@ -154,8 +190,16 @@ CaToolbar.prototype.__createBtn = function(options) { if (options.name) li.name = options.name; const btn = document.createElement('i'); btn.classList.add('material-icons'); - btn.classList.add('md-24'); - btn.textContent = options.icon; + btn.classList.add('md-36'); + if (options.icon =="camic"){ + btn.innerHTML = camic_svg; + btn.classList.add("camic-logo"); + btn.title = "camic"; + btn.style.height = "36px" + btn.style.width = "36px" + } else { + btn.textContent = options.icon; + } if (options.title) { tippy(btn, { content: options.title, @@ -211,8 +255,15 @@ CaToolbar.prototype.__createCheck = function(options) { // icon const icon = document.createElement('label'); icon.classList.add('material-icons'); - icon.classList.add('md-24'); - icon.textContent = options.icon; + icon.classList.add('md-36'); + if (options.icon == "camic"){ + icon.innerHTML = camic_svg; + icon.title = "camic"; + icon.style.height = "36px" + icon.style.width = "36px" + } else { + icon.textContent = options.icon; + } if (options.ariaLabel) icon.ariaLabel = options.ariaLabel; icon.htmlFor = id; if (options.title) { @@ -275,7 +326,7 @@ CaToolbar.prototype.__createRadio = function(options) { const icon = document.createElement('label'); if (options.icon) { icon.classList.add('material-icons'); - icon.classList.add('md-24'); + icon.classList.add('md-36'); if (options.ariaLabel) icon.ariaLabel = options.ariaLabel; icon.textContent = options.icon; } else { @@ -333,7 +384,7 @@ CaToolbar.prototype.__createMultiStateBtns = function(options) { const icon = document.createElement('label'); icon.id = randomId(); // create a timestamp id icon.classList.add('material-icons'); - icon.classList.add('md-24'); + icon.classList.add('md-36'); if (options.ariaLabel) icon.ariaLabel = options.ariaLabel; icon.classList.add(0); icon.dataset.state = 0; @@ -387,7 +438,7 @@ CaToolbar.prototype.__createMultiDropDown = function(options) { // icon const icon = document.createElement('label'); icon.classList.add('material-icons'); - icon.classList.add('md-24'); + icon.classList.add('md-36'); if (options.ariaLabel) icon.ariaLabel = options.ariaLabel; icon.textContent = options.icon; icon.htmlFor = id; @@ -515,8 +566,11 @@ CaToolbar.prototype.__createDropDown = function(options) { // icon const icon = document.createElement('label'); icon.classList.add('material-icons'); - icon.classList.add('md-24'); - if (options.ariaLabel) icon.ariaLabel = options.ariaLabel; + icon.classList.add('md-36'); + if (options.ariaLabel){ + icon.ariaLabel = options.ariaLabel; + icon.title = options.ariaLabel; + } icon.textContent = options.icon; icon.htmlFor = id; if (options.title) { diff --git a/css/style.css b/css/style.css index ab6f82fbe..404ee65e4 100644 --- a/css/style.css +++ b/css/style.css @@ -1,6 +1,7 @@ /* css style */ html { font-size: 10px; + min-width: 320px; } html, @@ -10,6 +11,7 @@ body { font-family: sans-serif; height: 100%; width: 100%; + } body { @@ -18,6 +20,7 @@ body { background-size: 2rem 2rem; background-position: 0 0, 5rem 0, 5rem -5rem, 0px 5rem; background-color: rgba(220, 220, 220, 1); + min-width: 400px; } /* osd main viewer */ @@ -261,8 +264,8 @@ opacity: 0.3 !important; } ul.tools>li{ - height: 2vw !important; - width: 2vw !important; + height: 3vw !important; + width: 3vw !important; min-height: 25px; min-width: 25px; } @@ -278,7 +281,7 @@ opacity: 0.3 !important; } ul.tools{ - height: 2vw !important; + height: 3vw !important; } .material-icons.md-24 {