techtalk/templates/comment.html

13 lines
562 B
HTML

<li id="comment-{{ comment.id }}">
<strong>
{% if comment.author %}
<a href="{{ url_for('profile', username=comment.author.username) }}">{{ comment.author.username }}</a>
{% else %}
<span class="text-white">Anonymous</span>
{% endif %}
</strong>:
{{ comment.content }}
<button class="btn btn-sm btn-outline-primary like-comment-btn" data-comment-id="{{ comment.id }}">
<i class="bi bi-heart-fill"></i> (<span class="comment-like-count">{{ comment.likes|length }}</span>)
</button>
</li>