I would like to display category images in the category list kind of the same way users pictures are displayed on the recent view Catégories - Discourse Meta.
I kind of got the result I would like to have by fiddling around in chrome inspect mode.
Do you think this is achievable in CSS or do I need to edit html templates ?
Website is live at APF - Auberge du Pixel Fringant (apfcommu.ga) if you want to see it live.
Thanks for your time
I’d say very likely and it seems you’ve already found the way tinkering with chrome, so if your question is more “where to apply my modifications?”, you’ll find an example there:
and many more here Search results for 'category-list' - Discourse Meta
Not really, I cheated by moving around some html elements.
In the example, they got it to work by removing the category descriptions and adding the descriptions directly to the images. I’d prefer to avoid doing this.
Oh I see, my bad
so as I’m really not good at css and I’m not sure you should go down the road of
position : relative, in case you’ll go for the html shuffling you’ll find this more useful:
and there is discourse/category.hbs at main · discourse/discourse · GitHub , but as to make some changes to the discourse/index.html.erb at main · discourse/discourse · GitHub , you’ll probably need a plugin.
Not really good in CSS myself either.
Thanks for the ressources, will try to look into that when I have some more time.
I will probably need to go down the plugin road…
I’d use this new component:
It will give you a cleaner markup to style with css. And have the same look on desktop and mobile with almost similar class selectors.