I’m doing a news feed using the following flow. Tab - Details (News Posts) - Inline List (News Posts) - Cards. Some news posts are videos, some of them are with an image, some are text only. Leaving them in 1 inline list is an ugly approach as there are gray elements instead of images that are taking important place. And swap them with a dummy image or with an thumbnail or with an random image will not work as it can do a bad joke with news or just affect UE.
I was trying to build several different customized inline lists for text_only/video/no_image and filtering them accordingly. But in this case there is no way to present news posts in chronological order, because card-items will be sorted out inside each list and displayed based on list order.
Another possible solution is to have one inline list with cards and remove image-container if there is no img tag inside it but i dont know how to achieve that. Below code will remove all images from all cards…
.card-image-container {
display: none;
}
Any body come across same headake? Please please help help!!!
Can’t do that pivot table you want.
But if you can do that when there is no image, replace it either with an image of your business, icon, or whatever you want.
And for videos you could use the column that brings you the thumbnail of the video.
I hope I helped you, I’m using Google translate haha
Hi Oscar, yeah, thanks for the suggestion, i can even use news provider “avatar” but it takes so many space in the app (( Assume you are subscribing to text only news and see a feed where each post has an anvater…
Not sure that’s possible on a “card by card” basis I’m afraid. Unless @ThinhDinh maybe knows better? He has done some interesting stuff with CSS. If not then it’s going to be separate lists, but of course losing the strict chronology.
Got you, thanks! Moved forward with the approach to put news source channel avatar into the image field. By any chance you know and could share how to move cards overlay avatars, avatar text and caption to the top of each card? I tried with CSS but all spacing between cards becomes broken after my attempt…
There are a few useful resources maintained by other Gliders that contain lots of easily searchable CSS tricks. Here are a couple of examples:
You will likely find what you need in one of these. However please be aware that CSS tweaks are not officially supported and you are not guaranteed that they will continue to work in future versions of Glide. I generally tend to ensure that CSS is not used for “mission critical” features and that I always have a “safe fallback”.
Hi @Uzo! That is exactly what im looking for! By any chance you can share a hint how to achieve that? I tried with the below CSS but my it works only for 1st card and all following seems to be overlapped with each other…