Skip to content

Commit

Permalink
Add Playco to the Sponsor Section (#68)
Browse files Browse the repository at this point in the history
Co-authored-by: Baz Utsahajit <[email protected]>
  • Loading branch information
bbazukun123 and bbazukun123 authored Jan 18, 2024
1 parent f05750a commit d06f871
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 7 deletions.
33 changes: 26 additions & 7 deletions src/components/Homepage/OpenCollective/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,42 @@
}

.sponsorGrid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
gap: 1rem;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
gap: 2rem;
width: 90vw;
max-width: 940px;
margin: 0 auto;
padding: 20px 0px;

@media screen and (max-width: 481px) {
gap: 1rem;
}
}

.sponsor {
display: flex;
flex-direction: column;
align-items: center;
}

.sponsorImage {
max-width: 100px;
border-radius: 15%;
.sponsorImage {
max-width: 100px;
border-radius: 15px;
}

&:first-child {
padding: 0 calc(min(100vw, 940px) - min(90vw, 300px) / 2);

.sponsorImage {
max-width: 350px;

@media screen and (max-width: 481px) {
width: 80vw;
}
}
}
}
}

Expand Down
9 changes: 9 additions & 0 deletions src/components/Homepage/OpenCollective/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,21 @@ export default function OpenCollective(): JSX.Element
const data = (await response.json()) as OpenCollectiveSchema;
const sponsorData = data
.filter((member) => member.tier === 'sponsor')
.sort((a, b) => b.totalAmountDonated - a.totalAmountDonated)
.map((member) => ({
name: member.name,
image: member.image,
website: member.website,
}));

const playco = {
name: 'Playco',
image: '/images/logo-playco.png',
website: 'https://www.play.co/',
};

sponsorData.unshift(playco);

setSponsors(sponsorData as SponsorData[]);
}
fetchSponsors();
Expand Down
Binary file added static/images/logo-playco.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d06f871

Please sign in to comment.