Full visual rework to a single locked design system (design.md, Lumen Night Foundry): dark violet canvas, molten-brass accent, Instrument Serif + Geist + JetBrains Mono, hairline cards, zero gradients and zero glassmorphism. - Landing: marquee hero with real vertical demo clip in an instrument bezel, meter strip, smart-crop before/after section, cloud-first copy (start free trial primary, self-host demoted to secondary), text density cut, SEO surfaces preserved (single h1, ids, FAQs, comparison table intact) - App: workbench restyle — sidebar with mono ordinals, unified header, settings/ai-agent/dashboard views on shared tokens; per-feature gradient identities retired - Shared UI: new Modal, SegmentedControl and StepIndicator replace 8+ duplicated modal shells and 2 wizard steppers - New pricing paywall page (#/pricing): demo proof strip, honest trust signals, billing FAQ - Routing: app logo links back to landing via #landing without resetting the skip-landing preference - Responsive: audited and fixed at 320/375/414/768px (no horizontal scroll, tables scroll in-container, single-line CTAs) - ScheduleWeekModal translated to English; ProcessingAnimation comment noise removed Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
60 lines
2 KiB
JavaScript
60 lines
2 KiB
JavaScript
import { X } from 'lucide-react';
|
|
|
|
/**
|
|
* The single modal shell for the app (design.md).
|
|
* Plain dark overlay (no backdrop-blur), hairline paper2 panel.
|
|
*
|
|
* Props:
|
|
* - isOpen / onClose
|
|
* - title (string, rendered lowercase serif) — optional
|
|
* - eyebrow (string, mono UPPERCASE micro label above title) — optional
|
|
* - size: 'sm' | 'md' | 'lg' | 'xl' (max width; default 'md')
|
|
* - children: body content
|
|
* - footer: optional node pinned under the body
|
|
* - hideClose: hide the X button
|
|
*/
|
|
const SIZES = {
|
|
sm: 'max-w-sm',
|
|
md: 'max-w-md',
|
|
lg: 'max-w-2xl',
|
|
xl: 'max-w-5xl',
|
|
};
|
|
|
|
export default function Modal({ isOpen, onClose, title, eyebrow, size = 'md', children, footer, hideClose = false }) {
|
|
if (!isOpen) return null;
|
|
|
|
return (
|
|
<div
|
|
className="fixed inset-0 z-[100] flex items-center justify-center bg-black/70 p-4 animate-fade"
|
|
onMouseDown={(e) => { if (e.target === e.currentTarget && onClose) onClose(); }}
|
|
role="dialog"
|
|
aria-modal="true"
|
|
>
|
|
<div className={`card relative w-full ${SIZES[size] || SIZES.md} max-h-[90vh] flex flex-col`}>
|
|
{!hideClose && onClose && (
|
|
<button
|
|
onClick={onClose}
|
|
aria-label="close"
|
|
className="absolute top-4 right-4 z-10 p-1.5 rounded-full text-muted hover:text-ink hover:bg-paper3 transition-colors"
|
|
>
|
|
<X size={16} />
|
|
</button>
|
|
)}
|
|
{(title || eyebrow) && (
|
|
<div className="px-4 sm:px-6 pt-6 pb-4 border-b border-rule shrink-0">
|
|
{eyebrow && <p className="eyebrow mb-1.5">{eyebrow}</p>}
|
|
{title && <h2 className="font-display lowercase text-2xl text-ink leading-tight break-words pr-8">{title}</h2>}
|
|
</div>
|
|
)}
|
|
<div className="px-4 sm:px-6 py-5 overflow-y-auto custom-scrollbar grow">
|
|
{children}
|
|
</div>
|
|
{footer && (
|
|
<div className="px-4 sm:px-6 py-4 border-t border-rule shrink-0">
|
|
{footer}
|
|
</div>
|
|
)}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|