django-comments-xtd icon indicating copy to clipboard operation
django-comments-xtd copied to clipboard

resize avatars in responses

Open ogurec-ogurec opened this issue 3 years ago • 4 comments

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

ogurec-ogurec avatar Oct 31 '21 09:10 ogurec-ogurec

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?

danirus avatar Oct 31 '21 14:10 danirus

@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 avatar Nov 01 '21 20:11 ogurec-ogurec

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 avatar Nov 01 '21 20:11 ogurec-ogurec

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

ogurec-ogurec avatar Nov 16 '21 20:11 ogurec-ogurec