Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export type SponsorTicketProps = {
isSponsorUs?: boolean;
logoPath?: string;
ticketWidthVw?: number;
logoScale?: number;
};

/**
Expand All @@ -21,21 +22,39 @@ export default function SponsorTicketComp({
isSponsorUs = false,
logoPath,
ticketWidthVW = 20,
logoScale = 1,
}: SponsorTicketProps & { ticketWidthVW?: number }): JSX.Element {

return (
<div
className="flex items-center justify-center relative"
style={{ width: `${ticketWidthVW}vw`, height: "auto" }}
>
{logoPath && (
<Image
width={100}
height={100}
alt="image of ticket sponsor"
src={logoPath}
className="absolute z-10"
/>
<div
className="absolute z-10 flex items-center justify-center overflow-hidden"
style={{
inset: 0,
}}
>
<div
className="flex items-center justify-center"
style={{
width: "60%",
height: "45%",
transform: `scale(${logoScale})`,
transformOrigin: "center",
}}
>
<Image
fill
alt="image of ticket sponsor"
src={logoPath}
style={{ objectFit: "contain" }}
sizes="(max-width: 768px) 60vw, 20vw"
priority={false}
/>
</div>
</div>
)}

{isSponsorUs ? (
Expand Down
78 changes: 50 additions & 28 deletions apps/main/src/app/sponsor-us/Sections/PastSponsors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,45 @@ import YelpLogo from "../../lib/Assets/SVG/SponsorUsAssets/Logos/yelp.svg";
import VMwareLogo from "../../lib/Assets/SVG/SponsorUsAssets/Logos/vmware.svg";
import ToastLogo from "../../lib/Assets/SVG/SponsorUsAssets/Logos/toast.svg";

const desktopRows: string[][] = [
[GoogleLogo, CarGurusLogo, MetaLogo, DatadogLogo],
[SimplisafeLogo, WoodMacLogo, YelpLogo],
[VMwareLogo, ToastLogo],
type LogoItem = { logoPath: string; logoScale?: number };

const desktopRows: LogoItem[][] = [
[
{ logoPath: GoogleLogo },
{ logoPath: CarGurusLogo },
{ logoPath: MetaLogo },
{ logoPath: DatadogLogo, logoScale: 1.2 },
],
[
{ logoPath: SimplisafeLogo },
{ logoPath: WoodMacLogo },
{ logoPath: YelpLogo },
],
[{ logoPath: VMwareLogo }, { logoPath: ToastLogo, logoScale: 1.2 }],
];

const tabletRows: string[][] = [
[GoogleLogo, CarGurusLogo],
[MetaLogo, DatadogLogo],
[SimplisafeLogo, WoodMacLogo],
[YelpLogo, VMwareLogo],
[ToastLogo],
const tabletRows: LogoItem[][] = [
[{ logoPath: GoogleLogo }, { logoPath: CarGurusLogo }],
[{ logoPath: MetaLogo }, { logoPath: DatadogLogo, logoScale: 1.2 }],
[{ logoPath: SimplisafeLogo }, { logoPath: WoodMacLogo }],
[{ logoPath: YelpLogo }, { logoPath: VMwareLogo }],
[{ logoPath: ToastLogo, logoScale: 1.2 }],
];

const mobileRows: string[][] = [
[GoogleLogo],
[CarGurusLogo],
[MetaLogo],
[DatadogLogo],
[SimplisafeLogo],
[WoodMacLogo],
[YelpLogo],
[VMwareLogo],
[ToastLogo],
const mobileRows: LogoItem[][] = [
[{ logoPath: GoogleLogo }],
[{ logoPath: CarGurusLogo }],
[{ logoPath: MetaLogo }],
[{ logoPath: DatadogLogo, logoScale: 1.2 }],
[{ logoPath: SimplisafeLogo }],
[{ logoPath: WoodMacLogo }],
[{ logoPath: YelpLogo }],
[{ logoPath: VMwareLogo }],
[{ logoPath: ToastLogo, logoScale: 1.2 }],
];

// generate single row of tickets
function makeSponsorRow(ticketWidthVW: number, logos: string[]) {
function makeSponsorRow(ticketWidthVW: number, logos: LogoItem[]) {
return (
<div
className="flex justify-center"
Expand All @@ -54,9 +65,10 @@ function makeSponsorRow(ticketWidthVW: number, logos: string[]) {
{logos.map((logo, i) => (
<SponsorTicketComp
key={i}
logoPath={logo}
logoPath={logo.logoPath}
isSponsorUs={false}
ticketWidthVW={ticketWidthVW}
logoScale={logo.logoScale ?? 1}
/>
))}
</div>
Expand All @@ -71,12 +83,14 @@ export default function PastSponsors(): JSX.Element {
const boothWidth = isMobile ? 90 : isTablet ? 80 : 70;

const ribbonStyles = clsx(
"w-1/2 flex justify-center",
isMobile && "mt-12 mb-6",
isTablet && "mt-16 mb-6",
isDesktop && "mt-20 mb-6"
"flex justify-center",
isMobile && "w-[60%] mt-10 mb-8",
isTablet && "w-[50%] mt-14 mb-8",
isDesktop && "w-1/2 mt-20 mb-12"
);

const ribbonScale = isMobile ? 0.6 : isTablet ? 0.8 : 1;

return (
<div className="relative w-full">
{/* Background burst */}
Expand All @@ -93,10 +107,18 @@ export default function PastSponsors(): JSX.Element {
{/* Content overlay */}
<div
className="absolute top-0 left-0 w-full flex flex-col items-center text-white"
style={{ paddingTop: "12vw", gap: "5vw" }}
style={{ paddingTop: "3vw", gap: "3vw" }}
>
<div className={ribbonStyles}>
<RibbonTitle text="Past Sponsors" />
<div
className="w-fit"
style={{
transform: `scale(${ribbonScale})`,
transformOrigin: "top center",
}}
>
<RibbonTitle text="PAST SPONSORS" />
</div>
</div>

{/* Ticket Rows */}
Expand Down