mirror of
https://github.com/redlib-org/redlib.git
synced 2025-05-21 17:24:20 +00:00
Fix comment structuring (#113)
* Start recursive comments * Update comment.html * Fix move error Co-authored-by: spikecodes <19519553+spikecodes@users.noreply.github.com>
This commit is contained in:
parent
fee2cb1b56
commit
4a40e16277
4 changed files with 36 additions and 48 deletions
24
templates/comment.html
Normal file
24
templates/comment.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
{% import "utils.html" as utils %}
|
||||
|
||||
{% if kind == "more" %}
|
||||
<a class="deeper_replies" href="{{ post_link }}{{ id }}">→ 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 %}
|
Loading…
Add table
Add a link
Reference in a new issue