Skip to content

Commit

Permalink
feat: Add sponsors section
Browse files Browse the repository at this point in the history
  • Loading branch information
swaindhruti committed Aug 3, 2024
1 parent 9644e3b commit 9aaff9b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
13 changes: 9 additions & 4 deletions src/components/sponsors/sponsors.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import { Icon, SponsorsContainer, IconContainer, SponsorsSectionHeading } from './sponsors.styles'
import Marquee from 'react-fast-marquee'
import {
Icon,
SponsorsContainer,
IconContainer,
SponsorsSectionHeading,
InnerSponsorsContainer
} from './sponsors.styles'
import { SponsorsData } from '../../config/index'

export const Sponsors = () => {
return (
<SponsorsContainer id="sponsors">
<SponsorsSectionHeading>Sponsors</SponsorsSectionHeading>
<Marquee speed={30} direction="right">
<InnerSponsorsContainer>
{SponsorsData.map((data, index) => (
<IconContainer key={index}>
<Icon key={index} style={data.styles} src={data.url} />
</IconContainer>
))}
</Marquee>
</InnerSponsorsContainer>
</SponsorsContainer>
)
}
8 changes: 6 additions & 2 deletions src/components/sponsors/sponsors.styles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import tw from 'twin.macro'
import styled from 'styled-components'

export const SponsorsContainer = styled.div`
${tw`bg-brown-2 pt-[70px] `}
${tw`bg-brown-2 pt-[45px] `}
`

export const IconContainer = styled.span(({ style }) => ({
Expand All @@ -13,6 +13,10 @@ export const Icon = styled.img(({ src, style }) => ({
...style
}))

export const InnerSponsorsContainer = styled.div`
${tw` flex flex-row justify-center items-center flex-wrap`}
`

export const SponsorsSectionHeading = styled.h1`
${tw`font-Poppins text-brown-4 text-4.5xl font-bold 3md:text-9xl 2.5md:text-7.5xl 0.7xsm:text-6xl pl-3`}
${tw`font-Poppins text-brown-4 text-4.5xl font-bold 3md:text-8.5xl 2.5md:text-7.5xl 0.7xsm:text-6xl pl-3`}
`
24 changes: 6 additions & 18 deletions src/config/content/sponsorsData/sponsors.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,15 @@ import tw from 'twin.macro'

export default [
{
styles: tw`max-md:m-[70px] md:w-[220px] md:h-[40px] md:m-[110px] `,
url: 'https://res.cloudinary.com/dfe8sdlkc/image/upload/v1717761140/Logo_jc3ia8.png'
styles: tw`max-md:m-[70px] md:w-[320px] md:h-[280px] md:m-[50px] `,
url: 'https://res.cloudinary.com/dhv234qct/image/upload/v1722718317/AICHE_SRC/sponsors/sp2_foynsk.png'
},
{
styles: tw`max-md:m-[70px] md:w-[202px] md:h-[40px] md:m-[110px] `,
url: 'https://res.cloudinary.com/dfe8sdlkc/image/upload/v1717761140/Logo-1_vqmsdg.png'
styles: tw`max-md:m-[70px] md:w-[200px] md:h-[180px] md:m-[110px] `,
url: 'https://res.cloudinary.com/dhv234qct/image/upload/v1722718332/AICHE_SRC/sponsors/sp-2_uhuiyl.jpg'
},
{
styles: tw`max-md:m-[70px] md:w-[100px] md:h-[38px] md:m-[110px] `,
url: 'https://res.cloudinary.com/dfe8sdlkc/image/upload/v1717761140/Logo-2_wzvo0w.png'
},
{
styles: tw`max-md:m-[70px] md:w-[80px] md:h-[80px] md:m-[110px] `,
url: 'https://res.cloudinary.com/dfe8sdlkc/image/upload/v1717761140/Logo-3_qxz0na.png'
},
{
styles: tw`max-md:m-[70px] md:w-[180px] md:h-[40px] md:m-[110px] `,
url: 'https://res.cloudinary.com/dfe8sdlkc/image/upload/v1717761141/Logo-4_yvqmg4.png'
},
{
styles: tw`max-md:m-[70px] md:w-[120px] md:h-[40px] md:m-[110px] `,
url: 'https://res.cloudinary.com/dfe8sdlkc/image/upload/v1717761144/Logo-5_fnneio.png'
styles: tw`max-md:m-[70px] md:w-[220px] md:h-[180px] md:m-[110px] `,
url: 'https://res.cloudinary.com/dhv234qct/image/upload/v1722718316/AICHE_SRC/sponsors/sp1_gwaalr.jpg'
}
]
2 changes: 2 additions & 0 deletions src/pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Footer from '../components/marginals/footer/Footer'
import { Faq } from '../components/faq/faq'
import { Leads } from '../components/leads/leads'
import { Schedule } from '../components/schedule/schedule'
import { Sponsors } from '../components/sponsors/sponsors'

const Home = () => {
return (
Expand All @@ -16,6 +17,7 @@ const Home = () => {
<Schedule />
<Leads />
<TeamCarousel />
<Sponsors />
<Faq />
<Footer />
</div>
Expand Down

0 comments on commit 9aaff9b

Please sign in to comment.