Fixed user colours in comments sections.

This commit is contained in:
flash 2023-08-28 13:33:39 +00:00
parent 57b9e82c10
commit 5bab957a7c

View file

@ -48,6 +48,7 @@
{% set poster = comment.user|default(null) %}
{% if comment.post is defined %}
{% set userVote = comment.vote.weight %}
{% set commenterColour = comment.colour %}
{% set comment = comment.post %}
{% set body = comment.body %}
{% set likes = comment.votesPositive %}
@ -55,6 +56,7 @@
{% set isReply = comment.isReply %}
{% else %}
{% set body = comment.text %}
{% set commenterColour = null %}
{% set userVote = comment.userVote %}
{% set likes = comment.likes %}
{% set dislikes = comment.dislikes %}
@ -80,7 +82,7 @@
{% if not hide_details %}
<a class="comment__user comment__user--link"
href="{{ url('user-profile', {'user': poster.id}) }}"
style="--user-colour: {{ colour }}">{{ poster.name }}</a>
style="--user-colour: {{ commenterColour }}">{{ poster.name }}</a>
{% endif %}
<a class="comment__link" href="#comment-{{ comment.id }}">
<time class="comment__date"