{#- chirp-ui: Profile Header component Cover image, avatar, name, bio, stats, action button. Named slots (Kida 0.3+, use_slots=true): avatar, bio, stats, action. Usage: from "chirpui/profile_header.html" import profile_header, profile_header_avatar, ... call profile_header(name="Alice", cover_url="/cover.jpg", use_slots=true) {% slot avatar %}avatar(initials="AC", alt="Alice", size="lg"){% end %} {% slot bio %}

Developer & designer

{% end %} {% slot stats %}stat(value="1.2K", label="Followers") stat(value="42", label="Following"){% end %} {% slot action %}btn("Follow", variant="primary"){% end %} end Legacy (default): profile_header_avatar, profile_header_info, profile_header_stats, profile_header_action -#} {% def profile_header(name=none, cover_url=none, href=none, cls="", use_slots=false) %}
{% if cover_url %}
{% end %}
{% if use_slots %}
{% slot avatar %}
{% if name %} {% if href %}

{{ name }}

{% else %}

{{ name }}

{% end %} {% end %}
{% slot bio %}
{% slot stats %}
{% slot action %}
{% else %} {% slot %} {% end %}
{% end %} {% def profile_header_avatar(cls="") %}
{% slot %}
{% end %} {% def profile_header_info(name, href=none, cls="") %}
{% if href %}

{{ name }}

{% else %}

{{ name }}

{% end %} {% slot %}
{% end %} {% def profile_header_stats(cls="") %}
{% slot %}
{% end %} {% def profile_header_action(cls="") %}
{% slot %}
{% end %}