Adding animations

This commit is contained in:
Antoni Nuñez Romeu
2026-03-19 16:48:42 +01:00
parent 3f0618829f
commit 3c1ae1643b
10 changed files with 41 additions and 19 deletions

15
update_animations.mjs Normal file
View File

@@ -0,0 +1,15 @@
import fs from 'fs';
import path from 'path';
const dir = 'src/components';
const files = fs.readdirSync(dir).filter(f => f.endsWith('.tsx'));
for (const file of files) {
const filePath = path.join(dir, file);
let content = fs.readFileSync(filePath, 'utf8');
if (content.includes('viewport={{ once: true }}')) {
content = content.replaceAll('viewport={{ once: true }}', 'viewport={{ once: false, amount: 0.15 }}');
fs.writeFileSync(filePath, content);
console.log(`Updated ${file}`);
}
}