County Assemblies Forum | Deepening Devolution in Kenya <script> document.addEventListener("DOMContentLoaded", function(){ const slider = document.querySelector("[data-hero-slider]"); if(!slider) return; const slides = Array.from(slider.querySelectorAll("[data-hero-slide]")); const dots = Array.from(slider.querySelectorAll("[data-hero-dot]")); const prev = slider.querySelector("[data-hero-prev]"); const next = slider.querySelector("[data-hero-next]"); if(slides.length <= 1){ if(prev) prev.style.display = "none"; if(next) next.style.display = "none"; dots.forEach(dot => dot.style.display = "none"); return; } let current = 0; let timer = null; function showSlide(index){ current = (index + slides.length) % slides.length; slides.forEach((slide, i) => { slide.classList.toggle("active", i === current); }); dots.forEach((dot, i) => { dot.classList.toggle("active", i === current); }); } function nextSlide(){ showSlide(current + 1); } function prevSlide(){ showSlide(current - 1); } function startAuto(){ stopAuto(); timer = setInterval(nextSlide, 6000); } function stopAuto(){ if(timer) clearInterval(timer); } if(next){ next.addEventListener("click", function(){ nextSlide(); startAuto(); }); } if(prev){ prev.addEventListener("click", function(){ prevSlide(); startAuto(); }); } dots.forEach((dot, index) => { dot.addEventListener("click", function(){ showSlide(index); startAuto(); }); }); slider.addEventListener("mouseenter", stopAuto); slider.addEventListener("mouseleave", startAuto); showSlide(0); startAuto(); }); </script> <style id="caf-real-slider-final"> /* REAL FINAL SLIDER FIX - inside Django content block */ .caf-hero.hero-final, .hero-final{ height:680px !important; min-height:680px !important; max-height:680px !important; overflow:hidden !important; background:none !important; } .caf-hero.hero-final .hero-slide, .hero-final .hero-slide, .hero-slide{ height:680px !important; min-height:680px !important; max-height:680px !important; background-size:cover !important; background-position:center center !important; background-repeat:no-repeat !important; background-blend-mode:normal !important; filter:none !important; opacity:1 !important; } /* remove green shade */ .caf-hero.hero-final::before, .caf-hero.hero-final::after, .hero-final::before, .hero-final::after, .hero-slide::after{ display:none !important; background:none !important; opacity:0 !important; } /* white fade only */ .caf-hero.hero-final .hero-slide::before, .hero-final .hero-slide::before, .hero-slide::before{ content:"" !important; position:absolute !important; inset:0 !important; z-index:1 !important; pointer-events:none !important; background:linear-gradient( 90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.78) 26%, rgba(255,255,255,.35) 48%, rgba(255,255,255,0) 68% ) !important; } /* black readable hero text */ .hero-final-content, .hero-slide .hero-final-content{ position:relative !important; z-index:5 !important; } .hero-brand-title, .hero-final h1, .hero-final h1 span, .hero-final p{ color:#111 !important; text-shadow:none !important; } .hero-title-line{ background:#daa127 !important; } @media(max-width:768px){ .caf-hero.hero-final, .hero-final, .hero-slide{ height:520px !important; min-height:520px !important; max-height:520px !important; } } </style> <style id="caf-slider-title-gold-final"> /* Final approved slider title color */ .hero-final h1, .hero-final h1 span, .hero-slide h1, .hero-slide h1 span, .hero-final-content h1, .hero-final-content h1 span{ color:#daa127 !important; text-shadow:none !important; } </style> | countyassembliesforum.org Analysis & SEO Stats