{#- chirp-ui: Post Card component Full social post: avatar, name, handle, timestamp, content, media, actions. Named slots (Kida 0.3+): avatar, body (default), media, actions. Usage: from "chirpui/post_card.html" import post_card call post_card(name="Alice", handle="@alice", time="2h ago") {% slot avatar %}avatar(src="...", alt="Alice", size="md"){% end %} {% slot media %}Sunset{% end %} {% slot actions %}action_bar_item(icon="♥", label="Like", count=42){% end %}

Check out this amazing sunset! 🌅

end Legacy: post_card_header, post_card_body, post_card_media, post_card_actions still available for backward compatibility. -#} {% def post_card(name=none, handle=none, time=none, href=none, cls="") %}
{% if name or handle or time %}
{% slot avatar %}
{% if href %} {{ name }} {% else %} {{ name }} {% end %} {% if handle %} {{ handle }} {% end %} {% if time %} {% end %}
{% end %}
{% slot %}
{% slot media %}
{% end %} {% def post_card_header(name, handle=none, time=none, href=none, cls="") %}
{% slot %}
{% if href %} {{ name }} {% else %} {{ name }} {% end %} {% if handle %} {{ handle }} {% end %} {% if time %} {% end %}
{% end %} {% def post_card_body(cls="") %}
{% slot %}
{% end %} {% def post_card_media(cls="") %}
{% slot %}
{% end %} {% def post_card_actions(cls="") %} {% end %}