diff --git a/.context/reports/index.json b/.context/reports/index.json index 93715b9..b2fd3f4 100644 --- a/.context/reports/index.json +++ b/.context/reports/index.json @@ -1,7 +1,49 @@ { "version": 1, - "updatedAt": "2026-05-21T09:49:46.267Z", + "updatedAt": "2026-05-24T14:08:35.336Z", "entries": [ + { + "id": "2026-05-24T13-16-51-249Z-hero-section-fix-plan", + "category": "plan", + "title": "Hero Section Fix Plan", + "summary": "# Plan: Fix Hero Section Structure for All Product Pages ## Context Analyzed all 23 product pages against reference `armflex.astro`. ### Reference Structure (armflex.astro) ```html
+
+ + +
-- **Featured Products:** - - Add scroll-triggered reveal with stagger - - Add 3D tilt effect on card hover - - Add image reveal animation on scroll - -- **Trust Badges:** - - Add counter animation (numbers count up) - - Add scroll-triggered icon animations - -- **CTA Section:** - - Add parallax background effect - - Add gradient animation +
+
+
+
+ +
+
+
+ +
+
+
+
+``` --- -## Phase 3: Product Pages & Components +## Issues Found -**Why:** Extend animations consistently across all pages. +### Issue 1: ORDER CLASSES (9 pages) +**Problem:** Order classes swap image/content positions differently on mobile vs desktop. -**Modify** → `src/layouts/BaseLayout.astro` -- Enhance footer with scroll-triggered animations +| Page | Current Order | Result | +|------|--------------|--------| +| durgo-avvs | order-2 lg:order-1 | Image on right (desktop) | +| grilles | order-2 lg:order-1 | Image on right (desktop) | +| water-pump | order-2 lg:order-1 | Image on right (desktop) | +| ท่อ-hdpe | order-2 lg:order-1 | Image on right (desktop) | +| ท่อ-ppr-scg | order-2 lg:order-1 | Image on right (desktop) | +| ท่อ-ppr-thai-ppr | order-2 lg:order-1 | Image on right (desktop) | +| ท่อ-syler | order-2 lg:order-1 | Image on right (desktop) | +| ท่อ-upvc | order-2 lg:order-1 | Image on right (desktop) | +| เครื่องเชื่อม-hdpe | order-2 lg:order-1 | Image on right (desktop) | -**Modify** → `src/components/common/Header.astro` -- Add smooth scroll navigation highlighting -- Add mega menu with staggered item reveals - -**Modify** → Product pages (`src/pages/*.astro`) -- Add breadcrumb with reveal animation -- Add product gallery with lightbox and zoom -- Add related products carousel +**Fix:** Remove order classes entirely. Image will be on LEFT on ALL screen sizes. --- -## Phase 4: Modern Design Enhancements +### Issue 2: MISSING IMAGE CONTAINER CLASSES (7 pages) -**Why:** Add sophisticated design patterns beyond animations. - -**Modify** → `src/styles/global.css` -- Add bento grid layout utilities -- Add glassmorphism component classes -- Add custom cursor styles -- Add loading skeleton animations - -**Modify** → `src/pages/all-products.astro` -- Implement bento grid product layout -- Add filter animations -- Add lazy load with skeleton +| Page | Fix Needed | +|------|-----------| +| durgo-avvs | Add `bg-white/10 p-2` to image container | +| grilles | Add `bg-white/10 p-2` to image container | +| water-pump | Add `bg-white/10 p-2` to image container | +| ท่อ-hdpe | Add `bg-white/10 p-2` to image container | +| ท่อ-ppr-scg | Add `bg-white/10 p-2` to image container | +| ท่อ-ppr-thai-ppr | Add `bg-white/10 p-2` to image container | +| ท่อ-upvc | Add `bg-white/10 p-2` to image container | +| ท่อ-syler | Add `bg-white/10 p-2` to image container | --- -## Phase 5: Performance & Polish +### Issue 3: MISSING SECTION PADDING (7 pages) -**Why:** Ensure animations don't impact performance negatively. - -**Test** → Run `npm run build` to verify no errors -**Test** → Run `npm run dev` and verify animations work smoothly -**Polish** → Add reduced-motion media query for accessibility -**Polish** → Optimize animation performance (transform/opacity only) +| Page | Fix Needed | +|------|-----------| +| durgo-avvs | Add `lg:py-24` to section class | +| grilles | Add `lg:py-24` to section class | +| pipe-coupling | Add `lg:py-24` to section class | +| ท่อ-syler | Add `lg:py-24` to section class | +| ระบบน้ำ | Add `lg:py-24` to section class | +| วาล์ว-valve | Add `lg:py-24` to section class | +| เครื่องเชื่อม-hdpe | Add `lg:py-24` to section class | +| เครื่องเชื่อม-ppr | Add `lg:py-24` to section class | --- -## Critical Files +## Pages Status Summary -| File | Action | Changes | -|------|--------|---------| -| `src/styles/global.css` | Modify | Add animation library, utilities, glassmorphism | -| `src/layouts/BaseLayout.astro` | Modify | Add animation scripts, page wrapper | -| `src/layouts/Layout.astro` | Modify | Add meta tags, fonts | -| `src/components/common/Header.astro` | Modify | Scroll effects, animations, mobile menu | -| `src/components/common/Footer.astro` | Modify | Scroll animations, hover effects | -| `src/pages/index.astro` | Modify | Complete hero/product/cta redesign with animations | +| Page | Order Class | Image Container | Section Padding | +|------|-------------|-----------------|-----------------| +| aeroflex | ✅ OK | ✅ OK | ✅ OK | +| armflex | ✅ OK | ✅ OK | ✅ OK | +| maxflex | ✅ OK | ✅ OK | ✅ OK | +| pipe-coupling | ✅ OK | ✅ OK | ❌ Missing lg:py-24 | +| realflex | ✅ OK | ✅ OK | ✅ OK | +| water-treatment | ✅ OK | ✅ OK | ✅ OK | +| ตู้ดับเพลิง | ✅ OK | ✅ OK | ✅ OK | +| ระบบน้ำ | ✅ OK | ✅ OK | ❌ Missing lg:py-24 | +| ระบบรั้วไวน์แมน | ✅ OK | ✅ OK | ✅ OK | +| รั้วเทวดา | ✅ OK | ✅ OK | ✅ OK | +| เทอร์โมเบรค-thermobreak | ✅ OK | ✅ OK | ✅ OK | +| เม็ดกรู๊ฟ-คับปลิ้ง | ✅ OK | ✅ OK | ✅ OK | +| ท่อ-xy-lent | ✅ OK | ✅ OK | ✅ OK | +| durgo-avvs | ❌ WRONG | ❌ Missing | ❌ Missing | +| grilles | ❌ WRONG | ❌ Missing | ❌ Missing | +| water-pump | ❌ WRONG | ❌ Missing | ❌ Missing | +| ท่อ-hdpe | ❌ WRONG | ❌ Missing | ✅ OK | +| ท่อ-ppr-scg | ❌ WRONG | ❌ Missing | ✅ OK | +| ท่อ-ppr-thai-ppr | ❌ WRONG | ❌ Missing | ✅ OK | +| ท่อ-syler | ❌ WRONG | ❌ Missing | ❌ Missing | +| ท่อ-upvc | ❌ WRONG | ❌ Missing | ✅ OK | +| เครื่องเชื่อม-hdpe | ❌ WRONG | ✅ OK | ❌ Missing | +| วาล์ว-valve | ✅ OK | ✅ OK | ❌ Missing | +| เครื่องเชื่อม-ppr | ✅ OK | ✅ OK | ❌ Missing | -## Animation Effects to Implement +--- -### CSS Animations (global.css) -| Class | Effect | -|-------|--------| -| `.animate-fade-up` | Fade in + translate up on scroll | -| `.animate-fade-left` | Fade in + translate left on scroll | -| `.animate-fade-right` | Fade in + translate right on scroll | -| `.animate-scale-in` | Scale from 0.9 to 1 on scroll | -| `.animate-text-reveal` | Text reveals word by word/char by char | -| `.animate-gradient-shift` | Animated gradient background | -| `.glassmorphism` | Frosted glass effect | -| `.magnetic-btn` | Button follows cursor on hover | -| `.parallax` | Parallax scroll effect | -| `.tilt-card` | 3D tilt on hover | +## Implementation -### Intersection Observer Script -- Trigger animations when elements enter viewport -- Add `data-animate` attribute to elements -- Configure threshold and delay options +### Fix Order (to avoid conflicts): +1. **First:** Remove order classes from all affected pages +2. **Second:** Add missing image container classes +3. **Third:** Add missing section padding + +### Fix Code for each page: + +```javascript +// Remove order classes +.replace(/order-[12] lg:order-[12]/g, '') + +// Add image container classes +.replace('class="rounded-2xl overflow-hidden"', 'class="rounded-2xl overflow-hidden bg-white/10 p-2"') + +// Add section padding +.replace('py-16 overflow-hidden">', 'py-16 lg:py-24 overflow-hidden">') +``` --- ## Verification -1. Run `npm run dev` at http://localhost:3100 -2. Scroll through homepage - verify animations trigger at correct positions -3. Hover on product cards - verify 3D tilt effect -4. Hover on CTA buttons - verify magnetic effect -5. Resize to mobile - verify responsive animations -6. Check `prefers-reduced-motion` - verify fallback animations \ No newline at end of file +1. `npm run build` succeeds +2. Visual check on dev server (mobile AND desktop) +3. Image should be on LEFT side in ALL pages \ No newline at end of file diff --git a/src/pages/durgo-avvs.astro b/src/pages/durgo-avvs.astro index c8b1475..0d964a2 100644 --- a/src/pages/durgo-avvs.astro +++ b/src/pages/durgo-avvs.astro @@ -5,7 +5,7 @@ import BaseLayout from '@/layouts/BaseLayout.astro';
-
+
@@ -40,13 +40,13 @@ import BaseLayout from '@/layouts/BaseLayout.astro';
-
+
-
+
DURGO AVVs
-
+
วาล์วเติมอากาศ

ระบบวาล์วเติมอากาศ DURGO AVVs

diff --git a/src/pages/grilles.astro b/src/pages/grilles.astro index 60a819a..3094eca 100644 --- a/src/pages/grilles.astro +++ b/src/pages/grilles.astro @@ -5,7 +5,7 @@ import BaseLayout from '@/layouts/BaseLayout.astro';

-
+
@@ -40,13 +40,13 @@ import BaseLayout from '@/layouts/BaseLayout.astro';
-
+
-
+
กริลแอร์พลาสติก
-
+
กริลแอร์

กริลแอร์ (Grilles air)

diff --git a/src/pages/pipe-coupling.astro b/src/pages/pipe-coupling.astro index c76f315..1cd5d25 100644 --- a/src/pages/pipe-coupling.astro +++ b/src/pages/pipe-coupling.astro @@ -5,7 +5,7 @@ import BaseLayout from '@/layouts/BaseLayout.astro';

-
+
diff --git a/src/pages/water-pump.astro b/src/pages/water-pump.astro index fe0438a..c9557dd 100644 --- a/src/pages/water-pump.astro +++ b/src/pages/water-pump.astro @@ -40,13 +40,13 @@ import BaseLayout from '@/layouts/BaseLayout.astro';
-
+
-
+
ปั๊มน้ำ (Water Pump)
-
+
ปั๊มน้ำ

ปั๊มน้ำ (Water Pump)

diff --git a/src/pages/ท่อ-hdpe.astro b/src/pages/ท่อ-hdpe.astro index 69f8a76..1dc5bc2 100644 --- a/src/pages/ท่อ-hdpe.astro +++ b/src/pages/ท่อ-hdpe.astro @@ -41,7 +41,7 @@ import BaseLayout from '@/layouts/BaseLayout.astro';

-
+
ท่อ HDPE

ท่อ HDPE (High Density Polyethylene)

@@ -82,9 +82,9 @@ import BaseLayout from '@/layouts/BaseLayout.astro';

-
+
-
+
ท่อ HDPE (High Density Polyethylene)
diff --git a/src/pages/ท่อ-ppr-scg.astro b/src/pages/ท่อ-ppr-scg.astro index 4343d0b..e8a8af0 100644 --- a/src/pages/ท่อ-ppr-scg.astro +++ b/src/pages/ท่อ-ppr-scg.astro @@ -41,7 +41,7 @@ import BaseLayout from '@/layouts/BaseLayout.astro';
-
+
ท่อ PPR

ท่อ PPR ตราช้าง (SCG)

@@ -82,9 +82,9 @@ import BaseLayout from '@/layouts/BaseLayout.astro';

-
+
-
+
ท่อ PPR ตราช้าง (SCG)
diff --git a/src/pages/ท่อ-ppr-thai-ppr.astro b/src/pages/ท่อ-ppr-thai-ppr.astro index aad56fc..7e69bf1 100644 --- a/src/pages/ท่อ-ppr-thai-ppr.astro +++ b/src/pages/ท่อ-ppr-thai-ppr.astro @@ -41,7 +41,7 @@ import BaseLayout from '@/layouts/BaseLayout.astro';
-
+
ท่อ PPR

ไทยพีพีอาร์ (Thai PPR)

@@ -82,9 +82,9 @@ import BaseLayout from '@/layouts/BaseLayout.astro';

-
+
-
+
ไทยพีพีอาร์ (Thai PPR)
diff --git a/src/pages/ท่อ-syler.astro b/src/pages/ท่อ-syler.astro index 266125d..66686f6 100644 --- a/src/pages/ท่อ-syler.astro +++ b/src/pages/ท่อ-syler.astro @@ -5,7 +5,7 @@ import BaseLayout from '@/layouts/BaseLayout.astro';
-
+
@@ -40,13 +40,13 @@ import BaseLayout from '@/layouts/BaseLayout.astro';
-
+
-
+
ท่อ Syler
-
+
ท่อ Syler

ท่อ Syler | ท่อเหล็กบุพีอี

diff --git a/src/pages/ท่อ-upvc.astro b/src/pages/ท่อ-upvc.astro index 4832d21..3b703ac 100644 --- a/src/pages/ท่อ-upvc.astro +++ b/src/pages/ท่อ-upvc.astro @@ -41,7 +41,7 @@ import BaseLayout from '@/layouts/BaseLayout.astro';

-
+
ท่อ UPVC

ท่อ UPVC (Unplasticized Polyvinyl Chloride)

@@ -82,9 +82,9 @@ import BaseLayout from '@/layouts/BaseLayout.astro';

-
+
-
+
ท่อ UPVC
diff --git a/src/pages/ระบบน้ำ.astro b/src/pages/ระบบน้ำ.astro index c394294..9f9df3c 100644 --- a/src/pages/ระบบน้ำ.astro +++ b/src/pages/ระบบน้ำ.astro @@ -5,7 +5,7 @@ import BaseLayout from '@/layouts/BaseLayout.astro';
-
+
diff --git a/src/pages/วาล์ว-valve.astro b/src/pages/วาล์ว-valve.astro index 5015a69..53bbed4 100644 --- a/src/pages/วาล์ว-valve.astro +++ b/src/pages/วาล์ว-valve.astro @@ -21,7 +21,7 @@ import BaseLayout from '@/layouts/BaseLayout.astro';
-
+
diff --git a/src/pages/เครื่องเชื่อม-hdpe.astro b/src/pages/เครื่องเชื่อม-hdpe.astro index 40c8d4d..d79e0f1 100644 --- a/src/pages/เครื่องเชื่อม-hdpe.astro +++ b/src/pages/เครื่องเชื่อม-hdpe.astro @@ -21,7 +21,7 @@ import BaseLayout from '@/layouts/BaseLayout.astro';
-
+
@@ -56,13 +56,13 @@ import BaseLayout from '@/layouts/BaseLayout.astro';
-
+
เครื่องเชื่อมท่อ HDPE
-
+
เครื่องเชื่อมท่อ

เครื่องเชื่อมท่อ HDPE

diff --git a/src/pages/เครื่องเชื่อม-ppr.astro b/src/pages/เครื่องเชื่อม-ppr.astro index 7fdc7a9..7c3a914 100644 --- a/src/pages/เครื่องเชื่อม-ppr.astro +++ b/src/pages/เครื่องเชื่อม-ppr.astro @@ -9,7 +9,7 @@ import Footer from '@/components/common/Footer.astro';

-
+