Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | // Home.js - simple landing content export function Home() { return { section: { className: 'home', children: [ // Hero { div: { className: 'hero', children: [ { h1: { className: 'title', text: 'Coherent.js' } }, { p: { className: 'lead', text: 'Fast SSR and hydration with plain JS objects. Minimal API. Maximum clarity.' } }, { div: { className: 'badges', children: [ { img: { src: 'https://img.shields.io/endpoint?url=https://coherent.js.org/coverage/badge.json&label=coverage', alt: 'Coverage', className: 'badge' } }, { img: { src: 'https://img.shields.io/npm/v/@coherentjs/core', alt: 'npm version', className: 'badge' } }, { img: { src: 'https://img.shields.io/github/actions/workflow/status/Tomdrouv1/coherent.js/ci.yml?branch=main', alt: 'CI Status', className: 'badge' } } ] } }, { div: { className: 'cta', children: [ { a: { className: 'button primary', href: 'docs', text: 'Get Started' } }, { a: { className: 'button', href: 'examples', text: 'Examples' } }, { a: { className: 'button', href: 'performance', text: 'Performance' } } ] } } ] } }, // Install { section: { className: 'install', children: [ { h3: { text: 'Install' } }, { pre: { className: 'code-block', children: [ { code: { text: 'pnpm add @coherentjs/core' } } ] } } ] } }, // Key features { section: { className: 'features', children: [ { h3: { text: 'Why Coherent.js?' } }, { ul: { className: 'features-grid', children: [ { li: { children: [ { strong: { text: 'Object-based components' } }, { p: { text: 'Author UI as plain JS objects. Zero JSX required.' } } ] } }, { li: { children: [ { strong: { text: 'SSR-first, hydrable' } }, { p: { text: 'Render on the server and hydrate on the client when needed.' } } ] } }, { li: { children: [ { strong: { text: 'Performance' } }, { p: { text: 'Outperforms Express and raw Node in API benchmarks.' } } ] } }, { li: { children: [ { strong: { text: 'Tiny surface area' } }, { p: { text: 'Small API, easy mental model, fast to adopt.' } } ] } } ] } } ] } }, // Quick links { section: { className: 'quick-links', children: [ { h3: { text: 'Quick Links' } }, { ul: { className: 'links', children: [ { li: { children: [ { a: { href: 'docs/getting-started/installation', text: 'Getting Started' } } ] } }, { li: { children: [ { a: { href: 'docs/api-reference', text: 'API Reference' } } ] } }, { li: { children: [ { a: { href: 'docs/framework-integrations', text: 'Framework Integrations' } } ] } }, { li: { children: [ { a: { href: 'changelog', text: 'Changelog' } } ] } } ] } } ] } } ] } }; } |