chore: complete update

This commit is contained in:
2025-07-17 16:24:20 +02:00
parent 899227b0a4
commit 64a7051137
1300 changed files with 85570 additions and 2756 deletions

View File

@@ -0,0 +1,27 @@
// modules/parallax/index.js
import { Logger } from '../../core/logger.js';
import { registerFrameTask } from '../../core/frameloop.js';
export function init(config = {}) {
Logger.info('Parallax init');
const defaultConfig = {
selector: '[data-parallax]',
speedAttr: 'data-parallax-speed',
defaultSpeed: 0.5
};
const settings = { ...defaultConfig, ...config };
const elements = document.querySelectorAll(settings.selector);
function updateParallax() {
const scrollY = window.scrollY;
elements.forEach(el => {
const speed = parseFloat(el.getAttribute(settings.speedAttr)) || settings.defaultSpeed;
const offset = scrollY * speed;
el.style.transform = `translateY(${offset}px)`;
});
}
registerFrameTask('parallax', updateParallax, { autoStart: true });
}