feat(branding): system name/logo, horizontal logo on all pages
This commit is contained in:
+11
-3
@@ -1,4 +1,12 @@
|
||||
const state={token:'',password:null,showNames:true,cdTarget:0,cdTimer:null,cdBound:false};
|
||||
const state={token:'',password:null,showNames:true,cdTarget:0,cdTimer:null,cdBound:false,systemName:'WhatIDo'};
|
||||
|
||||
function loadBrand(){
|
||||
return fetch('/api/public-settings').then(function(res){
|
||||
return res.ok?res.json():null;
|
||||
}).then(function(s){
|
||||
if(s&&(s.system_name||'').trim())state.systemName=s.system_name;
|
||||
}).catch(function(){});
|
||||
}
|
||||
|
||||
function esc(s){return String(s==null?'':s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/'/g,''')}
|
||||
function pad(n){return String(n).padStart(2,'0')}
|
||||
@@ -440,7 +448,7 @@ function renderFooter(data,heading,pool){
|
||||
const label=btn.querySelector('.text-block-wrap-div');
|
||||
if(label)label.textContent='Перейти по ссылке';
|
||||
}
|
||||
setText('footCopy','WhatIDo © '+new Date().getFullYear());
|
||||
setText('footCopy',state.systemName+' © '+new Date().getFullYear());
|
||||
setText('footBrand',heading);
|
||||
const fbox=document.getElementById('footerPhotoBox');
|
||||
const fimg=document.getElementById('footerPhoto');
|
||||
@@ -542,5 +550,5 @@ function bindEvents(){
|
||||
|
||||
bindEvents();
|
||||
makeNavLinks();
|
||||
loadReport();
|
||||
loadBrand().then(function(){loadReport()});
|
||||
function closeLightbox(){const lb=document.getElementById('lightbox');if(lb)lb.classList.remove('is-open')}
|
||||
Reference in New Issue
Block a user