{% import "macros.jinja" as macros %} {% if current_depth is not defined %} {% set current_depth = 1 %} {% endif %} {% if depth_limit is not defined %} {% set depth_limit = 10 %} {% endif %} {% if is_in_quote %} {% set show_replies_from = False %} {% set show_replies = False %} {% endif %} {% if show_replies_from == 'following' %} {% set show_replies = show_replies_from and molt.get_reply_from_following(current_user) and current_depth <= depth_limit %} {% elif show_replies_from %} {% set show_replies = show_replies_from and molt.get_reply_from(show_replies_from) and current_depth <= depth_limit %} {% endif %} {% if show_replies %} {% set hide_border = true %} {% set is_parent = true %} {% endif %} {% set is_remolt = molt.is_remolt %} {% if is_remolt %} {% set remolt_shell = molt %} {% set molt = molt.original_molt %} {% endif %} {% set is_quote = molt.is_quote %} {# MOLT AUTHOR OPTIMIZATION #} {% if not author or author.id != molt.author_id %} {% set author = molt.get_author() %} {% endif %} {% set is_deleted = molt.deleted %} {% set is_unavailable = author.banned or author.deleted or molt.original_molt.deleted %} {% if always_show %} {% set is_deleted = false %} {% set is_unavailable = false %} {% endif %} {# ORIGINAL MOLT AUTHOR OPTIMIZATION #} {% if is_quote or molt.is_reply %} {% set original_author = molt.original_molt.get_author(('id', 'username', 'display_name')) %} {% endif %} {% if molt.is_reply and recurse_parents %}
{% with molt=molt.original_molt, thread=true, is_parent=true, hide_border=true %} {% include "molt.html" %} {% endwith %}
{% endif %}
{% if is_deleted %} {% if is_parent %}

This Molt has been deleted.

{% else %}

This Molt has been deleted.

{% endif %} {% elif is_unavailable %} {% if is_parent %}

This Molt is no longer available.

{% else %}

This Molt is no longer available.

{% endif %} {% else %}
{% if static %} {% else %} {% endif %} {% if is_parent %}
{% endif %}
{% if is_pin %}

Pinned Molt

{% endif %} {% if not is_in_quote %} {% if is_remolt %} {{remolt_shell.author.display_name}} Remolted {% endif %} {% if molt.is_reply and not thread %} replying to {{"you" if original_author.id == current_user.id else original_author.display_name}} {% endif %} {% endif %}
{% if is_in_quote %} {% if static %} {% else %} {% endif %}
{% endif %}
{% if not static %} {% else %} {% endif %} {{author.display_name}} {% if author.verified %} {{macros.verified(17)}} {% endif %} @{{author.username}} ยท {{molt.pretty_age}} {% if molt.is_thread %} {% include 'thread-badge.html' %} {% endif %} {% if molt.nsfw %} {% include 'nsfw-badge.html' %} {% endif %}
{% if molt.content %}

{{molt.rich_content()|safe}}

{% endif %} {% if molt.image %}
{{molt.image | alt_text}} {% if molt.nsfw %} NSFW {% endif %}
{% endif %}
{% if is_quote and not is_in_quote %}
{% with molt = molt.original_molt, hide_border = True, hide_buttons = True, is_in_quote=True %} {% include 'molt.html' %} {% endwith %}
{% endif %} {% if (current_user or static) and not hide_buttons %}
{% if current_user %} {% if author.id == current_user.id and molt.editable %}
{% endif %} {% endif %}
{{molt.reply_count}}
{% endif %}
{% if not static %} {% endif %} {% endif %}
{% if show_replies %} {% if show_replies_from == 'following' %} {% with molt=molt.get_reply_from_following(current_user) %} {% with thread=true, show_replies_from=author.id, hide_border=false, is_parent=false, current_depth=current_depth + 1 %} {% include "molt.html" %} {% endwith %} {% endwith %} {% else %} {% with molt=molt.get_reply_from(show_replies_from) %} {% with thread=true, show_replies_from=author.id, hide_border=false, is_parent=false, current_depth=current_depth + 1 %} {% include "molt.html" %} {% endwith %} {% endwith %} {% endif %} {% endif %}