diff --git a/scale_fix.mjs b/scale_fix.mjs new file mode 100644 index 0000000..0942d83 --- /dev/null +++ b/scale_fix.mjs @@ -0,0 +1,40 @@ +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'); + let original = content; + + // Hero Section + if (file === 'HeroSection.tsx') { + content = content.replaceAll('text-5xl md:text-7xl lg:text-8xl', 'text-4xl md:text-6xl lg:text-8xl break-words'); + content = content.replaceAll('text-2xl md:text-4xl font-hero', 'text-xl md:text-3xl lg:text-4xl font-hero'); + } else { + // Normal Sections Big Titles + // Replace text-6xl md:text-7xl font-bold pt-4 pb-10 leading-[1.8] text-gradient + content = content.replace(/text-6xl md:text-7xl/g, 'text-4xl md:text-5xl lg:text-7xl break-words'); + content = content.replace(/text-5xl md:text-6xl/g, 'text-3xl md:text-4xl lg:text-6xl break-words'); + + // Smaller sizes + content = content.replace(/text-5xl pt-3 pb-6/g, 'text-3xl md:text-4xl lg:text-5xl pt-3 pb-6 break-words'); + content = content.replace(/text-4xl pt-3 pb-5/g, 'text-2xl md:text-3xl lg:text-4xl pt-3 pb-5'); + content = content.replace(/text-3xl pt-3 pb-5/g, 'text-xl md:text-2xl lg:text-3xl pt-3 pb-5'); + + // Footer / Nav + content = content.replace(/text-4xl py-4/g, 'text-2xl md:text-3xl lg:text-4xl py-4'); + content = content.replace(/text-4xl py-2/g, 'text-2xl md:text-3xl lg:text-4xl py-2'); + content = content.replace(/text-2xl py-2/g, 'text-lg md:text-xl lg:text-2xl py-2'); + } + + // General overflow catch-all: Ensure .container has overflow-hidden just in case? + // No, adding break-words is better. + + if (original !== content) { + fs.writeFileSync(filePath, content); + console.log(`Fixed responsive sizes in ${file}`); + } +} diff --git a/src/components/AboutSection.tsx b/src/components/AboutSection.tsx index 31d025f..e413c79 100644 --- a/src/components/AboutSection.tsx +++ b/src/components/AboutSection.tsx @@ -30,7 +30,7 @@ const AboutSection = () => ( viewport={{ once: false, amount: 0.15 }} transition={{ duration: 0.6 }} > -
diff --git a/src/components/BookingSection.tsx b/src/components/BookingSection.tsx
index 4f2e74a..dbcf333 100644
--- a/src/components/BookingSection.tsx
+++ b/src/components/BookingSection.tsx
@@ -161,7 +161,7 @@ const BookingSection = () => {
className="max-w-lg mx-auto text-center bg-card rounded-2xl p-10 shadow-elevated"
>
@@ -186,7 +186,7 @@ const BookingSection = () => { viewport={{ once: false, amount: 0.15 }} className="text-center mb-10" > -
diff --git a/src/components/FooterSection.tsx b/src/components/FooterSection.tsx index 405b34c..adc218b 100644 --- a/src/components/FooterSection.tsx +++ b/src/components/FooterSection.tsx @@ -17,7 +17,7 @@ const FooterSection = () => (
@@ -26,7 +26,7 @@ const FooterSection = () => (
{/* Contacto */}