danirus / django-comments-xtd

A pluggable Django comments application with thread support, follow-up notifications, mail confirmation, like/dislike flags, moderation, a ReactJS plugin and Bootstrap 5.3.
https://django-comments-xtd.readthedocs.io
BSD 2-Clause "Simplified" License
595 stars 158 forks source link

resize avatars in responses #352

Open ogurec-ogurec opened 2 years ago

ogurec-ogurec commented 2 years ago

Can you please tell me how you can change the size of the avatars in the answers?

That is, the main comment is a large avatar, and in the responses - a little less:

image

danirus commented 2 years ago

I wish I could. But as it's distributed, the package doesn't change the size depending on the thread level. If you are using the JavaScript React plugin, take a look at the code that renders the avatar for each comment, here. As you can see, the size is always 48x48 pixels. And here is the part that would render the avatar if you were not using the JavaScript React plugin. Again, defaults to 48x48 pixels.

Do you have custom code for the JavaScript plugin, or if you use Django templates, do you customize it?

ogurec-ogurec commented 2 years ago

@danirus I am using your Javascript plagin, and I thought it would be great to reduce the size of the replies, as this will visually highlight the main comment under which the discussion is going. Unfortunately, I'm not good at Javascript, so I don't know how to do it and wrote a question here. :)

ogurec-ogurec commented 2 years ago

In other words, how can you access exactly the answers, and not the main comment. Maybe one solution is to add a separate class to the response images.

ogurec-ogurec commented 2 years ago

Maybe can check that the comment is a child and assign a different class to it?