{#- chirp-ui: ASCII Card Box-drawn card with Unicode border frame, optional title bar, and content slot. Usage: from "chirpui/ascii_card.html" import ascii_card {% call ascii_card(title="Status") %}
All systems operational.
{% end %} {% call ascii_card(title="Deploy", variant="double", glyph="◆") %}Last deploy: 2 hours ago
{% end %} {% call ascii_card() %}Borderless content area
{% end %} Variants: single (default), double, rounded, heavy. Visual: ╭─── Status ──────────╮ │ │ │ All systems │ │ operational. │ │ │ ╰──────────────────────╯ -#} {% def ascii_card(title=none, variant="", glyph="", cls="") %} {% set variant = variant | validate_variant(("", "single", "double", "rounded", "heavy"), "") %} {% set variant_class = " chirpui-ascii-card--" ~ variant if variant else "" %} {% set tl = "╔" if variant == "double" else "╭" if variant == "rounded" else "┏" if variant == "heavy" else "┌" %} {% set h = "═" if variant == "double" else "─" if variant == "rounded" else "━" if variant == "heavy" else "─" %} {% set tr = "╗" if variant == "double" else "╮" if variant == "rounded" else "┓" if variant == "heavy" else "┐" %} {% set v = "║" if variant == "double" else "│" if variant == "rounded" else "┃" if variant == "heavy" else "│" %} {% set bl = "╚" if variant == "double" else "╰" if variant == "rounded" else "┗" if variant == "heavy" else "└" %} {% set br = "╝" if variant == "double" else "╯" if variant == "rounded" else "┛" if variant == "heavy" else "┘" %} {% set dh = "═" if variant == "double" else "─" if variant == "rounded" else "━" if variant == "heavy" else "─" %} {% set dl = "╠" if variant == "double" else "├" if variant == "rounded" else "┣" if variant == "heavy" else "├" %} {% set dr = "╣" if variant == "double" else "┤" if variant == "rounded" else "┫" if variant == "heavy" else "┤" %}