{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Tags, reading figures and an author card with share and save over a wide cover; the author, figures, tags and actions beside the cover; or the facts and related reading beside it.",
  "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-split.json\n\npackage blocks\n\nimport (\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// PostSplitProps are the props of PostSplit; the values are the JSON shapes of the TypeScript props.\ntype PostSplitProps struct {\n\tId any `json:\"id\"`\n\tPost any `json:\"post\"`\n\tLabels any `json:\"labels\"`\n\tExtras any `json:\"extras\"`\n\tLevel any `json:\"level\"`\n\tLayout any `json:\"layout\"`\n\tMediaSide any `json:\"mediaSide\"`\n\tAuthor any `json:\"author\"`\n\tCover any `json:\"cover\"`\n\tActions any `json:\"actions\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// A post header with the author, the reading figures, the tags and the actions. Axes: layout (center: tags, figures and an author card with share and save over a wide cover; split: beside the cover; outline: facts and related reading beside the cover), mediaSide, author (line, card, bio), cover (wide, square), actions (pair, wide, icons), tone.\ntempl PostSplit(p PostSplitProps) {\n\t{{ vId := p.Id }}\n\t{{ vPost := p.Post }}\n\t{{ vLabels := p.Labels }}\n\t{{ vExtras := p.Extras }}\n\t{{ vLevel := uiutils.Def(p.Level, float64(1)) }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"split\") }}\n\t{{ vMediaSide := uiutils.Def(p.MediaSide, \"end\") }}\n\t{{ vAuthor := uiutils.Def(p.Author, \"line\") }}\n\t{{ vCover := uiutils.Def(p.Cover, \"wide\") }}\n\t{{ vActions := uiutils.Def(p.Actions, \"pair\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\tif uiutils.Eq(vLayout, \"center\") {\n\t\t@SectionFrame(SectionFrameProps{Id: vId, Title: uiutils.Get(vPost, \"title\"), Lead: uiutils.Get(vPost, \"excerpt\"), Heading: map[string]any{\"badge\": uiutils.Get(vPost, \"category\"), \"level\": vLevel}, Tone: vTone, Media: map[string]any{\"show\": true}, Align: \"center\", LandmarkLabel: vLandmarkLabel, Aside: postSplitFill1(p, vPost, vLayout, vCover)}) {\n\t\t\tif uiutils.Gt(uiutils.Len(uiutils.Get(vExtras, \"tags\")), float64(0)) {\n\t\t\t\t@PostTags(PostTagsProps{Tags: uiutils.Get(vExtras, \"tags\"), Align: \"center\"})\n\t\t\t}\n\t\t\t@PostStats(PostStatsProps{Post: vPost, Extras: vExtras, Labels: vLabels, Align: \"center\"})\n\t\t\t@PostAuthor(PostAuthorProps{Post: vPost, Extras: vExtras, Labels: vLabels, Mode: \"card\", Share: true, Class: uiutils.Cnv(\"mx-auto w-full max-w-md\")})\n\t\t}\n\t} else {\n\t\t@SectionFrame(SectionFrameProps{Id: vId, Title: uiutils.Get(vPost, \"title\"), Lead: uiutils.Get(vPost, \"excerpt\"), Heading: map[string]any{\"badge\": uiutils.Get(vPost, \"category\"), \"level\": vLevel}, Tone: vTone, Media: map[string]any{\"show\": true, \"side\": vMediaSide}, Layout: \"split\", LandmarkLabel: vLandmarkLabel, Aside: postSplitFill2(p, vPost, vLayout, vCover)}) {\n\t\t\tif uiutils.Eq(vLayout, \"outline\") {\n\t\t\t\tif uiutils.Gt(uiutils.Len(uiutils.Get(vExtras, \"outline\")), float64(0)) {\n\t\t\t\t\t@PostOutline(PostOutlineProps{Post: vPost, Extras: vExtras, Labels: vLabels})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t@PostAuthor(PostAuthorProps{Post: vPost, Extras: vExtras, Labels: vLabels, Mode: vAuthor})\n\t\t\t\tif !uiutils.Eq(vAuthor, \"line\") {\n\t\t\t\t\t@PostStats(PostStatsProps{Post: vPost, Extras: vExtras, Labels: vLabels})\n\t\t\t\t}\n\t\t\t\tif uiutils.Gt(uiutils.Len(uiutils.Get(vExtras, \"tags\")), float64(0)) {\n\t\t\t\t\t@PostTags(PostTagsProps{Tags: uiutils.Get(vExtras, \"tags\")})\n\t\t\t\t}\n\t\t\t}\n\t\t\t@PostActions(PostActionsProps{Labels: vLabels, Mode: vActions})\n\t\t}\n\t}\n}\n\ntempl postSplitFill1(p PostSplitProps, vPost any, vLayout any, vCover any) {\n\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vPost, \"title\"), Src: uiutils.Get(vPost, \"image\"), Ratio: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"center\")), \"21/9\", uiutils.Cond(uiutils.T(uiutils.Eq(vCover, \"square\")), \"1/1\", \"4/3\"))})\n}\n\ntempl postSplitFill2(p PostSplitProps, vPost any, vLayout any, vCover any) {\n\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vPost, \"title\"), Src: uiutils.Get(vPost, \"image\"), Ratio: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"center\")), \"21/9\", uiutils.Cond(uiutils.T(uiutils.Eq(vCover, \"square\")), \"1/1\", \"4/3\"))})\n}\n",
      "path": "blocks/post-split.templ",
      "target": "blocks/post-split.templ"
    }
  ],
  "meta": {
    "category": "content",
    "group": "blog",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "post-split",
  "registryDependencies": [
    "media-frame",
    "post-actions",
    "post-author",
    "post-outline",
    "post-stats",
    "post-tags",
    "section-frame",
    "utils"
  ],
  "runtime": "templ",
  "title": "Post Split",
  "type": "registry:block"
}
