{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "blog-grid-01",
  "title": "Blog — Post Grid",
  "author": "SAASTRO <https://saastro.io>",
  "description": "Responsive grid of blog post cards with image, title, excerpt, and metadata. Zero-JS Astro component.",
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/default/blocks/blog-grid-01.astro",
      "content": "---\n/**\n * blog-grid-01 — Grid responsive de tarjetas de post con imagen, título,\n * extracto y metadatos. Bloque Astro puro: cero JS, cero dependencias.\n */\ninterface Post {\n  title: string;\n  excerpt: string;\n  date: string;\n  category?: string;\n  imageUrl?: string;\n  href: string;\n}\ninterface Props {\n  title?: string;\n  description?: string;\n  posts: Post[];\n  class?: string;\n}\nconst { title, description, posts, class: className } = Astro.props;\n\nconst badgeCls =\n  'inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent bg-secondary px-2 py-0.5 text-xs font-medium whitespace-nowrap text-secondary-foreground';\n---\n\n<section class:list={['w-full px-6 py-24 md:py-32', className]}>\n  <div class=\"mx-auto max-w-6xl\">\n    {(title || description) && (\n      <div class=\"mx-auto mb-16 max-w-2xl text-center\">\n        {title && <h2 class=\"text-3xl font-bold tracking-tight sm:text-4xl\">{title}</h2>}\n        {description && <p class=\"mt-4 text-lg text-muted-foreground\">{description}</p>}\n      </div>\n    )}\n    <div class=\"grid gap-6 sm:grid-cols-2 lg:grid-cols-3\">\n      {posts.map((post) => (\n        <a href={post.href} class=\"group\">\n          <div class=\"flex h-full flex-col gap-6 overflow-hidden rounded-xl border bg-card py-6 text-card-foreground shadow-sm transition-shadow group-hover:shadow-lg\">\n            <div class=\"-mt-6 aspect-video overflow-hidden bg-muted\">\n              {post.imageUrl ? (\n                <img\n                  src={post.imageUrl}\n                  alt={post.title}\n                  class=\"h-full w-full object-cover transition-transform group-hover:scale-105\"\n                />\n              ) : (\n                <div class=\"flex h-full w-full items-center justify-center bg-gradient-to-br from-muted to-muted-foreground/5\">\n                  <span class=\"text-xl text-muted-foreground/30\">Blog</span>\n                </div>\n              )}\n            </div>\n            <div class=\"flex flex-col gap-1.5 px-6\">\n              {post.category && <span class={badgeCls}>{post.category}</span>}\n              <h3 class=\"line-clamp-2 text-lg leading-none font-semibold group-hover:text-primary\">\n                {post.title}\n              </h3>\n            </div>\n            <div class=\"px-6\">\n              <p class=\"line-clamp-2 text-sm text-muted-foreground\">{post.excerpt}</p>\n              <p class=\"mt-4 text-xs text-muted-foreground\">{post.date}</p>\n            </div>\n          </div>\n        </a>\n      ))}\n    </div>\n  </div>\n</section>\n",
      "type": "registry:component",
      "target": "@components/blocks/blog-grid-01.astro"
    }
  ],
  "meta": {
    "group": "Content",
    "iframeHeight": "940px"
  },
  "docs": "Astro component — zero JS, no React required. Default import: `import BlogGrid01 from '@/components/blocks/blog-grid-01.astro'`. Props: title?, description?, posts [{title, excerpt, date, category?, imageUrl?, href}], class?.",
  "categories": [
    "blog",
    "content"
  ],
  "type": "registry:block"
}