{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The projects of ProjectGrid as tiles: cards (picture, featured badge, category and year, title, summary, tags, two links), compact cards in four columns, captions over the pictures, or a bento where the first project takes a big tile.",
  "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-tiles.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/icons\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// ProjectTilesProps are the props of ProjectTiles; the values are the JSON shapes of the TypeScript props.\ntype ProjectTilesProps struct {\n\tProjects any `json:\"projects\"`\n\tLabels any `json:\"labels\"`\n\tLayout any `json:\"layout\"`\n}\n\n// The projects of ProjectGrid as tiles: cards (picture, featured badge, category and year, title, summary, tags, two links), compact cards in four columns, captions over the pictures, or a bento where the first project takes a big tile.\ntempl ProjectTiles(p ProjectTilesProps) {\n\t{{ vProjects := p.Projects }}\n\t{{ vLabels := p.Labels }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"cards\") }}\n\t{{ vOver := any(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"overlay\")), true, uiutils.Eq(vLayout, \"bento\"))) }}\n\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"compact\")), \"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4\", \"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\")), Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\tfor vI, vP := range uiutils.L(vProjects) {\n\t\t\t@ArticleBlock(ArticleBlockProps{Class: uiutils.Cnv(uiutils.Cnv(\"flex flex-col gap-4\", uiutils.Cond(uiutils.T(vOver), \"relative\", \"rounded bg-card inset-ring inset-ring-border p-4\"), uiutils.Cond(uiutils.T(uiutils.And(uiutils.Eq(vLayout, \"bento\"), uiutils.Eq(float64(vI), float64(0)))), \"sm:col-span-2 lg:row-span-2\", \"\"))), Testid: \"item\"}) {\n\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(vOver), \"h-full\", \"relative\"))}}) {\n\t\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vP, \"title\"), Src: uiutils.Get(vP, \"image\"), Ratio: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"compact\")), \"1/1\", uiutils.Cond(uiutils.T(vOver), \"3/4\", \"4/3\")), Class: uiutils.Cnv(uiutils.Cond(uiutils.T(vOver), \"h-full\", \"\"))})\n\t\t\t\t\tif uiutils.T(uiutils.And(uiutils.Get(vP, \"featured\"), !uiutils.Eq(vLayout, \"compact\"))) {\n\t\t\t\t\t\t@compose.Badge(compose.BadgeProps{Variant: \"default\", Size: \"default\", TextProps: text.TextProps{Class: \"absolute left-4 top-4\"}}) {\n\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"featured\")) }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"2\", Align: \"stretch\", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(vOver), \"absolute right-4 bottom-4 left-4 rounded bg-background p-4\", \"\"))}}) {\n\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{ uiutils.Text(uiutils.Tpl(\"{0}, {1}\", uiutils.Get(vP, \"category\"), uiutils.Get(vP, \"year\"))) }\n\t\t\t\t\t}\n\t\t\t\t\t@compose.Title(compose.TitleProps{As: \"3\", Size: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"compact\")), \"sm\", \"lg\")), Weight: \"semibold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vP, \"title\")) }\n\t\t\t\t\t}\n\t\t\t\t\tif !uiutils.Eq(vLayout, \"compact\") {\n\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{ uiutils.Text(uiutils.Get(vP, \"summary\")) }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif uiutils.Eq(vLayout, \"cards\") {\n\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"2\", BoxProps: box.BoxProps{Class: \"flex-wrap\"}}) {\n\t\t\t\t\t\t\tfor _, vK := range uiutils.L(uiutils.Get(vP, \"tags\")) {\n\t\t\t\t\t\t\t\t@compose.Badge(compose.BadgeProps{Variant: \"secondary\", Size: \"sm\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(vK) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", BoxProps: box.BoxProps{Class: \"pt-2\"}}) {\n\t\t\t\t\t\t\t@MenuEntry(MenuEntryProps{Href: uiutils.Get(vP, \"href\"), Class: uiutils.Cnv(\"inline-flex items-center gap-2 text-sm font-medium\")}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"case\")) }\n\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"arrow-right\", Size: 16})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@MenuEntry(MenuEntryProps{Href: uiutils.Get(vP, \"href\"), Class: uiutils.Cnv(\"inline-flex items-center gap-2 text-sm font-medium\")}) {\n\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"view\")) }\n\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"external-link\", Size: 16})\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}\n\t}\n}\n",
      "path": "blocks/project-tiles.templ",
      "target": "blocks/project-tiles.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "project-tiles",
  "registryDependencies": [
    "article-block",
    "badge",
    "box",
    "group",
    "kit-box",
    "kit-text",
    "lucide-icon",
    "media-frame",
    "menu-entry",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Project Tiles",
  "type": "registry:component"
}
