{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A post as a card: cover picture, category, title, excerpt, author line and a read link. Axes: layout (vertical, horizontal), media (image, none), meta (full, short: the date only, news: date and title only), density.",
  "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-card.json\n    A post as a card: cover picture, category, title, excerpt, author line and a read link. Axes: layout (vertical, horizontal), media (image, none), meta (full, short: the date only, news: date and title only), density.\n    Props (p): post, labels, layout, media, meta, density. -#}\n{%- set v_post = (p.post ?? null) -%}\n{%- set v_labels = (p.labels ?? null) -%}\n{%- set v_layout = (p.layout ?? 'vertical') -%}\n{%- set v_media = (p.media ?? 'image') -%}\n{%- set v_meta = (p.meta ?? 'full') -%}\n{%- set v_density = (p.density ?? 'default') -%}\n{%- if og_t(og_eq(v_meta, 'news')) %}\n  {%- set c_6 -%}\n    {%- set c_2 -%}\n      {{ include('blocks/media-frame.html.twig', {'p': {'alt': og_get(v_post, ['title']), 'src': og_get(v_post, ['image']), 'className': og_cnv([og_cnv(['size-full', og_preset('blocks/presets/defaults.json', ['media', 'rounded'])])])}}, with_context = false) }}\n      {%- set c_1 -%}\n        {{ og_text(og_get(v_post, ['title'])) }}\n      {%- endset -%}\n      {{ include('compose/Title.html.twig', {'as': 3, 'size': 'xs', 'weight': 'semibold', 'class': og_s(og_cnv(['pointer-events-none absolute inset-x-12 line-clamp-2 text-center leading-5 text-foreground', og_preset('blocks/presets/defaults.json', ['news', 'title'])])), 'attrs': og_attrs(['data-slot', 'news-title']), 'children': c_1}, with_context = false) }}\n    {%- endset -%}\n    {{ include('compose/Box.html.twig', {'class': og_s(og_cnv(['relative shrink-0 overflow-hidden', og_preset('blocks/presets/defaults.json', ['news', 'cover'])])), 'attrs': og_attrs(['data-slot', 'news-cover']), 'children': c_2}, with_context = false) }}\n    {%- set c_5 -%}\n      {{ include('icons/LucideIcon.html.twig', {'name': 'calendar', 'size': 16}, with_context = false) }}\n      {%- set c_3 -%}\n        {{ og_text(og_get(v_post, ['date'])) }}\n      {%- endset -%}\n      {{ include('compose/Text.html.twig', {'size': 'xs', 'weight': 'bold', 'class': 'leading-4', 'children': c_3}, with_context = false) }}\n      {%- if og_t(og_get(v_post, ['category'])) %}\n        {%- set c_4 -%}\n          {{ og_text(og_get(v_post, ['category'])) }}\n        {%- endset -%}\n        {{ include('compose/Text.html.twig', {'size': 'xs', 'weight': 'bold', 'class': 'leading-4', 'children': c_4}, with_context = false) }}\n      {%- endif %}\n    {%- endset -%}\n    {{ include('compose/Group.html.twig', {'gap': '2', 'align': 'center', 'class': og_s(og_cnv(['w-full px-2 text-muted-foreground', og_preset('blocks/presets/defaults.json', ['news', 'strip'])])), 'attrs': og_attrs(['data-slot', 'news-date']), 'children': c_5}, with_context = false) }}\n  {%- endset -%}\n  {{ include('compose/Block.html.twig', {'tag': 'article', 'class': og_s(og_cnv(['flex flex-col gap-2 overflow-hidden rounded p-0 inset-ring inset-ring-border', og_preset('blocks/presets/defaults.json', ['news', 'card'])])), 'attrs': og_attrs(['data-layout', v_layout, 'data-meta', 'news', 'data-slot', 'item']), 'children': c_6}, with_context = false) }}\n{%- else %}\n  {%- set c_18 -%}\n    {%- if og_t(og_eq(v_media, 'image')) %}\n      {%- set c_7 -%}\n        {{ include('blocks/media-frame.html.twig', {'p': {'alt': og_get(v_post, ['title']), 'src': og_get(v_post, ['image']), 'className': og_cnv(['h-full'])}}, with_context = false) }}\n      {%- endset -%}\n      {{ include('compose/Box.html.twig', {'class': og_s(og_cnv(['relative shrink-0', (og_t(og_eq(v_layout, 'horizontal')) ? 'sm:w-64' : '')])), 'children': c_7}, with_context = false) }}\n    {%- endif %}\n    {%- set c_17 -%}\n      {%- if og_t(not (og_eq(v_meta, 'news'))) %}\n        {%- set c_9 -%}\n          {{ include('icons/LucideIcon.html.twig', {'name': og_s(og_get(v_post, ['icon'])), 'size': 16}, with_context = false) }}\n          {%- set c_8 -%}\n            {{ og_text(og_get(v_post, ['category'])) }}\n          {%- endset -%}\n          {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'uppercase tracking-wide text-muted-foreground', 'children': c_8}, with_context = false) }}\n        {%- endset -%}\n        {{ include('compose/Group.html.twig', {'gap': '2', 'align': 'center', 'children': c_9}, with_context = false) }}\n      {%- endif %}\n      {%- set c_10 -%}\n        {{ og_text(og_get(v_post, ['title'])) }}\n      {%- endset -%}\n      {{ include('compose/Title.html.twig', {'as': 3, 'size': 'xl', 'weight': 'bold', 'children': c_10}, with_context = false) }}\n      {%- if og_t(og_and([og_eq(v_density, 'default'), not (og_eq(v_meta, 'news'))])) %}\n        {%- set c_11 -%}\n          {{ og_text(og_get(v_post, ['excerpt'])) }}\n        {%- endset -%}\n        {{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_11}, with_context = false) }}\n      {%- endif %}\n      {%- if og_t(not (og_eq(v_meta, 'news'))) %}\n        {%- set c_15 -%}\n          {%- if og_t(og_eq(v_meta, 'full')) %}\n            {%- set c_12 -%}\n              {{ og_text(og_tpl(og_get(v_labels, ['by']), [og_get(v_post, ['author'])])) }}\n            {%- endset -%}\n            {{ include('compose/Text.html.twig', {'size': 'xs', 'children': c_12}, with_context = false) }}\n          {%- endif %}\n          {%- set c_13 -%}\n            {{ og_text(og_get(v_post, ['date'])) }}\n          {%- endset -%}\n          {{ include('compose/Text.html.twig', {'size': 'xs', 'children': c_13}, with_context = false) }}\n          {%- if og_t(og_eq(v_meta, 'full')) %}\n            {%- set c_14 -%}\n              {{ og_text(og_tpl(og_get(v_labels, ['minutes']), [og_get(v_post, ['minutes'])])) }}\n            {%- endset -%}\n            {{ include('compose/Text.html.twig', {'size': 'xs', 'children': c_14}, with_context = false) }}\n          {%- endif %}\n        {%- endset -%}\n        {{ include('compose/Group.html.twig', {'gap': '2', 'class': 'mt-auto flex-wrap pt-2 text-muted-foreground', 'children': c_15}, with_context = false) }}\n      {%- endif %}\n      {%- if og_t(og_and([not (og_eq(v_meta, 'news')), og_get(v_post, ['href'])])) %}\n        {%- set c_16 -%}\n          {{ og_text(og_get(v_labels, ['read'])) }}\n        {%- endset -%}\n        {{ include('compose/Link.html.twig', {'href': og_url(og_s(og_get(v_post, ['href']))), 'variant': 'default', 'attrs': og_attrs(['data-slot', 'read']), 'children': c_16}, with_context = false) }}\n      {%- endif %}\n    {%- endset -%}\n    {{ include('compose/CardContent.html.twig', {'class': 'flex flex-1 flex-col gap-2', 'children': c_17}, with_context = false) }}\n  {%- endset -%}\n  {{ include('compose/Block.html.twig', {'tag': 'article', 'class': og_s(og_cnv(['flex flex-col gap-8 bg-card p-6 text-card-foreground inset-ring inset-ring-border rounded', 'h-full gap-4 overflow-hidden', (og_t(og_eq(v_layout, 'horizontal')) ? 'flex flex-col sm:flex-row' : 'flex flex-col')])), 'attrs': og_attrs(['data-slot', 'card', 'data-layout', v_layout, 'data-meta', v_meta]), 'children': c_18}, with_context = false) }}\n{%- endif %}\n",
      "path": "blocks/post-card.html.twig",
      "target": "blocks/post-card.html.twig"
    }
  ],
  "meta": {
    "category": "general",
    "kind": "block",
    "tags": [
      "twig",
      "block"
    ]
  },
  "name": "post-card",
  "registryDependencies": [
    "block",
    "box",
    "card-content",
    "group",
    "link",
    "lucide-icon",
    "media-frame",
    "presets",
    "text",
    "title",
    "utils"
  ],
  "runtime": "twig",
  "title": "Post Card",
  "type": "registry:block"
}
