diff --git a/apps/web/src/app/create/worksheets/components/PagePlaceholder.tsx b/apps/web/src/app/create/worksheets/components/PagePlaceholder.tsx index 902553d4..e5b732f3 100644 --- a/apps/web/src/app/create/worksheets/components/PagePlaceholder.tsx +++ b/apps/web/src/app/create/worksheets/components/PagePlaceholder.tsx @@ -6,60 +6,229 @@ import { useTheme } from '@/contexts/ThemeContext' interface PagePlaceholderProps { pageNumber: number orientation?: 'portrait' | 'landscape' + rows?: number + cols?: number + loading?: boolean } -export function PagePlaceholder({ pageNumber, orientation = 'portrait' }: PagePlaceholderProps) { +export function PagePlaceholder({ + pageNumber, + orientation = 'portrait', + rows = 5, + cols = 4, + loading = false, +}: PagePlaceholderProps) { const { resolvedTheme } = useTheme() const isDark = resolvedTheme === 'dark' - // Match the aspect ratio of actual worksheet pages - // Portrait: 8.5" × 11" (aspect ratio 1:1.294) - // Landscape: 11" × 8.5" (aspect ratio 1.294:1) - const aspectRatio = orientation === 'portrait' ? 11 / 8.5 : 8.5 / 11 + // Calculate exact pixel dimensions based on page size + // Portrait: 8.5" × 11" at 96 DPI = 816px × 1056px + // Landscape: 11" × 8.5" at 96 DPI = 1056px × 816px + // Scale down to fit typical viewport (maxWidth: 100%) + const width = orientation === 'portrait' ? 816 : 1056 + const height = orientation === 'portrait' ? 1056 : 816 return (
- Loading page {index + 1}... -
-