',1)}

Blog pages

Each blog uses its own meta title, meta description and cover image for search & social previews. The site-wide codes above are injected into the <head> of the blog list, every single blog page and this admin panel.

`} function seoImg(i){const f=i.files[0];if(f)fitImg(f,1200,630,d=>{seo.ogimg=d;const p=$('#so');p.src=d;p.hidden=false})} function saveSeo(){['site','desc','ga','gtm','sc','head'].forEach(k=>seo[k]=$('#s_'+k).value.trim());sv('bcrm_seo',seo);applySEO();toast('SEO settings saved & applied')} function aAcc(){return `

Account

Change credentials

`} function saveAcc(){cred.u=$('#a_u').value.trim()||cred.u;if($('#a_p').value){if($('#a_p').value.length<6)return toast('Password must be 6+ characters');cred.p=$('#a_p').value}cred.k=$('#a_k').value.trim()||cred.k;sv('bcrm_cred',cred);toast('Account updated')} /* Router */ function R(){const h=location.hash.slice(1);let v; if(h=='login')v=auth?(location.hash='admin',''):viewLogin();else if(h=='admin')v=auth?viewAdmin():(location.hash='login','');else if(h.startsWith('post-'))v=viewPost(h.slice(5));else v=viewList(); if(v!==undefined&&v!=='')$('#app').innerHTML=v} addEventListener('hashchange',()=>{msg='';R();scrollTo(0,0)});applySEO();R();