% from 'templates/macros/avatar-url.html' import avatar_img with context % from 'templates/macros/elsewhere.html' import platform_icon_small % macro profile_box_embedded_wrapper(participant, path, style='default')
% endmacro % macro profile_box_embedded(participant, summary, nmembers=None, numbers=True) % call profile_box_embedded_wrapper(participant, participant.path('')) {{ profile_box_embedded_participant(participant, summary, nmembers=nmembers, numbers=numbers) }} % endcall % endmacro % macro profile_box_embedded_participant(participant, summary, nmembers=None, numbers=True) % set username = participant.username

{{ username }}

{{ summary or '' }}

% if numbers
{{ _("Patrons") }}
{{ locale.format_decimal(participant.npatrons + participant.nteampatrons) }}
% if not participant.hide_receiving
{{ _("Income") }}
{{ locale.format_money(participant.receiving) }}
{{ _("per week") }}
% endif % if nmembers
{{ _("Members") }}
{{ locale.format_decimal(nmembers) }}
% endif
% endif % endmacro % macro profile_box_embedded_elsewhere( e, has_tip=None, show_button=False, show_numbers=True, show_platform_icon=True ) % set tippee_is_stub = e.participant.status == 'stub' % set panel_style = 'default' if tippee_is_stub else 'primary' % set path = e.liberapay_path % call profile_box_embedded_wrapper(e.participant, path, style=panel_style) % set p = e.participant

{{ platform_icon_small(e.platform_data) if show_platform_icon else '' }} {{ e.friendly_name }} ({{ e.platform_data.display_name }})

{{ e.get_excerpt() or '' }}

% if show_button {{ (_("Modify your pledge") if has_tip else _("Pledge")) if tippee_is_stub else (_("Modify your donation") if has_tip else _("Donate")) }} % endif % if show_numbers
{{ _("Pledges") }}
{{ locale.format_decimal(p.npatrons) }}
% if not p.hide_receiving
{{ _("Sum") }}
{{ locale.format_money(p.receiving) }}
{{ _("per week") }}
% endif
% endif % endcall % endmacro