{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Projects as cards, a compact grid, captions over pictures, a bento or a list beside a collage.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/organisms/project-grid.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// ProjectGridProps are the props of ProjectGrid; the values are the JSON shapes of the TypeScript props.\ntype ProjectGridProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tLead any `json:\"lead\"`\n\tProjects any `json:\"projects\"`\n\tEmpty any `json:\"empty\"`\n\tLabels any `json:\"labels\"`\n\tLayout any `json:\"layout\"`\n\tTone any `json:\"tone\"`\n\tDensity any `json:\"density\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// Projects of a studio or a person: cards with tags and links, a compact grid, tiles with the caption over the picture, a bento with one big project, or a list beside a collage. Axes: layout (cards, compact, overlay, bento, list), tone, density.\ntempl ProjectGrid(p ProjectGridProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vLead := uiutils.Def(p.Lead, \"\") }}\n\t{{ vProjects := p.Projects }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vLabels := p.Labels }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"cards\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vDensity := uiutils.Def(p.Density, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Tone: vTone, Density: vDensity, Layout: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"list\")), \"split\", \"stack\"), Media: map[string]any{\"show\": uiutils.Eq(vLayout, \"list\"), \"align\": \"start\"}, LandmarkLabel: vLandmarkLabel, Aside: projectGridFill1(p, vTitle)}) {\n\t\tif uiutils.Eq(uiutils.Len(vProjects), float64(0)) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"folder-open\", Title: vEmpty})\n\t\t} else if uiutils.Eq(vLayout, \"list\") {\n\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", Align: \"stretch\", BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\tfor _, vP := range uiutils.L(vProjects) {\n\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"start\", BoxProps: box.BoxProps{Class: \"border-b border-border pb-4\", Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vP, \"title\"), Src: uiutils.Get(vP, \"image\"), Ratio: \"1/1\", Class: uiutils.Cnv(\"size-16 shrink-0\")})\n\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"2\", Align: \"stretch\", BoxProps: box.BoxProps{Class: \"flex-1\"}}) {\n\t\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Justify: \"between\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", Weight: \"semibold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vP, \"title\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"xs\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vP, \"year\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vP, \"summary\")) }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t@ProjectTiles(ProjectTilesProps{Projects: vProjects, Labels: vLabels, Layout: vLayout})\n\t\t}\n\t}\n}\n\ntempl projectGridFill1(p ProjectGridProps, vTitle any) {\n\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"grid grid-cols-2 gap-4\", Attrs: uiutils.Attrs(\"data-slot\", \"collage\")}}) {\n\t\t@MediaFrame(MediaFrameProps{Alt: vTitle, Ratio: \"3/4\"})\n\t\t@MediaFrame(MediaFrameProps{Alt: vTitle, Ratio: \"3/4\", Class: uiutils.Cnv(\"mt-8\")})\n\t}\n}\n",
      "path": "blocks/project-grid.templ",
      "target": "blocks/project-grid.templ"
    }
  ],
  "meta": {
    "category": "marketing",
    "group": "company",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "project-grid",
  "registryDependencies": [
    "box",
    "empty-state",
    "group",
    "kit-box",
    "kit-text",
    "media-frame",
    "project-tiles",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Project Grid",
  "type": "registry:block"
}
