{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Category, title, excerpt, author line and a wide cover.",
  "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/post-header.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// PostHeaderProps are the props of PostHeader; the values are the JSON shapes of the TypeScript props.\ntype PostHeaderProps struct {\n\tId any `json:\"id\"`\n\tPost any `json:\"post\"`\n\tLabels any `json:\"labels\"`\n\tLevel any `json:\"level\"`\n\tLayout any `json:\"layout\"`\n\tCover any `json:\"cover\"`\n\tMeta any `json:\"meta\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// The top of a post page: category, title, excerpt, the author line and an optional wide cover. Axes: layout (start, center), cover (show, hide), meta (full, short), tone.\ntempl PostHeader(p PostHeaderProps) {\n\t{{ vId := p.Id }}\n\t{{ vPost := p.Post }}\n\t{{ vLabels := p.Labels }}\n\t{{ vLevel := uiutils.Def(p.Level, float64(1)) }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"start\") }}\n\t{{ vCover := uiutils.Def(p.Cover, \"show\") }}\n\t{{ vMeta := uiutils.Def(p.Meta, \"full\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\tif uiutils.T(vPost) {\n\t\t@SectionFrame(SectionFrameProps{Id: vId, Title: uiutils.Get(vPost, \"title\"), Lead: uiutils.Get(vPost, \"excerpt\"), Heading: map[string]any{\"level\": vLevel}, Align: vLayout, Tone: vTone, Media: map[string]any{\"show\": uiutils.Eq(vCover, \"show\")}, LandmarkLabel: vLandmarkLabel, Aside: postHeaderFill1(p, vPost)}) {\n\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"center\", Justify: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"center\")), \"center\", \"start\")), BoxProps: box.BoxProps{Class: \"flex-wrap\", Attrs: uiutils.Attrs(\"data-slot\", \"post-meta\")}}) {\n\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vPost, \"author\"), Ratio: \"1/1\", Class: uiutils.Cnv(\"size-10 shrink-0 rounded-full\")})\n\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", Weight: \"semibold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t{ uiutils.Text(uiutils.Get(vPost, \"author\")) }\n\t\t\t\t}\n\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t{ uiutils.Text(uiutils.Get(vPost, \"date\")) }\n\t\t\t\t}\n\t\t\t\tif uiutils.Eq(vMeta, \"full\") {\n\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{ uiutils.Text(uiutils.Tpl(uiutils.Get(vLabels, \"minutes\"), uiutils.Get(vPost, \"minutes\"))) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t@Pill(PillProps{Tone: \"blue\"}) {\n\t\t\t\t\t{ uiutils.Text(uiutils.Get(vPost, \"category\")) }\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t@SectionFrame(SectionFrameProps{Id: vId, Heading: map[string]any{\"level\": vLevel}, Align: vLayout, Tone: vTone, LandmarkLabel: vLandmarkLabel}) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"file-text\", Title: uiutils.Get(vLabels, \"empty\")})\n\t\t}\n\t}\n}\n\ntempl postHeaderFill1(p PostHeaderProps, vPost any) {\n\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vPost, \"title\"), Src: uiutils.Get(vPost, \"image\"), Ratio: \"21/9\"})\n}\n",
      "path": "blocks/post-header.templ",
      "target": "blocks/post-header.templ"
    }
  ],
  "meta": {
    "category": "content",
    "group": "blog",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "post-header",
  "registryDependencies": [
    "empty-state",
    "group",
    "kit-box",
    "kit-text",
    "media-frame",
    "pill",
    "section-frame",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Post Header",
  "type": "registry:block"
}
