Last active
March 26, 2018 15:49
-
-
Save AdrianoPereira/464547ef178630ea6b247799c24926f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*INFORMAÇÕES CONSTANTES DA DEFENSORIA*/ | |
INSTITUTION_NAME = 'Defensoria Pública do Estado de Roraima'; | |
INSTITUTION_URL = 'www.defensoria.rr.def.br'; | |
SYSTEM_NAME = 'SOLAR - Solução Avançada em Atendimento e Referência'; | |
PRIMARY_COLOR = '#1b694b'; | |
SECONDARY_COLOR = '#696'; | |
LOGO_URL = '/static/img/logo.png'; | |
MANUAL_URL = 'http://manuais.rr.def.br/solar/#/home'; | |
SYSTEM_VERSION = 'V.18.02.5'; | |
/*CUSTOMIZAÇÃO DO CABEÇALHO E BARRA DE AJUDA*/ | |
mainHeader = document.querySelector('body > header'); | |
mainHeader.insertAdjacentHTML('beforebegin', '<div class="help-bar"><a title="Clique para acessar o manual" target="_blank" href="'+MANUAL_URL+'">Ajuda<div>'); | |
mainHeader.style.top = '25px'; | |
mainHeader.style.background = PRIMARY_COLOR; | |
mainHeader.style.border = 'none'; | |
helpBar = document.querySelector('body > div.help-bar'); | |
helpBar.style.background = SECONDARY_COLOR; | |
helpBar.style.textAlign = 'right'; | |
helpBar.style.paddingRight = '20px'; | |
helpBar.style.color = '#FFF'; | |
/*POSICIONAMENTO DAS INFORMAÇÕES DO USUÁRIO*/ | |
infoUser = document.querySelector('body > header > div > div > div.span8'); | |
if(infoUser){ | |
infoUser.classList.remove('span8'); | |
infoUser.classList.add('span5'); | |
infoUser.style.width = '47.17094%'; | |
} | |
/*AJUSTES NO POSICIONAMENTO DO CONTEÚDO PRINCIAL*/ | |
section = document.querySelector('body > section'); | |
section.style.top = '5px'; | |
section.insertAdjacentHTML('afterend', '<footer><a title="Acesse o site da Defensoria" href="http://'+INSTITUTION_URL+'" target="_blank">'+INSTITUTION_URL+'</footer>'); | |
/*INSERÇÃO DO RODAPÉ*/ | |
footer = document.querySelector('footer'); | |
footer.style.background = SECONDARY_COLOR; | |
footer.style.color = '#FFF'; | |
footer.style.textAlign = 'right'; | |
footer.style.paddingRight = '20px'; | |
footer.style.position = 'fixed'; | |
footer.style.width = 'calc(100% - 20px)'; | |
footer.style.bottom = 0; | |
/*CUSTOMIZAÇÃO DO MENU*/ | |
aside = document.querySelector('.side-left'); | |
if(aside) { | |
aside.style.backgroundColor = PRIMARY_COLOR; | |
aside.style.border = 'none'; | |
itemsAside = document.querySelector('body > section > div.row-fluid > div.span1 > aside > ul').childNodes; | |
heightPage = document.body.scrollHeight+'px'; | |
aside.style.height = heightPage; | |
aside.style.zIndex = 'inherit'; | |
for(i=1; i<itemsAside.length-1; i++){ | |
if(itemsAside[i].length == null){ | |
itemsAside[i].querySelector('li a').style.color = '#FFF'; | |
itemsAside[i].style.borderTop = '1px solid #3e774a'; | |
itemsAside[i].style.borderBottom = '1px solid #255f34'; | |
} | |
} | |
} | |
/*INSERÇÃO DE ELEMENTOS E CLASSES NO CABEÇALHO*/ | |
headerName = document.querySelector('.span3'); | |
headerName.insertAdjacentHTML('afterend', '<div class="span1"><div class="panel-ext"><div class="btn-group user-group"><img class="img-circle" src="'+LOGO_URL+'"'+ | |
'rel="tooltip" data-placement="bottom" width="48" height="48"><div></div></div>'); | |
headerName.parentNode.removeChild(headerName); | |
logo = document.querySelector('.span1'); | |
logo.style.textAlign = 'center'; | |
logo.insertAdjacentHTML('afterend', '<div class="span4"><span class="color-white"><b>'+INSTITUTION_NAME+'</b></span><br><span class="color-white"><a href="#">'+ | |
SYSTEM_NAME+' <span class="version">'+SYSTEM_VERSION+'</a></span></div>'); | |
version = document.querySelector('.version'); | |
version.style.fontSize = '8px'; | |
/*CUSTOMIZAÇÃO DO FORMULÁRIO DE LOGIN*/ | |
titleAuth = document.querySelector('body > section > div > div > div > div > div.box-header.grd-green.color-white.corner-top'); | |
if (titleAuth) { | |
titleAuth.style.background = PRIMARY_COLOR; | |
buttonAuth = document.querySelector('#sign-in > div.form-actions > input'); | |
buttonAuth.style.background = SECONDARY_COLOR; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment