-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: added sponsor section * fix: styling issues in sponser section * chore: wrap in section layout --------- Co-authored-by: Ashish Padhy <100484401+Shurtu-gal@users.noreply.github.com>
- Loading branch information
1 parent
0f0f846
commit 7b08e60
Showing
6 changed files
with
220 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
export default { | ||
title: 'Sponsors', | ||
footer: 'Want to sponsor us? Email us at dummy@gmail.com', | ||
link: 'mailto:dummy@gmail.com', | ||
id: 'sponsors', | ||
|
||
titleSponsor: [ | ||
{ | ||
id: 1, | ||
logo: 'https://res.cloudinary.com/dme9vltjf/image/upload/v1696249159/image_9_rxhiki.png', | ||
alt: 'MLH', | ||
link: 'inno.nitrkl.in', | ||
color: '#FFB8FF', | ||
}, | ||
], | ||
|
||
sponsors: [ | ||
{ | ||
id: 1, | ||
logo: 'https://res.cloudinary.com/dme9vltjf/image/upload/v1696249159/image_10_cutge9.png', | ||
alt: 'Polygon', | ||
type: 'Associate Sponsor', | ||
link: 'inno.nitrkl.in', | ||
color: '#5CFFA7', | ||
}, | ||
{ | ||
id: 2, | ||
logo: 'https://res.cloudinary.com/dme9vltjf/image/upload/v1696249159/image_20_qn6b1d.png', | ||
alt: 'Quine', | ||
type: 'Media Sponsor', | ||
link: 'inno.nitrkl.in', | ||
color: '#E85CFF', | ||
}, | ||
{ | ||
id: 3, | ||
logo: 'https://res.cloudinary.com/dme9vltjf/image/upload/v1696249159/image_20_qn6b1d.png', | ||
alt: 'Quine', | ||
type: 'Refreshments Sponsor', | ||
link: 'inno.nitrkl.in', | ||
color: '#5C9DFF', | ||
}, | ||
{ | ||
id: 4, | ||
logo: 'https://res.cloudinary.com/dme9vltjf/image/upload/v1696249159/image_10_cutge9.png', | ||
alt: 'Polygon', | ||
type: 'Associate Sponsor', | ||
link: 'inno.nitrkl.in', | ||
color: '#5CFFA7', | ||
}, | ||
{ | ||
id: 5, | ||
logo: 'https://res.cloudinary.com/dme9vltjf/image/upload/v1696249159/image_20_qn6b1d.png', | ||
alt: 'Quine', | ||
type: 'Media Sponsor', | ||
link: 'inno.nitrkl.in', | ||
color: '#E85CFF', | ||
}, | ||
{ | ||
id: 6, | ||
logo: 'https://res.cloudinary.com/dme9vltjf/image/upload/v1696249159/image_20_qn6b1d.png', | ||
alt: 'Quine', | ||
type: 'Refreshments Sponsor', | ||
link: 'inno.nitrkl.in', | ||
color: '#5C9DFF', | ||
}, | ||
], | ||
}; |
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,42 @@ | ||
import React from 'react'; | ||
import { | ||
SponsorContainer, | ||
SponsorLogo, | ||
SponsorSectionContainer, | ||
SponsorText, | ||
SponsorWrapper, | ||
TitleSponsorContainer, | ||
TitleSponsorLogo, | ||
TitleSponsorWrapper, | ||
} from './styles'; | ||
import SectionLayout from '../shared/SectionLayout'; | ||
import { _sponsor } from '../../../config/content'; | ||
|
||
const { titleSponsor, sponsors, title, link: footerLink, footer, id: sectionId } = _sponsor; | ||
const SponsorSection = () => ( | ||
<SectionLayout title={title} footer={footer} footerLink={footerLink} id={sectionId}> | ||
<SponsorSectionContainer> | ||
<TitleSponsorWrapper> | ||
{titleSponsor.map(({ id, logo, alt, link, color }) => ( | ||
<TitleSponsorContainer key={id}> | ||
<a href={link} target='_blank noopener noreferer'> | ||
<TitleSponsorLogo src={logo} alt={alt} /> | ||
</a> | ||
<SponsorText color={color}>Title Sponsor</SponsorText> | ||
</TitleSponsorContainer> | ||
))} | ||
</TitleSponsorWrapper> | ||
<SponsorWrapper> | ||
{sponsors.map(({ id, logo, alt, link, type, color }) => ( | ||
<SponsorContainer key={id}> | ||
<a href={link} target='_blank noopener noreferer'> | ||
<SponsorLogo src={logo} alt={alt} /> | ||
</a> | ||
<SponsorText color={color}>{type}</SponsorText> | ||
</SponsorContainer> | ||
))} | ||
</SponsorWrapper> | ||
</SponsorSectionContainer> | ||
</SectionLayout> | ||
); | ||
export default SponsorSection; |
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,105 @@ | ||
import styled from 'styled-components'; | ||
import tw from 'twin.macro'; | ||
|
||
export const SponsorSectionContainer = styled.div` | ||
${tw` | ||
flex | ||
flex-col | ||
w-[90%] | ||
mx-auto | ||
`} | ||
`; | ||
|
||
export const TitleSponsorWrapper = styled.div` | ||
${tw` | ||
flex | ||
justify-around | ||
`} | ||
`; | ||
|
||
export const TitleSponsorContainer = styled.div` | ||
${tw` | ||
flex | ||
flex-col | ||
gap-[32px] | ||
text-center | ||
w-[320px] | ||
`} | ||
@media (max-width: 1100px) { | ||
width: 240px; | ||
gap: 16px; | ||
} | ||
`; | ||
|
||
export const TitleSponsorLogo = styled.img` | ||
${tw` | ||
w-full | ||
my-auto | ||
`} | ||
`; | ||
export const SponsorText = styled.p` | ||
color: ${(props) => props.color || '#D0D0D0'}; | ||
font-family: | ||
Noto Sans, | ||
sans-serif; | ||
font-size: 24px; | ||
font-style: normal; | ||
font-weight: 600; | ||
width: 100%; | ||
@media (max-width: 1100px) { | ||
text-align: center; | ||
font-size: 16px; | ||
} | ||
`; | ||
|
||
export const SponsorWrapper = styled.div` | ||
${tw` | ||
grid | ||
grid-cols-3 | ||
gap-[79px] | ||
`} | ||
row-gap: 42px; | ||
@media (max-width: 1100px) { | ||
grid-template-columns: repeat(2, 1fr); | ||
gap: 42px; | ||
justify-content: space-between; | ||
row-gap: 32px; | ||
} | ||
@media (max-width: 280px) { | ||
grid-template-columns: repeat(1, 1fr); | ||
gap: 32px; | ||
justify-content: space-between; | ||
} | ||
`; | ||
|
||
export const SponsorContainer = styled.div` | ||
${tw` | ||
flex | ||
flex-col | ||
gap-[32px] | ||
text-center | ||
w-[320px] | ||
col-span-1 | ||
mx-auto | ||
items-center | ||
mt-[42px] | ||
`} | ||
@media (max-width: 780px) { | ||
width: 240px; | ||
margin-top: 32px; | ||
gap: 6px; | ||
} | ||
@media (max-width: 580px) { | ||
width: 120px; | ||
margin-top: 32px; | ||
} | ||
`; | ||
|
||
export const SponsorLogo = styled.img` | ||
${tw` | ||
w-full | ||
my-auto | ||
`} | ||
`; |
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