redsunlib/templates/comment.html
robrobinbin 4a40e16277
Fix comment structuring (#113)
* Start recursive comments

* Update comment.html

* Fix move error

Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
2021-02-10 10:48:51 -08:00

25 lines
965 B
HTML

{% import "utils.html" as utils %}
{% if kind == "more" %}
<a class="deeper_replies" href="{{ post_link }}{{ id }}">&rarr; More replies</a>
{% else if kind == "t1" %}
<div id="{{ id }}" class="comment">
<div class="comment_left">
<p class="comment_score">{{ score }}</p>
<div class="line"></div>
</div>
<details class="comment_right" open>
<summary class="comment_data">
<a class="comment_author {{ author.distinguished }} {% if author.name == post_author %}op{% endif %}" href="/u/{{ author.name }}">u/{{ author.name }}</a>
{% if author.flair.flair_parts.len() > 0 %}
<small class="author_flair">{% call utils::render_flair(author.flair.flair_parts) %}</small>
{% endif %}
<span class="created" title="{{ created }}">{{ rel_time }}</span>
</summary>
<div class="comment_body">{{ body }}</div>
<blockquote class="replies">{% for c in replies -%}{{ c.render().unwrap() }}{%- endfor %}
</blockquote>
</details>
</div>
{% endif %}