thema de comienzo con efectos

This commit is contained in:
2026-09-22 21:37:59 -06:00
commit 6247ae7cc5
67 changed files with 5604 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
/* Top scroll progress from trivelta: the bar fills as the page scrolls. */
(function () {
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
return;
}
var bar = document.createElement('div');
bar.className = 'scroll-progress';
bar.setAttribute('aria-hidden', 'true');
document.body.appendChild(bar);
function onScroll() {
var scrolled = window.scrollY || window.pageYOffset;
var max = document.documentElement.scrollHeight - window.innerHeight;
var progress = max > 0 ? Math.min(1, scrolled / max) : 0;
bar.style.transform = 'scaleX(' + progress + ')';
}
window.addEventListener('scroll', onScroll, { passive: true });
window.addEventListener('resize', onScroll);
onScroll();
}());