Тема через CSS

This commit is contained in:
2021-11-09 23:53:56 +06:00
parent 0ee4dd3d48
commit 07a7e2fff6
4 changed files with 20 additions and 18 deletions

View File

@ -15,7 +15,7 @@ class tcTabs
tr.style.cssText='display: table-row; height: 1%; padding: 0px; margin: 0px; border: 0px solid #0000ff;'
this.btt=document.createElement('div');
this.btt.style.cssText='display: table-cell; width :100%; height: 1%; padding: 0px; margin: 0px; border: 0px solid #0000ff;background-color: '+g_backColor2+';color:'+g_textColor1+';';
this.btt.style.cssText='display: table-cell; width :100%; height: 1%; padding: 0px; margin: 0px; border: 0px solid #0000ff;background-color:var(--back-color-2);color:var(--text-color-1);';
tr.appendChild(this.btt);
this.wra.appendChild(tr);
@ -91,11 +91,11 @@ class tcTab
//Сам таб на который нажимаем (ушко)
this.div=document.createElement('div')
this.div.style.cssText='position: relative; top: 1px; cursor: pointer; float: '+config.float+'; border: 1px solid #b3b3b3; border-radius: 5px 5px 0px 0px; padding: 1px; padding-right: 4px; padding-left: 4px; margin-left: 2px; margin-right: 2px;'
this.div.style.background = g_backColor1;
this.div.style.background = 'var(--back-color-1)';
this.div.innerHTML=config.caption;
this.div.onmouseover=function(obj){return function(){ if(!obj.sel) obj.div.style.background = g_rowColor1; }}(this);
this.div.onmouseout=function(obj){return function(){ if(!obj.sel) obj.div.style.background = g_backColor1; }}(this);
this.div.onmouseover=function(obj){return function(){ if(!obj.sel) obj.div.style.background = 'var(--row-color-1)'; }}(this);
this.div.onmouseout=function(obj){return function(){ if(!obj.sel) obj.div.style.background = 'var(--back-color-1)'; }}(this);
this.div.onclick=function(obj){return function(){ obj.setSel(); if(obj.href!='') goToURL(obj.href); }}(this)
}
@ -124,12 +124,12 @@ class tcTab
setSel()
{
for(let i=0;i<this.par.tbs.length;i++)
{ this.par.tbs[i].div.style.background = g_backColor1;
{ this.par.tbs[i].div.style.background = 'var(--back-color-1)';
this.par.tbs[i].div.style.borderBottom = "1px solid #b3b3b3"
this.par.tbs[i].sel=false
this.par.tbs[i].con.style.display='none'
}
this.div.style.background = g_rowColor2;
this.div.style.background = 'var(--row-color-2)';
this.div.style.borderBottom = '1px solid var(--back-color)'
//this.con.style.display='inline'
this.con.style.display='block';