"use client"; import { PageLayout } from '../layout/page-layout'; export interface DetailPageSkeletonProps { metadataColumns?: number; // Number of metadata grid columns (default 4) showImageGallery?: boolean; // Show horizontal image gallery (default true) /** Render only the skeleton blocks, WITHOUT the self-contained page wrapper * — the caller supplies its own (e.g. ``) so the loading state * matches the loaded page's width, padding, and min-height. Default false * (self-contained `` at the hub article width). */ bare?: boolean; } export function DetailPageSkeleton({ metadataColumns = 4, showImageGallery = true, bare = false }: DetailPageSkeletonProps = {}) { const content = (
{/* Title Block */}
{/* Category Tags Skeleton */}
{/* Metadata Grid Skeleton */}
{Array.from({ length: metadataColumns }).map((_, i) => (
))}
{/* Image Gallery Skeleton */} {showImageGallery && (
{[1, 2, 3, 4, 5].map((i) => (
))}
)} {/* Featured Image Skeleton (for case studies) */} {!showImageGallery && (
)} {/* Content Sections Skeleton */} {[1, 2, 3].map((section) => (
))}
); if (bare) return content; return ( {content} ); }