ÐаÑвка на пеÑнÑ
ðµ ÐеÑплаÑнаÑ
â¡ ÐÑиоÑиÑеÑнаÑ
';
wrapper.parentNode.insertBefore(el,wrapper);
applyTheme(); // re-sync buttons
}
/* ---- SUB-NAV ---- */
function insertSubnav(){
if(document.getElementById('dz-subnav')) return;
const hw=document.getElementById('Header_wrapper');
if(!hw) return;
const p=window.location.pathname;
const links=[
{h:'/',l:'ÐлавнаÑ'},
{h:'/akkordy/',l:'ÐккоÑдÑ'},
{h:'/applikatury/',l:'ÐппликаÑÑÑÑ'},
{h:'/blog/',l:'Ðлог'},
{h:'#',l:'+ ÐаказаÑÑ Ð¿ÐµÑнÑ',o:"dzOpenModal('dz-modal-order');return false"},
];
const html=links.map(lk=>{
const active=lk.h!=='#'&&(p===lk.h||(p.startsWith(lk.h)&&lk.h!=='/'));
return '
'+lk.l+'';
}).join('');
const el=document.createElement('div');
el.id='dz-subnav';
el.innerHTML='
'+html+'
';
hw.insertAdjacentElement('afterend',el);
}
/* ---- HERO (homepage only) ---- */
function insertHero(){
if(!document.body.classList.contains('home')) return;
if(document.getElementById('dz-hero')) return;
const ref=document.getElementById('alfavit')||document.getElementById('Content');
if(!ref) return;
const el=document.createElement('div');
el.id='dz-hero';
el.innerHTML='
âª
'
+'
â«
'
+'
ÐккоÑÐ´Ñ Ð¸ ÑекÑÑÑ Ð¿ÐµÑнÑ
'
+'
ТоÑнÑе аккоÑÐ´Ñ Ñ Ð°Ð¿Ð¿Ð»Ð¸ÐºÐ°ÑÑÑами Ð´Ð»Ñ Ð³Ð¸ÑаÑÑ, ÑоÑÑепиано, ÑкÑлеле, балалайки и мандолинÑ
';
ref.parentNode.insertBefore(el,ref);
}
/* ---- LOGO REPLACE ---- */
function replaceLogo(){
const logoLink=document.querySelector('#logo');
if(!logoLink||logoLink.querySelector('.dz-logo-text')) return;
const div=document.createElement('div');
div.className='dz-logo-text';
div.innerHTML='
â¯
DIEZA.NET';
logoLink.appendChild(div);
}
/* ---- FOOTER ENRICH ---- */
function enrichFooter(){
if(document.getElementById('dz-footer-grid')) return;
const ww=document.querySelector('#Footer .widgets_wrapper');
if(!ww) return;
const el=document.createElement('div');
el.id='dz-footer-grid';
el.innerHTML='
'
+'
'
+'
'
+'
';
ww.insertAdjacentElement('beforebegin',el);
}
/* ---- MODALS ---- */
window.dzOpenModal=function(id){ const el=document.getElementById(id); if(el) el.classList.add('open'); };
window.dzCloseModal=function(id){ const el=document.getElementById(id); if(el) el.classList.remove('open'); };
window.dzSwitchTab=function(btn){
const tabs=btn.closest('.dz-modal-tabs');
tabs.querySelectorAll('.dz-mtab').forEach(t=>t.classList.remove('active'));
btn.classList.add('active');
const showEl=document.getElementById(btn.dataset.show);
const hideEl=document.getElementById(btn.dataset.hide);
if(showEl) showEl.style.display='';
if(hideEl) hideEl.style.display='none';
};
document.querySelectorAll('.dz-modal-overlay').forEach(o=>{
o.addEventListener('click',e=>{ if(e.target===o) o.classList.remove('open'); });
});
/* ---- INIT ---- */
function init(){
insertTopbar();
insertSubnav();
insertHero();
replaceLogo();
enrichFooter();
}
if(document.readyState==='loading'){
document.addEventListener('DOMContentLoaded',init);
} else { init(); }
})();