Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix team card layout and assign keys to cards #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/TeamCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const TeamCard = ({ name, avatar, github }) => (
<LazyLoadImage alt={name} src={avatar} />
</div>
<div className="flex flex-col flex-none items-start">
<div className="-mt-8 text-2xl font-inter text-stone-600 dark:text-zinc-300 text-left">{name}</div>
<div className="-mt-8 text-2xl font-inter text-stone-600 dark:text-zinc-300 text-left overflow-hidden lg:text-xl">{name}</div>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was looking into trying to use ellipses when it overflowed but couldn't make it work, maybe you can?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried, but using tailwind's native truncate property didn't seem to work fully. https://stackoverflow.com/questions/53497656/tailwind-text-overflow-ellipsis

image

It truncates fine, but I can't seem to get ellipses at all for some reason. If you'd like, I can commit this here without the ellipses?

<div className="mt-2 ml-1 flex flex-row flex-none">
<CustomLink href={github}>
<div className="text-2xl text-stone-700 dark:text-zinc-300"><FaGithub/></div>
Expand Down
4 changes: 2 additions & 2 deletions src/sections/Team.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const TeamCategory = ({name, members}) => {
return (
<div className="m-5">
<p className="text-black text-lg dark:text-white">{name}</p>
<div className="grid gap-6 pt-4 text-center md:grid-cols-4">
<div className="grid gap-6 pt-4 text-center lg:grid-cols-4">
{members.map((member, key) => (
<TeamCard {...{ ...member, key }} />
))}
Expand All @@ -31,7 +31,7 @@ const Team = () => {
<p className="pb-2 mb-6 font-semibold text-blue-500 md:mb-12 md:pb-0">The Skyline Team is composed of passionate individuals from all around the world 🌐</p>
</div>
{Object.entries(config.team).map(([name, members]) => (
<TeamCategory name={name} members={members} />
<TeamCategory name={name} members={members} key={name} />
))}
</div>
</div>
Expand Down