* refactor: adopt shared Input/Textarea components across 15 files Replace 42 raw <input>/<textarea> elements with <Input>/<Textarea> from components/ui/. Consistent focus states, error handling, and styling across all form fields. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor: replace hardcoded rgba/hex colors with Tailwind tokens - rgba(255,255,255,0.xx) → bg-white/[0.xx], border-white/[0.xx] - rgba(6,182,212,0.3) → border-primary/30 (focus states) - #0a0a0a → bg-background - Inline style hex colors → var(--color-primary), var(--color-brand-gradient-to) - 28 files updated, zero hardcoded rgba() patterns remaining Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add PageMeta to 16 pages for SEO and proper browser tab titles Public pages (Login, Register, Forgot/Reset Password, Verify Email, Survey Thank You) get descriptions for SEO. Authenticated pages (Dashboard, Flow Library, My Flows, Session History, AI Assistant, Account Settings, Step Library, My Shares, Feedback, Guides) get proper tab titles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add page transitions and staggered list animations - ViewTransitionOutlet: wraps Outlet with fade-in-up animation keyed to route path. Sidebar/topbar stay still, only content area animates. - StaggerList: reusable component that cascades children with incremental delay (50ms default). Pure CSS via @utility stagger-item. - Applied stagger to TreeGridView, MyTreesPage cards, SessionHistoryPage. - New stagger-fade-in keyframe in @theme block. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: ViewTransitionOutlet needs h-full for React Flow canvas The wrapper div broke the height chain needed by TreeEditorPage's h-full layout, causing React Flow canvas to collapse to zero height. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: main-content flex layout for tree editor + scrollable pages Main content area is now flex-col so the ViewTransitionOutlet wrapper gets an explicit computed height via flex-1 min-h-0. This makes h-full resolve correctly in the tree editor (React Flow canvas) while still allowing overflow-y-auto scrolling for normal pages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: resolve ESLint errors in Button and Skeleton components - Button: suppress react-refresh/only-export-components for buttonVariants re-export - Skeleton: replace empty interface with type alias, replace Math.random() with static widths array Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat: add PageMeta, animation classes, and layout fixes to remaining pages Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
79 lines
3.0 KiB
TypeScript
79 lines
3.0 KiB
TypeScript
import { useParams, Link } from 'react-router-dom'
|
|
import { ChevronRight, ArrowLeft } from 'lucide-react'
|
|
import { guides } from '@/data/guides'
|
|
import { GuideSection } from '@/components/guides/GuideSection'
|
|
|
|
export default function GuideDetailPage() {
|
|
const { slug } = useParams<{ slug: string }>()
|
|
const guide = guides.find(g => g.slug === slug)
|
|
|
|
if (!guide) {
|
|
return (
|
|
<div className="flex flex-col items-center justify-center h-full text-center p-6 overflow-y-auto">
|
|
<h2 className="text-lg font-heading font-semibold text-foreground mb-2">Guide Not Found</h2>
|
|
<p className="text-sm text-muted-foreground mb-4">The guide you're looking for doesn't exist.</p>
|
|
<Link
|
|
to="/guides"
|
|
className="bg-gradient-brand text-brand-dark font-semibold text-sm rounded-[10px] px-5 py-2 hover:opacity-90 active:scale-[0.97] transition-all"
|
|
>
|
|
Back to Guides
|
|
</Link>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
const Icon = guide.icon
|
|
|
|
return (
|
|
<div className="overflow-y-auto h-full p-6 max-w-3xl mx-auto">
|
|
{/* Breadcrumb */}
|
|
<nav className="flex items-center gap-1.5 text-xs text-muted-foreground mb-6">
|
|
<Link to="/guides" className="hover:text-primary transition-colors">
|
|
User Guides
|
|
</Link>
|
|
<ChevronRight size={12} />
|
|
<span className="text-foreground">{guide.title}</span>
|
|
</nav>
|
|
|
|
{/* Header */}
|
|
<div className="glass-card-static rounded-2xl p-6 mb-6">
|
|
<div className="flex items-center gap-3 mb-3">
|
|
<div className="flex h-10 w-10 items-center justify-center rounded-xl bg-primary/10">
|
|
<Icon size={20} className="text-primary" />
|
|
</div>
|
|
<div>
|
|
<h1 className="text-xl font-heading font-bold text-foreground">{guide.title}</h1>
|
|
<p className="text-sm text-muted-foreground">{guide.summary}</p>
|
|
</div>
|
|
</div>
|
|
<div className="flex items-center gap-4 mt-4 pt-4 border-t" style={{ borderColor: 'var(--glass-border)' }}>
|
|
<span className="font-label text-[0.625rem] uppercase tracking-widest text-muted-foreground">
|
|
{guide.sections.length} {guide.sections.length === 1 ? 'section' : 'sections'}
|
|
</span>
|
|
<span className="font-label text-[0.625rem] uppercase tracking-widest text-muted-foreground">
|
|
{guide.sections.reduce((acc, s) => acc + s.steps.length, 0)} steps
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
{/* Sections */}
|
|
<div className="glass-card-static rounded-2xl p-6">
|
|
{guide.sections.map((section, i) => (
|
|
<GuideSection key={i} section={section} index={i} />
|
|
))}
|
|
</div>
|
|
|
|
{/* Back link */}
|
|
<div className="mt-6">
|
|
<Link
|
|
to="/guides"
|
|
className="inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-primary transition-colors"
|
|
>
|
|
<ArrowLeft size={14} />
|
|
Back to all guides
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|