-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started creating the sponsors component. Need to fix a few things to …
…get it working correctly. Added a few divs to Welcome.mdx for styling purposes in styles.css.
- Loading branch information
Showing
6 changed files
with
100 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ const preview: Preview = { | |
{ name: 'light', value: '#fff' }, | ||
], | ||
}, | ||
layout: 'centered', | ||
}, | ||
}; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import React from 'react'; | ||
import Image from 'next/image'; | ||
|
||
const sponsorsArray = [ | ||
{ | ||
name: 'Appwrite', | ||
logo: '/stories/assets/appwriteLogo.svg', | ||
website: '#', | ||
}, | ||
{ | ||
name: 'Blog Recorder', | ||
logoPath: '/assets/blogRecorderLogo.svg', | ||
website: '#', | ||
}, | ||
{ | ||
name: 'Frontend Mentor', | ||
logoPath: './assets/frontendMentorLogo.svg', | ||
website: '#', | ||
}, | ||
{ | ||
name: 'GitKraken', | ||
logoPath: './assets/gitkrakenLogo.svg', | ||
website: '#', | ||
}, | ||
{ | ||
name: 'Pastel', | ||
logoPath: './assets/pastelLogo.svg', | ||
website: '#', | ||
}, | ||
].sort((a, b) => a.name.localeCompare(b.name)); | ||
|
||
interface SponsorProps { | ||
name: string; | ||
logoPath: string; | ||
website: string; | ||
} | ||
|
||
const Sponsor = ({ name, logoPath, website }) => ( | ||
<a | ||
href={website} | ||
target="_blank" | ||
rel="noreferrer" | ||
className="flex flex-col items-center p-4 m-2 hover:shadow-lg transition-shadow duration-300" | ||
> | ||
<Image | ||
src={logoPath} | ||
alt={`${name} logo`} | ||
width={100} | ||
height={100} | ||
objectFit="contain" | ||
/> | ||
<h6 className="mt-2 text-center font-semibold">{name}</h6> | ||
</a> | ||
); | ||
|
||
const Sponsors = () => ( | ||
<div className="sponsors-container grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4"> | ||
{sponsorsArray.map((sponsor) => ( | ||
<Sponsor | ||
key={sponsor.name} | ||
name={sponsor.name} | ||
logo={sponsor.logo} | ||
website={sponsor.website} | ||
/> | ||
))} | ||
</div> | ||
); | ||
|
||
export default Sponsors; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters