Rehacer la web con Hugo: nuevo diseño, blog integrado y página del 29N

This commit is contained in:
Alejandro Guerrero 2026-10-18 19:26:56 +02:00
parent 5d229667f0
commit e75c923f90
Signed by: alejandrogs73
GPG key ID: 1CFF10953BEE333C
59 changed files with 1262 additions and 1352 deletions

13
assets/js/main.js Normal file
View file

@ -0,0 +1,13 @@
// Resalta en el índice de la ideología el principio que se está leyendo. Sin dependencias.
(() => {
const enlaces = document.querySelectorAll('.indice a');
if (enlaces.length && 'IntersectionObserver' in window) {
const obs = new IntersectionObserver(entradas => {
entradas.forEach(en => {
if (!en.isIntersecting) return;
enlaces.forEach(a => a.classList.toggle('activo', a.hash === '#' + en.target.id));
});
}, { rootMargin: '-30% 0px -60% 0px' });
document.querySelectorAll('.principio').forEach(p => obs.observe(p));
}
})();