redsunlib/templates/comment.html

48 lines
2.0 KiB
HTML
Raw Permalink Normal View History

{% import "utils.html" as utils %}
{% if kind == "more" && parent_kind == "t1" %}
<a class="deeper_replies" href="{{ post_link }}{{ parent_id }}">&rarr; More replies ({{ more_count }})</a>
2021-11-24 19:23:29 +13:00
{% else if kind == "t1" %}
<div id="{{ id }}" class="comment">
<div class="comment_left">
<p class="comment_score" title="{{ score.1 }}">
{% if prefs.hide_score != "on" %}
{{ score.0 }}
{% else %}
&#x2022;
{% endif %}
</p>
2023-03-23 16:29:48 +13:00
<div class="line"></div>
</div>
<details class="comment_right" {% if !collapsed || highlighted %}open{% endif %}>
<summary class="comment_data">
2021-12-20 00:20:37 +13:00
{% if author.name != "[deleted]" %}
<a class="comment_author {{ author.distinguished }} {% if author.name == post_author %}op{% endif %}" href="/user/{{ author.name }}">u/{{ author.name }}</a>
{% else %}
<span class="comment_author {{ author.distinguished }}">u/[deleted]</span>
2021-12-20 00:20:37 +13:00
{% endif %}
{% if author.flair.flair_parts.len() > 0 %}
<small class="author_flair">{% call utils::render_flair(author.flair.flair_parts) %}</small>
{% endif %}
2024-09-04 11:21:33 +12:00
<a href="{{ post_link }}{{ id }}/?context=3#{{ id }}" class="created" title="{{ created }}">{{ rel_time }}</a>
2021-02-15 11:53:09 +13:00
{% if edited.0 != "".to_string() %}<span class="edited" title="{{ edited.1 }}">edited {{ edited.0 }}</span>{% endif %}
2023-01-02 15:39:38 +13:00
{% if !awards.is_empty() && prefs.hide_awards != "on" %}
<span class="dot">&bull;</span>
{% for award in awards.clone() %}
<span class="award" title="{{ award.name }}">
<img alt="{{ award.name }}" src="{{ award.icon_url }}" width="16" height="16"/>
</span>
{% endfor %}
{% endif %}
</summary>
{% if is_filtered %}
<div class="comment_body_filtered {% if highlighted %}highlighted{% endif %}">(Filtered content)</div>
{% else %}
2022-05-21 17:28:31 +12:00
<div class="comment_body {% if highlighted %}highlighted{% endif %}">{{ body|safe }}</div>
{% endif %}
2022-05-21 17:28:31 +12:00
<blockquote class="replies">{% for c in replies -%}{{ c.render().unwrap()|safe }}{%- endfor %}
</bockquote>
</details>
</div>
{% endif %}