# Content Showcase Stack ## Overview The content showcase stack is optimized for content-focused applications including marketing sites, portfolios, blogs, documentation sites, and landing pages where typography and reading experience are paramount. ## When to Use - Marketing websites and landing pages - Portfolio sites - Blog platforms - Documentation sites - Content-heavy applications - Informational websites ## Extends Default Stack This stack includes ALL packages from `default-webapp.md` PLUS the following additive packages. ## Additional Packages ### Content Processing ```bash pnpm add marked # Markdown to HTML pnpm add dompurify # Sanitize HTML (security) ``` ### Additional shadcn Components ```bash # Content components pnpm dlx shadcn@latest add separator pnpm dlx shadcn@latest add breadcrumb pnpm dlx shadcn@latest add navigation-menu pnpm dlx shadcn@latest add accordion ``` ## Design Guidance ### Typography-First Design Content showcases live or die by their typography. The reading experience must be exceptional. **Type Scale** (larger than default): ```css /* Add to index.css */ h1: 3.5rem (56px), line-height: 1.1, font-weight: 700 h2: 2.5rem (40px), line-height: 1.2, font-weight: 600 h3: 2rem (32px), line-height: 1.3, font-weight: 600 h4: 1.5rem (24px), line-height: 1.4, font-weight: 600 body: 1.125rem (18px), line-height: 1.7, font-weight: 400 lead: 1.25rem (20px), line-height: 1.6, font-weight: 400 ``` **Line Length**: Optimal reading is 60-75 characters per line ```css .prose { max-width: 65ch; } ``` **Vertical Rhythm**: Consistent spacing between elements ```css /* Spacing scale */ h1: mb-6 h2: mt-12 mb-4 h3: mt-8 mb-3 p: mb-4 ``` ### Distinctive Font Pairings **Recommended for Content**: **Option 1: Editorial** - Headings: **Playfair Display** (serif, elegant) - Body: **Source Sans 3** (sans-serif, readable) - Use: Magazine-style, luxury brands, editorial content **Option 2: Modern Technical** - Headings: **Space Grotesk** (geometric, modern) - Body: **IBM Plex Sans** (clean, professional) - Use: Tech companies, startups, modern brands **Option 3: Classic** - Headings: **Newsreader** (serif, traditional) - Body: **Source Sans 3** (sans-serif) - Use: Publications, journalism, classic brands Update `index.html`: ```html ``` Update `index.css`: ```css body { font-family: 'Source Sans 3', sans-serif; } h1, h2, h3, h4, h5, h6 { font-family: 'Playfair Display', serif; } ``` ### Color for Content **Muted, Sophisticated Palette**: ```css :root { /* Warm, readable background */ --background: oklch(0.98 0.005 85); --foreground: oklch(0.22 0.01 75); /* Subtle, elegant primary */ --primary: oklch(0.40 0.08 240); --primary-foreground: oklch(0.99 0 0); /* Warm accent for links */ --accent: oklch(0.55 0.12 35); --accent-foreground: oklch(0.22 0.01 75); /* Larger radius for softer feel */ --radius: 0.75rem; } ``` ### Whitespace & Breathing Room Content needs generous spacing: - **Section padding**: py-16 to py-24 (mobile), py-24 to py-32 (desktop) - **Content width**: max-w-4xl or max-w-5xl centered - **Grid gaps**: gap-8 to gap-12 - **Margins**: Generous margins around content blocks ## Layout Patterns ### Hero Section ```tsx export function Hero() { return (

Build Beautiful Web Experiences

A toolkit for creating applications with design and performance in mind.

); } ``` ### Content Grid (Features, Services, etc.) ```tsx import { Card, CardContent } from '@/components/ui/card'; const features = [ { title: 'Fast Performance', description: 'Built with modern tools for lightning-fast load times.', icon: Zap }, // ... ]; export function Features() { return (

Why Choose Us

Everything you need to build exceptional web applications

{features.map((feature) => (

{feature.title}

{feature.description}

))}
); } ``` ### Long-Form Content (Blog Post, Article) ```tsx import { Separator } from '@/components/ui/separator'; export function Article({ content }: { content: string }) { return (
{/* Article header */}

Article Title

5 min read
{/* Article content */}
); } ``` ## Markdown Processing ### Convert Markdown to HTML ```tsx import { marked } from 'marked'; import DOMPurify from 'dompurify'; // Configure marked for better output marked.setOptions({ gfm: true, // GitHub Flavored Markdown breaks: true, // Convert \n to
}); export function renderMarkdown(markdown: string): string { const html = marked(markdown); return DOMPurify.sanitize(html); } ``` ### Markdown Component ```tsx interface MarkdownProps { content: string; } export function Markdown({ content }: MarkdownProps) { const html = renderMarkdown(content); return (
); } ``` ## Navigation Patterns ### Header Navigation ```tsx import { NavigationMenu, NavigationMenuItem, NavigationMenuLink, NavigationMenuList } from '@/components/ui/navigation-menu'; import { Button } from '@/components/ui/button'; export function Header() { return (
Brand Features Pricing Blog
); } ``` ### Footer ```tsx export function Footer() { return ( ); } ``` ## SEO Optimization ### Meta Tags (in route components) ```tsx // src/routes/index.tsx import { createFileRoute } from '@tanstack/react-router'; import { Helmet } from 'react-helmet-async'; // Install if needed export const Route = createFileRoute('/')({ component: HomePage, }); function HomePage() { return ( <> Your App - Tagline {/* Page content */} ); } ``` ## Performance for Content Sites ### Image Optimization ```tsx // Use WebP with fallbacks Description ``` ### Font Loading Strategy Already using `display=swap` for optimal font loading. Consider: ```html ``` ### Code Splitting Content pages should load instantly: ```tsx // Lazy load heavy components const HeavyComponent = lazy(() => import('./HeavyComponent')); }> ``` ## Accessibility - Use semantic HTML (`
`, `
`, `