-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from drumst0ck/main
Troubleshoot warnings, deprecated code and Sponsors animation
- Loading branch information
Showing
5 changed files
with
172 additions
and
69 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 |
---|---|---|
@@ -1,44 +1,58 @@ | ||
import Image from "next/image"; | ||
import React from 'react'; | ||
import Image from 'next/image'; | ||
|
||
interface SponsorImage { | ||
src: string; | ||
alt: string; | ||
} | ||
|
||
interface MarqueeProps { | ||
sponsors: SponsorImage[]; | ||
speed?: number; | ||
direction?: 'left' | 'right'; | ||
} | ||
|
||
const Marquee: React.FC<MarqueeProps> = ({ | ||
sponsors, | ||
speed = 50, | ||
direction = 'left' | ||
}) => { | ||
return ( | ||
<div className="marquee-container"> | ||
<div | ||
className={`marquee ${direction}`} | ||
style={{ '--speed': `${speed}s` } as React.CSSProperties} | ||
> | ||
{[...sponsors, ...sponsors].map((sponsor, index) => ( | ||
<div key={index} className="marquee-item"> | ||
<Image | ||
src={sponsor.src} | ||
alt={sponsor.alt} | ||
width={200} | ||
height={200} | ||
/> | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export const Sponsors: React.FC = () => { | ||
const sponsors: SponsorImage[] = [ | ||
{ src: "/imgs/afordin-sponsor.png", alt: "afordin-logo-sponsor" }, | ||
{ src: "/imgs/afordin-sponsor.png", alt: "afordin-logo-sponsor" }, | ||
{ src: "/imgs/afordin-sponsor.png", alt: "afordin-logo-sponsor" }, | ||
{ src: "/imgs/afordin-sponsor.png", alt: "afordin-logo-sponsor" }, | ||
{ src: "/imgs/afordin-sponsor.png", alt: "afordin-logo-sponsor" }, | ||
]; | ||
|
||
export const Sponsors = () => { | ||
return ( | ||
<section className="w-full justify-center pb-[72px] mx-auto max-w-6xl flex flex-col gap-6"> | ||
<section className="w-full pb-[72px] mx-auto max-w-6xl flex flex-col gap-6 overflow-hidden"> | ||
<p className="text-2xl text-center font-bold bg-clip-text text-transparent bg-gradient-to-br from-caPrimary-500 to-caSecondary-500"> | ||
Evento sponsorizado gracias a | ||
</p> | ||
<div | ||
className="flex flex-col sm:flex-row justify-around items-center gap-12 [mask-image:linear-gradient(to_left,_transparent_0%,_black_20%,_black_80%,_transparent_95%)] [&>*]:animate-logo-cloud"> | ||
<Image | ||
src="/imgs/afordin-sponsor.png" | ||
alt="afordin-logo-sponsor" | ||
width="200" | ||
height="200" | ||
/> | ||
<Image | ||
src="/imgs/afordin-sponsor.png" | ||
alt="afordin-logo-sponsor" | ||
width="200" | ||
height="200" | ||
/> | ||
<Image | ||
src="/imgs/afordin-sponsor.png" | ||
alt="afordin-logo-sponsor" | ||
width="200" | ||
height="200" | ||
/> | ||
<Image | ||
src="/imgs/afordin-sponsor.png" | ||
alt="afordin-logo-sponsor" | ||
width="200" | ||
height="200" | ||
/> | ||
<Image | ||
src="/imgs/afordin-sponsor.png" | ||
alt="afordin-logo-sponsor" | ||
width="200" | ||
height="200" | ||
/> | ||
</div> | ||
<Marquee sponsors={sponsors} speed={30} direction="left" /> | ||
</section> | ||
); | ||
}; | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
images: { | ||
domains: ['cdn.discordapp.com'], | ||
}, | ||
images: { | ||
remotePatterns: [ | ||
{ | ||
protocol: "https", | ||
hostname: "cdn.discordapp.com", | ||
}, | ||
{ | ||
protocol: "https", | ||
hostname: "cdn.jsdelivr.net", | ||
}, | ||
], | ||
}, | ||
}; | ||
|
||
export default nextConfig; |