Add padding for responses in comments, to let threads appear

Fixes #144
This commit is contained in:
Bat
2018-07-25 18:18:41 +02:00
parent 4e07fdbd05
commit 44172b67d5
6 changed files with 37 additions and 21 deletions
+13
View File
@@ -45,3 +45,16 @@
{% endif %}
</div>
{% endmacro %}
{% macro comment(comm) %}
<div class="comment" id="comment-{{ comm.id }}">
<a class="author" href="{{ comm.author.ap_url }}">
<span class="display-name">{{ comm.author.display_name | default(value=comm.author.username) }}</span>
<small>@{{ comm.author.username }}</small>
</a>
<div class="text">{{ comm.content | safe }}</div>
<a class="button" href="?responding_to={{ comm.id }}">{{ "Respond" | _ }}</a>
{% for res in comm.responses %}
{{ self::comment(comm=res) }}
{% endfor %}
</div>
{% endmacro %}
+2 -14
View File
@@ -1,4 +1,5 @@
{% extends "base" %}
{% import "macros" as macros %}
{% block title %}
{{ post.title }}
@@ -78,20 +79,7 @@
<div class="list">
{% for comment in comments %}
{% if comment.author.display_name %}
{% set comment_author_name = comment.author.display_name %}
{% else %}
{% set comment_author_name = comment.author.username %}
{% endif %}
<div class="comment" id="comment-{{ comment.id }}">
<a class="author" href="{{ comment.author.ap_url }}">
<span class="display-name">{{ comment.author.display_name }}</span>
<small>@{{ comment.author.username }}</small>
</a>
<div class="text">{{ comment.content | safe }}</div>
<a class="button" href="?responding_to={{ comment.id }}">{{ "Respond" | _ }}</a>
</div>
{{ macros::comment(comm=comment) }}
{% endfor %}
</div>
</div>