margaritahumanitarian / helpafamily

Impactful ways to help families in need through donated meals, hygiene kits, and more. By Margarita Humanitarian Foundation.
https://helpafamily.margaritahumanitarian.org/
GNU Affero General Public License v3.0
66 stars 111 forks source link

Multi-column card layout #33

Closed audreyfeldroy closed 3 years ago

audreyfeldroy commented 3 years ago

Eventually there will probably be 9+ cards, each featuring a different way to help families in need.

Putting 2-4 cards in each row would improve readability. We could use help converting the layout from single-column to multi-column.

Here are some ideas on how to get started with this issue:

I'm still learning Tailwind CSS myself and am unsure of what I wrote above. Other implementations are certainly possible.

@GrungeKarma if you're interested, this issue builds upon your excellent work in #32 and I'm happy to help however I can.

GrungeKarma commented 3 years ago

I would be happy to take a look when I get some free time. Probably late tonight or tomorrow. Funny that you should say you are still learning Tailwind, I am learning it as well.

GrungeKarma commented 3 years ago

I am seeing an issue as this project moves forward. I am thinking we need to standardize the card size on a component level. As it sits, when I try to adjust the layout of the cards it looks bad because of the different card hights due to the different lengths of text in each card. It may be better to control the size of the cards directly so we can predict how they will act with flexbox. It would probably be easy to add a description length for each explanation and include a button for more information that brings up the expanded explanation as a popup or a separate page. Let me know if you have any ideas as well. Those are just the ideas going through my head.

audreyfeldroy commented 3 years ago

I agree. If it helps, you can truncate the card text for now or cut out sentences.

audreyfeldroy commented 3 years ago

While #38 is still a possible dependency of this issue, it doesn't necessarily have to be.

I remembered a multi-column card layout can work with unequal card heights. This type of layout is typically referred to as masonry, named after the popular Masonry package.

To see a masonry layout in action: https://getbootstrap.com/docs/5.0/examples/masonry/

Here are a couple implementations of masonry layouts with Tailwind CSS: https://stackoverflow.com/questions/66914169/can-i-create-a-masonry-layout-using-tailwind-css-utility-classes

audreyfeldroy commented 3 years ago

I assigned you this issue @GrungeKarma, but no pressure. If you get too busy or would rather work on something else, unassign yourself and someone else can take this 🙂

GrungeKarma commented 3 years ago

I am still working on it. It is a finicky issue.

GrungeKarma commented 3 years ago

Here is an Image for as far as I have gotten. The issue is mobile responsiveness. I cannot get Tailwind to return to a single-column layout on mobile sizes. Any insight?

https://imgur.com/a/JErprlu

audreyfeldroy commented 3 years ago

That's awesome @GrungeKarma. Submit a PR of what you have so far, then I can look into the mobile responsiveness.

GrungeKarma commented 3 years ago

Submitted the pull request. There are some conflicts because it took a couple of days. I am not familiar with how to resolve the conflicts between the files.

GrungeKarma commented 3 years ago

Submitted again fixing mobile responsiveness.

audreyfeldroy commented 3 years ago

Thanks again!