Skip to content

Phase 6 - Page Sections & Composition

  • Track: Lite (MVP) / Full (Showcase)
  • Duration: 2-3 days
  • Dependencies: Phase 0-5 completed
  • Deliverables: Composed page sections, hero components, feature grids, testimonials
  • Component library built (Phase 5)
  • Design tokens integrated
  • Layout system functional
  • Content schemas defined
StepTaskMVPShowcaseNotes
6.01Build Hero sectionText-focused → Animated hero
6.02Create Features gridStatic 3-column → Enhanced animations
6.03Add CTA sectionSimple banner → Advanced styling
6.04Build Footer sectionLinks and copyright
6.05Create About sectionText and image → Enhanced layout
6.06Add Contact sectionForm or contact info → Advanced form
6.07Build Blog listingCard-based layout → Enhanced cards
6.08Create Project gridPortfolio showcase → Advanced grid
6.09Create TestimonialsCarousel or grid
6.10Build Stats sectionAnimated numbers
6.11Add TimelineProject/career history
6.12Create FAQ sectionAccordion pattern
6.13Build NewsletterForm with validation
6.14Add Team sectionMember cards
6.15Create Pricing tableComparison layout
6.16Build Process sectionStep-by-step visual

Why this change? Earlier versions embedded large inline scripts for each section. We now extract the observer/animation logic into a tiny Preact island (StatsObserverIsland.tsx) imported once. Each section renders minimal HTML on the server so users without JavaScript still see meaningful content.

Implementation tips

  1. Render placeholders server-side (numbers without animation).
  2. In the island, hydrate only when the section becomes visible (client:visible).
  3. Share a single IntersectionObserver utility.
  1. Over-nesting Sections: Don’t wrap sections in sections unnecessarily

    • Solution: Use semantic HTML, sections for major content areas only
  2. Missing Semantic Structure: Using divs instead of section/article

    • Solution: Use appropriate HTML5 elements
  3. Poor Mobile Experience: Desktop-only section designs

    • Solution: Design mobile-first, test at all breakpoints
  4. Inaccessible Animations: Motion without considering preferences

    • Solution: Always respect prefers-reduced-motion
  5. Heavy Section Components: Loading too much JavaScript

    • Solution: Keep sections static, use islands sparingly
CriteriaMVPShowcaseDescription
Hero section with text focusClear messaging → Animated patterns
Features grid (static)Basic grid → Advanced layouts
Simple CTA sectionBasic styling → Enhanced design
About sectionText and image → Enhanced layout
Blog/Project listingsCard-based → Advanced grid
All sections accessibleWCAG AA compliance
Mobile responsiveAll breakpoints tested
Testimonials sectionCarousel or grid layout
Stats with animationsAnimated number counters
Smooth scroll interactionsCSS scroll-behavior
Section transitionsView transitions

If section implementation causes issues:

  1. Performance Regression:

    • Remove animations/islands
    • Simplify to static HTML
    • Check bundle size impact
  2. Layout Issues:

    • Revert to basic grid
    • Remove complex positioning
    • Test on real devices
  3. Accessibility Problems:

    • Simplify interactions
    • Add missing ARIA labels
    • Test with screen readers
  • src/components/sections/* - All section components
  • src/pages/index.astro - Section composition
  • Section-specific assets and content
  • “Create a testimonials section with carousel”
  • “Build an accessible FAQ accordion section”
  • “Design a hero section with animated background”
  • “Compose sections for landing page”
  • Brand guidelines for styling
  • Content requirements per section
  • Performance constraints
  • Animation preferences