-
{t('tagline')}
@@ -42,52 +46,113 @@ export default function Footer() {
{/* Links Columns */}
-
{t('legal')}
+
+ {t('legal')}
+
- - {t('legalNotice')}
- - {t('privacyPolicy')}
- - {t('terms')}
+ -
+
+ {t('legalNotice')}
+
+
+ -
+
+ {t('privacyPolicy')}
+
+
+ -
+
+ {t('terms')}
+
+
-
{t('company')}
+
+ {t('company')}
+
- - {navT('team')}
- - {navT('products')}
- - {navT('blog')}
- - {navT('contact')}
+ -
+
+ {navT('team')}
+
+
+ -
+
+ {navT('products')}
+
+
+ -
+
+ {navT('blog')}
+
+
+ -
+
+ {navT('contact')}
+
+
{/* Recent Posts Column */}
-
{t('recentPosts')}
+
+ {t('recentPosts')}
+
diff --git a/components/home/GallerySection.tsx b/components/home/GallerySection.tsx
index 844792dd..546bb66b 100644
--- a/components/home/GallerySection.tsx
+++ b/components/home/GallerySection.tsx
@@ -46,7 +46,7 @@ export default function GallerySection() {
alt={`${t('alt')} ${idx + 1}`}
fill
className="object-cover transition-transform duration-1000 group-hover:scale-110"
- unoptimized
+ sizes="(max-width: 768px) 100vw, (max-width: 1200px) 50vw, 33vw"
/>
diff --git a/components/home/Hero.tsx b/components/home/Hero.tsx
index f91533fe..0b7a6fa7 100644
--- a/components/home/Hero.tsx
+++ b/components/home/Hero.tsx
@@ -4,7 +4,8 @@ import Scribble from '@/components/Scribble';
import { Button, Container, Heading, Section } from '@/components/ui';
import { motion } from 'framer-motion';
import { useTranslations } from 'next-intl';
-import HeroIllustration from './HeroIllustration';
+import dynamic from 'next/dynamic';
+const HeroIllustration = dynamic(() => import('./HeroIllustration'), { ssr: false });
export default function Hero() {
const t = useTranslations('Home.hero');
@@ -19,7 +20,10 @@ export default function Hero() {
variants={containerVariants}
>
-
+
{t.rich('title', {
green: (chunks) => (
@@ -36,7 +40,7 @@ export default function Hero() {
- )
+ ),
})}
@@ -50,13 +54,23 @@ export default function Hero() {
variants={buttonContainerVariants}
>
-
-
+
{t('exploreProducts')}
@@ -77,7 +91,7 @@ export default function Hero() {
className="absolute bottom-6 md:bottom-10 left-1/2 -translate-x-1/2 hidden sm:block"
initial={{ opacity: 0, y: 16 }}
animate={{ opacity: 1, y: 0 }}
- transition={{ duration: 1, ease: "easeOut", delay: 3 }}
+ transition={{ duration: 1, ease: 'easeOut', delay: 3 }}
>
@@ -101,9 +115,9 @@ const containerVariants = {
opacity: 1,
transition: {
staggerChildren: 0.12,
- delayChildren: 0.4
- }
- }
+ delayChildren: 0.4,
+ },
+ },
} as const;
const headingVariants = {
@@ -112,8 +126,8 @@ const headingVariants = {
opacity: 1,
y: 0,
scale: 1,
- transition: { duration: 1.2, ease: [0.25, 0.46, 0.45, 0.94] }
- }
+ transition: { duration: 1.2, ease: [0.25, 0.46, 0.45, 0.94] },
+ },
} as const;
const accentVariants = {
@@ -122,8 +136,8 @@ const accentVariants = {
opacity: 1,
scale: 1,
rotate: 0,
- transition: { duration: 0.8, ease: [0.25, 0.46, 0.45, 0.94] }
- }
+ transition: { duration: 0.8, ease: [0.25, 0.46, 0.45, 0.94] },
+ },
} as const;
const scribbleVariants = {
@@ -132,8 +146,8 @@ const scribbleVariants = {
opacity: 1,
scale: 1,
rotate: 0,
- transition: { duration: 1, type: "spring", stiffness: 300, damping: 20 }
- }
+ transition: { duration: 1, type: 'spring', stiffness: 300, damping: 20 },
+ },
} as const;
const subtitleVariants = {
@@ -142,8 +156,8 @@ const subtitleVariants = {
opacity: 1,
y: 0,
scale: 1,
- transition: { duration: 1, ease: [0.25, 0.46, 0.45, 0.94] }
- }
+ transition: { duration: 1, ease: [0.25, 0.46, 0.45, 0.94] },
+ },
} as const;
const buttonContainerVariants = {
@@ -152,9 +166,9 @@ const buttonContainerVariants = {
opacity: 1,
transition: {
staggerChildren: 0.15,
- delayChildren: 0.4
- }
- }
+ delayChildren: 0.4,
+ },
+ },
} as const;
const buttonVariants = {
@@ -163,6 +177,6 @@ const buttonVariants = {
opacity: 1,
y: 0,
scale: 1,
- transition: { type: "spring", stiffness: 400, damping: 20 }
- }
+ transition: { type: 'spring', stiffness: 400, damping: 20 },
+ },
} as const;
diff --git a/components/home/HeroIllustration.tsx b/components/home/HeroIllustration.tsx
index 2a8abb4e..c145bffb 100644
--- a/components/home/HeroIllustration.tsx
+++ b/components/home/HeroIllustration.tsx
@@ -1,13 +1,12 @@
'use client';
-import React from 'react';
+import React, { useEffect, useState } from 'react';
// Isometric grid configuration - true 2:1 isometric projection
const CELL_WIDTH = 120;
const CELL_HEIGHT = 60; // Half of width for 2:1 isometric
// Convert grid coordinates to isometric screen coordinates
-// Using standard isometric projection where x goes right-down, y goes right-up
function gridToScreen(col: number, row: number): { x: number; y: number } {
return {
x: (col - row) * (CELL_WIDTH / 2),
@@ -16,65 +15,53 @@ function gridToScreen(col: number, row: number): { x: number; y: number } {
}
// Grid layout (10 columns x 8 rows)
-// Energy flow: Solar/Wind (left) → Substations (center) → Transmission → City (right)
const GRID = {
cols: 10,
rows: 8,
};
-// Infrastructure positions - precisely on grid intersections
+// Infrastructure positions
const INFRASTRUCTURE = {
- // Solar panels (two groups)
solar: [
- // Group 1 - bottom-left
{ col: 0, row: 5 },
{ col: 1, row: 5 },
{ col: 0, row: 6 },
{ col: 1, row: 6 },
- // Group 2 - middle-bottom
{ col: 2, row: 7 },
{ col: 3, row: 7 },
{ col: 2, row: 8 },
{ col: 3, row: 8 },
],
- // Wind turbines (two groups)
wind: [
- // Group 1 - top-left
{ col: 0, row: 1 },
{ col: 1, row: 2 },
{ col: 2, row: 1 },
- // Group 2 - top-center
{ col: 3, row: 0 },
{ col: 4, row: 1 },
{ col: 5, row: 0 },
],
- // Substations
substations: [
- { col: 3, row: 3, type: 'collection' }, // Main collection substation
- { col: 6, row: 4, type: 'distribution' }, // Distribution substation (right)
- { col: 5, row: 7, type: 'distribution' }, // Distribution substation (bottom-left)
+ { col: 3, row: 3, type: 'collection' },
+ { col: 6, row: 4, type: 'distribution' },
+ { col: 5, row: 7, type: 'distribution' },
],
- // Transmission towers (along the routes)
towers: [
{ col: 4, row: 3 },
{ col: 5, row: 4 },
{ col: 4, row: 5 },
{ col: 5, row: 6 },
],
- // City/Buildings (right side)
city: [
{ col: 8, row: 3, type: 'tall' },
{ col: 9, row: 4, type: 'medium' },
{ col: 8, row: 5, type: 'small' },
{ col: 9, row: 5, type: 'medium' },
],
- // City 2 (bottom-left area)
city2: [
{ col: 6, row: 8, type: 'medium' },
{ col: 7, row: 7, type: 'tall' },
{ col: 7, row: 8, type: 'small' },
],
- // Trees (decorative, scattered around)
trees: [
{ col: 0, row: 3 },
{ col: 2, row: 6 },
@@ -84,77 +71,43 @@ const INFRASTRUCTURE = {
],
};
-// Power line connections - grid-aligned paths only (no diagonals)
-// Each group meets at a collection point, then flows to main substation
const POWER_LINES = [
- // === WIND GROUP 1 (top-left) - meet at (1,1) then to substation ===
- // Turbine at (0,1) → collection point (1,1)
{ from: { col: 0, row: 1 }, to: { col: 1, row: 1 } },
- // Turbine at (1,2) → up to (1,1)
{ from: { col: 1, row: 2 }, to: { col: 1, row: 1 } },
- // Turbine at (2,1) → left to (1,1)
{ from: { col: 2, row: 1 }, to: { col: 1, row: 1 } },
- // Collection point (1,1) → down to (1,3) → right to substation (3,3)
{ from: { col: 1, row: 1 }, to: { col: 1, row: 3 } },
{ from: { col: 1, row: 3 }, to: { col: 3, row: 3 } },
-
- // === WIND GROUP 2 (top-center) - meet at (4,1) then to substation ===
- // Turbine at (3,0) → right to (4,0) → down to (4,1)
{ from: { col: 3, row: 0 }, to: { col: 4, row: 0 } },
{ from: { col: 4, row: 0 }, to: { col: 4, row: 1 } },
- // Turbine at (4,1) is the collection point
- // Turbine at (5,0) → down to (5,1) → left to (4,1)
{ from: { col: 5, row: 0 }, to: { col: 5, row: 1 } },
{ from: { col: 5, row: 1 }, to: { col: 4, row: 1 } },
- // Collection point (4,1) → down to (4,3) → left to substation (3,3)
{ from: { col: 4, row: 1 }, to: { col: 4, row: 3 } },
{ from: { col: 4, row: 3 }, to: { col: 3, row: 3 } },
-
- // === SOLAR GROUP 1 (bottom-left) - meet at (1,5) then to substation ===
- // Panels at (0,5), (1,5), (0,6), (1,6) → collection at (1,5)
{ from: { col: 0, row: 5 }, to: { col: 1, row: 5 } },
{ from: { col: 0, row: 6 }, to: { col: 0, row: 5 } },
{ from: { col: 1, row: 6 }, to: { col: 1, row: 5 } },
- // Collection point (1,5) → up to (1,3) → right to substation (3,3)
{ from: { col: 1, row: 5 }, to: { col: 1, row: 3 } },
-
- // === SOLAR GROUP 2 (middle-bottom) - meet at (3,7) then to substation ===
- // Panels at (2,7), (3,7), (2,8), (3,8) → collection at (3,7)
{ from: { col: 2, row: 7 }, to: { col: 3, row: 7 } },
{ from: { col: 2, row: 8 }, to: { col: 2, row: 7 } },
{ from: { col: 3, row: 8 }, to: { col: 3, row: 7 } },
- // Collection point (3,7) → up to (3,3) substation
{ from: { col: 3, row: 7 }, to: { col: 3, row: 5 } },
{ from: { col: 3, row: 5 }, to: { col: 3, row: 3 } },
-
- // === MAIN TRANSMISSION: Substation (3,3) → Towers → Distribution → City ===
- // Substation to first tower
{ from: { col: 3, row: 3 }, to: { col: 4, row: 3 } },
- // First tower to second tower (grid-aligned)
{ from: { col: 4, row: 3 }, to: { col: 5, row: 3 } },
{ from: { col: 5, row: 3 }, to: { col: 5, row: 4 } },
- // Second tower to distribution substation (right)
{ from: { col: 5, row: 4 }, to: { col: 6, row: 4 } },
- // Distribution to city 1 (grid-aligned)
{ from: { col: 6, row: 4 }, to: { col: 7, row: 4 } },
{ from: { col: 7, row: 4 }, to: { col: 8, row: 4 } },
- // Branch to buildings (city 1)
{ from: { col: 8, row: 4 }, to: { col: 8, row: 3 } },
{ from: { col: 8, row: 4 }, to: { col: 8, row: 5 } },
{ from: { col: 8, row: 3 }, to: { col: 9, row: 3 } },
{ from: { col: 9, row: 3 }, to: { col: 9, row: 4 } },
{ from: { col: 8, row: 5 }, to: { col: 9, row: 5 } },
-
- // === SECOND ROUTE: Substation (3,3) → Towers → Distribution (5,7) → City 2 ===
- // Branch from main substation down
{ from: { col: 3, row: 3 }, to: { col: 3, row: 5 } },
{ from: { col: 3, row: 5 }, to: { col: 4, row: 5 } },
- // Tower at (4,5) to tower at (5,6)
{ from: { col: 4, row: 5 }, to: { col: 5, row: 5 } },
{ from: { col: 5, row: 5 }, to: { col: 5, row: 6 } },
- // Tower to distribution substation (bottom-left)
{ from: { col: 5, row: 6 }, to: { col: 5, row: 7 } },
- // Distribution to city 2
{ from: { col: 5, row: 7 }, to: { col: 6, row: 7 } },
{ from: { col: 6, row: 7 }, to: { col: 6, row: 8 } },
{ from: { col: 6, row: 7 }, to: { col: 7, row: 7 } },
@@ -162,17 +115,30 @@ const POWER_LINES = [
];
export default function HeroIllustration() {
+ const [isMobile, setIsMobile] = useState(false);
+
+ useEffect(() => {
+ const checkMobile = () => setIsMobile(window.innerWidth < 768);
+ checkMobile();
+ window.addEventListener('resize', checkMobile);
+ return () => window.removeEventListener('resize', checkMobile);
+ }, []);
+
+ const viewBox = isMobile ? '400 0 1000 1100' : '-400 -200 1800 1100';
+ const scale = isMobile ? 1.44 : 1;
+ const opacity = isMobile ? 0.6 : 0.85;
+
return (
-
+
-
- {/* Desktop SVG - Original */}
-
-
+
);
}
diff --git a/components/home/MeetTheTeam.tsx b/components/home/MeetTheTeam.tsx
index 6682f84c..d1b8b8f3 100644
--- a/components/home/MeetTheTeam.tsx
+++ b/components/home/MeetTheTeam.tsx
@@ -11,43 +11,53 @@ export default function MeetTheTeam() {
return (
-
+
{t('title')}
-
+
-
+
{t('cta')}
→
-
+
diff --git a/components/home/ProductCategories.tsx b/components/home/ProductCategories.tsx
index faac7ff1..e67e9f6b 100644
--- a/components/home/ProductCategories.tsx
+++ b/components/home/ProductCategories.tsx
@@ -9,62 +9,74 @@ export default function ProductCategories() {
const locale = useLocale();
const categories = [
- {
- title: t('categories.lowVoltage.title'),
+ {
+ title: t('categories.lowVoltage.title'),
desc: t('categories.lowVoltage.description'),
img: '/uploads/2024/11/low-voltage-category.webp',
icon: '/uploads/2024/11/Low-Voltage.svg',
- href: `/${locale}/products/low-voltage-cables`
+ href: `/${locale}/products/low-voltage-cables`,
},
- {
- title: t('categories.mediumVoltage.title'),
+ {
+ title: t('categories.mediumVoltage.title'),
desc: t('categories.mediumVoltage.description'),
img: '/uploads/2024/11/medium-voltage-category.webp',
icon: '/uploads/2024/11/Medium-Voltage.svg',
- href: `/${locale}/products/medium-voltage-cables`
+ href: `/${locale}/products/medium-voltage-cables`,
},
- {
- title: t('categories.highVoltage.title'),
+ {
+ title: t('categories.highVoltage.title'),
desc: t('categories.highVoltage.description'),
img: '/uploads/2024/11/high-voltage-category.webp',
icon: '/uploads/2024/11/High-Voltage.svg',
- href: `/${locale}/products/high-voltage-cables`
+ href: `/${locale}/products/high-voltage-cables`,
},
- {
- title: t('categories.solar.title'),
+ {
+ title: t('categories.solar.title'),
desc: t('categories.solar.description'),
img: '/uploads/2024/11/solar-category.webp',
icon: '/uploads/2024/11/Solar.svg',
- href: `/${locale}/products/solar-cables`
- }
+ href: `/${locale}/products/solar-cables`,
+ },
];
return (
{categories.map((category, idx) => (
-
-
+
-
+
-
{category.title}
+
+ {category.title}
+
{category.desc}
- {t('exploreCategory')} →
+ {t('exploreCategory')}{' '}
+ →
diff --git a/components/home/RecentPosts.tsx b/components/home/RecentPosts.tsx
index d7cdb886..95e25319 100644
--- a/components/home/RecentPosts.tsx
+++ b/components/home/RecentPosts.tsx
@@ -43,7 +43,7 @@ export default async function RecentPosts({ locale }: RecentPostsProps) {
alt={post.frontmatter.title}
fill
className="w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"
- unoptimized
+ sizes="(max-width: 768px) 100vw, 33vw"
/>
{post.frontmatter.category && (