// GSP — Conocimiento (Blog): índice + artículo.
function BlogReveal({ children, delay = 0, style = {} }) {
const ref = React.useRef(null);
React.useEffect(() => {
const el = ref.current;
const ob = new IntersectionObserver((es) => es.forEach(e => { if (e.isIntersecting) e.target.classList.add('visible'); }), { threshold: 0.1, rootMargin: '0px 0px -40px 0px' });
ob.observe(el);
return () => ob.disconnect();
}, []);
return
{children}
;
}
function BlogIndex() {
const Icon = window.Icon;
const featured = window.GSP_ARTICLE;
const cats = ['Todos', 'Vigilancia', 'Alarmas', 'Cámaras', 'Control de Accesos'];
const [active, setActive] = React.useState('Todos');
const all = window.GSP_ARTICLES;
const list = active === 'Todos' ? all : all.filter(a => a[2] === active);
return (
Centro de Conocimiento
Seguridad que se entiende
Guías, comparativas y consejos prácticos para proteger tu hogar, tu comercio y tu empresa. Sin tecnicismos innecesarios.
{cats.map(c => (
))}
);
}
window.BlogIndex = BlogIndex;
function Article() {
const Icon = window.Icon;
const a = window.GSP_ARTICLE;
return (
{a.category}
{a.title}
{a.author}{a.date}{a.readTime}
);
}
window.Article = Article;