{%- macro plural(value, suffix='s') -%} {%- if value != 1 -%} {{suffix}} {%- endif -%} {%- endmacro -%} {%- macro random_image(path) -%} {{- SITE_FULL_IMAGES ~ "/" ~ path ~ "/" ~ listdir('files/' ~ path)|random() ~ '?x=6' -}} {%- endmacro -%} {% macro post_meta(p) %} {% if p.sub %} {% if not HOLE_STYLE_FLAIR -%} /h/{{p.sub}} {%- else -%} {{p.sub|capitalize}} {%- endif %} {% endif %} {% if p.sub and p.author.exiler_username(p.sub) %} {% endif %} {% if p.bannedfor and p.sub != 'chudrama' %} {% endif %} {% if p.chuddedfor and p.sub != 'chudrama' %} {% endif %} {% for a in p.awards %} {% if a.kind == "emoji" %} {{a.title}} Award given by @{{a.user.username}}: "{{a.note}}" {% else %} {% endif %} {% endfor %} {% if v and v.can_see_shadowbanned and p.author.shadowbanned %} {% endif %} {% if p.stickied %} {% endif %} {% if p.hole_pinned %} {% endif %} {% if p.distinguish_level %}{% endif %} {% if p.is_pinned and request.path != '/' %} {% endif %} {% if p.nsfw %}NSFW{% endif %} {% if p.is_bot %} {% endif %} {% if p.is_blocking and not p.ghost %}{% endif %} {% if p.is_blocked and not p.ghost %}{% endif %} {% if p.private %}Draft{% endif %} {% if p.active_reports(v) %}{% endif %} {% if p.ghost %} 👻 {% else %} {% if FEATURES['PATRON_ICONS'] and p.author.patron > 1 %} {{p.author.patron_tooltip}} {% endif %} {% if FEATURES['HOUSES'] and p.author.house %} House {{p.author.house}} {% endif %} {% if p.author.verified %} {% endif %}
@{{p.author.username}}'s profile picture {% if p.author.hat_active(v)[0] -%} @{{p.author.username}}'s hat {%- endif %}
{{p.author_name}}
{% if FEATURES['PRONOUNS'] %} {{p.author.pronouns_display}} {% endif %} {% if p.author.customtitle %} {{p.author.customtitle | safe}} {% endif %} {% endif %}  {{p.age_string}} {% if not p.deleted_utc %} ({% if p.is_image %}image post{% elif p.is_video %}video post{% elif p.is_audio %}audio post{% elif p.domain %}{{p.domain|truncate(50, True)}}{% else %}text post{% endif %}) {% endif %} {% if p.edited_utc %} Edited {{p.edited_string}} {% endif %} {{p.views}} thread views   #{{p.id}} {% if p.ping_cost %} spent {{p.ping_cost}} currency on pings {% endif %} {% endmacro %} {% macro file_input(input_id, textarea_id, disabled) %}
{% endmacro %} {% macro comment_reply_box(target_fullname, html_id, wrapper_css_classes="", subwrapper_css_classes="", hide="", enable_cancel_button=true) %}
{% if v %}
{{file_input('file-upload-reply-' ~ target_fullname, 'reply-form-body-' ~ target_fullname, False)}} {% if enable_cancel_button %} {% endif %}
{% else %}
Jump in the discussion.

No email address required.

Sign up Sign in
{% endif %}
{% endmacro %} {% macro ghost_box(text1, text2, mode, extra_css) %} {% if mode == 1 %}
{% if text1 %}
{{text1|safe}}

{% endif %} {% if text2 %}

{{text2|safe}}

{% endif %}
{% elif mode == 2 %}

{{text1|safe}}

{% endif %} {% endmacro %} {% macro alert(msg, error=false) %}
{{msg}}
{% endmacro %} {% macro reports(i, kind) %} {% if i.active_reports(v) %}
Reported by:
{% endif %} {% endmacro %} {% macro chat_users_online() %}
0
{% endmacro %} {% macro chat_group_template(id, m) %}
{% if m %}{{m.username}}{% endif %}
{% endmacro %} {% macro chat_line_template(id, m, vlink) %} {% set quote_exists = m and m.quotes and messages.get(m.quotes) %} {% set mentioned = m and vlink in m.text_html or (quote_exists and messages[m.quotes].user_id == v.id) %}
{% if m %} {% if v.slurreplacer %} {{m.text_html_censored | safe}} {% else %} {{m.text_html | safe}} {% endif %} {% endif %} {%- if m -%} {%- if v.slurreplacer -%} {{m.text_censored}} {%- else -%} {{m.text}} {%- endif -%} {%- endif -%} {% if v.admin_level >= PERMS.POST_COMMENT_MODERATION %} {% endif %}
{% endmacro %} {% macro chat_window(vlink)%}
{% set messages_list = messages.items()|list %} {% for id, m in messages_list %} {% set same = loop.index > 1 and m.user_id == messages_list[loop.index-2][1].user_id %} {% if not same %} {% if loop.index > 1 %}
{% endif %} {{chat_group_template(id, m)}} {% endif %} {{chat_line_template(id, m, vlink)}} {% endfor %}
@:
{% endmacro %} {% macro chat_users_list() %}
Users Online
{% endmacro %} {% macro time_filter_buttons() %} {% endmacro %} {% macro sorting_buttons(sorts, hot_allowed) %} {% endmacro %}