Skip to content

refactor(website): extract landing page into Svelte 5 components #169

Closed

Description

@ajianaz

Goal

Pecah monolith +page.svelte (558 lines) jadi reusable Svelte 5 components di src/lib/components/landing/.

Current State

+page.svelte (558 lines)
├── S1 — Hero (lines 91-157)
├── S2 — KPI Stats (lines 160-178)
├── S3 — Terminal Demo (lines 181-207)
├── S4 — How It Works (lines 210-258)
├── S5 — Features Grid (lines 262-360)
├── S6 — Comparison Table (lines 364-444)
├── S7 — Quick Start + CTA + Footer (lines 448-558)
└── Script block with IntersectionObserver logic (lines 1-82)

Target Structure

src/lib/components/landing/
├── Hero.svelte          — Badge, headline, subtitle, install terminal, CTAs
├── TerminalDemo.svelte  — Live typing animation demo
├── Features.svelte      — 9-card feature grid
├── HowItWorks.svelte    — 3-step flow with connectors
├── ComparisonTable.svelte — cora vs competitors
├── QuickStart.svelte    — 4-step timeline + CTA
└── Footer.svelte        — Footer links

src/lib/components/shared/
└── Terminal.svelte      — Reusable terminal component (used in Hero, QuickStart, TerminalDemo)

Acceptance Criteria

  • +page.svelte reduced to ~30-50 lines (just imports + layout)
  • Setiap section jadi component terpisah
  • Terminal component reusable (Hero install cmd, QuickStart steps, Demo)
  • Svelte 5 runes ($state, $derived, $props) used properly
  • Props typed dengan TypeScript
  • Build passes (npm run build)
  • No visual regression — tampilan identik sebelum/sesudah

Parent Issue

Part of #160

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions