feat(branding): system name/logo, horizontal logo on all pages

This commit is contained in:
dev
2026-09-23 15:19:23 +03:00
parent e435b4ad43
commit f2d465e0c4
11 changed files with 275 additions and 18 deletions
+11 -3
View File
@@ -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,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;').replace(/'/g,'&#039;')}
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')}