Skip to content

Commit 45d73a8

Browse files
committed
fix spacing
1 parent da5810b commit 45d73a8

File tree

2 files changed

+69
-41
lines changed

2 files changed

+69
-41
lines changed

apps/main/src/app/lib/Components/SponsorComponents/SponsorTicketComp.tsx

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,40 @@ export default function SponsorTicketComp({
2222
isSponsorUs = false,
2323
logoPath,
2424
ticketWidthVW = 20,
25+
logoScale = 1,
2526
}: SponsorTicketProps & { ticketWidthVW?: number }): JSX.Element {
2627
return (
2728
<div
2829
className="flex items-center justify-center relative"
2930
style={{ width: `${ticketWidthVW}vw`, height: "auto" }}
3031
>
32+
3133
{logoPath && (
32-
<Image
33-
width={100}
34-
height={100}
35-
alt="image of ticket sponsor"
36-
src={logoPath}
37-
className="absolute z-10"
38-
/>
34+
<div
35+
className="absolute z-10 flex items-center justify-center overflow-hidden"
36+
style={{
37+
inset: 0,
38+
}}
39+
>
40+
<div
41+
className="flex items-center justify-center"
42+
style={{
43+
width: "60%",
44+
height: "45%",
45+
transform: `scale(${logoScale})`,
46+
transformOrigin: "center",
47+
}}
48+
>
49+
<Image
50+
fill
51+
alt="image of ticket sponsor"
52+
src={logoPath}
53+
style={{ objectFit: "contain" }}
54+
sizes="(max-width: 768px) 60vw, 20vw"
55+
priority={false}
56+
/>
57+
</div>
58+
</div>
3959
)}
4060

4161
{isSponsorUs ? (

apps/main/src/app/sponsor-us/Sections/PastSponsors.tsx

Lines changed: 42 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,39 +18,45 @@ import YelpLogo from "../../lib/Assets/SVG/SponsorUsAssets/Logos/yelp.svg";
1818
import VMwareLogo from "../../lib/Assets/SVG/SponsorUsAssets/Logos/vmware.svg";
1919
import ToastLogo from "../../lib/Assets/SVG/SponsorUsAssets/Logos/toast.svg";
2020

21-
const logoScaleMap: Record<string, number> = {
22-
[DatadogLogo]: 0.6,
23-
[ToastLogo]: 0.6,
24-
};
25-
26-
const desktopRows: string[][] = [
27-
[GoogleLogo, CarGurusLogo, MetaLogo, DatadogLogo],
28-
[SimplisafeLogo, WoodMacLogo, YelpLogo],
29-
[VMwareLogo, ToastLogo],
21+
type LogoItem = { logoPath: string; logoScale?: number };
22+
23+
const desktopRows: LogoItem[][] = [
24+
[
25+
{ logoPath: GoogleLogo },
26+
{ logoPath: CarGurusLogo },
27+
{ logoPath: MetaLogo },
28+
{ logoPath: DatadogLogo, logoScale: 1.2 },
29+
],
30+
[
31+
{ logoPath: SimplisafeLogo },
32+
{ logoPath: WoodMacLogo },
33+
{ logoPath: YelpLogo },
34+
],
35+
[{ logoPath: VMwareLogo }, { logoPath: ToastLogo, logoScale: 1.2 }],
3036
];
3137

32-
const tabletRows: string[][] = [
33-
[GoogleLogo, CarGurusLogo],
34-
[MetaLogo, DatadogLogo],
35-
[SimplisafeLogo, WoodMacLogo],
36-
[YelpLogo, VMwareLogo],
37-
[ToastLogo],
38+
const tabletRows: LogoItem[][] = [
39+
[{ logoPath: GoogleLogo }, { logoPath: CarGurusLogo }],
40+
[{ logoPath: MetaLogo }, { logoPath: DatadogLogo, logoScale: 1.2 }],
41+
[{ logoPath: SimplisafeLogo }, { logoPath: WoodMacLogo }],
42+
[{ logoPath: YelpLogo }, { logoPath: VMwareLogo }],
43+
[{ logoPath: ToastLogo, logoScale: 1.2 }],
3844
];
3945

40-
const mobileRows: string[][] = [
41-
[GoogleLogo],
42-
[CarGurusLogo],
43-
[MetaLogo],
44-
[DatadogLogo],
45-
[SimplisafeLogo],
46-
[WoodMacLogo],
47-
[YelpLogo],
48-
[VMwareLogo],
49-
[ToastLogo],
46+
const mobileRows: LogoItem[][] = [
47+
[{ logoPath: GoogleLogo }],
48+
[{ logoPath: CarGurusLogo }],
49+
[{ logoPath: MetaLogo }],
50+
[{ logoPath: DatadogLogo, logoScale: 1.2 }],
51+
[{ logoPath: SimplisafeLogo }],
52+
[{ logoPath: WoodMacLogo }],
53+
[{ logoPath: YelpLogo }],
54+
[{ logoPath: VMwareLogo }],
55+
[{ logoPath: ToastLogo, logoScale: 1.2 }],
5056
];
5157

5258
// generate single row of tickets
53-
function makeSponsorRow(ticketWidthVW: number, logos: string[]) {
59+
function makeSponsorRow(ticketWidthVW: number, logos: LogoItem[]) {
5460
return (
5561
<div
5662
className="flex justify-center"
@@ -59,10 +65,10 @@ function makeSponsorRow(ticketWidthVW: number, logos: string[]) {
5965
{logos.map((logo, i) => (
6066
<SponsorTicketComp
6167
key={i}
62-
logoPath={logo}
68+
logoPath={logo.logoPath}
6369
isSponsorUs={false}
6470
ticketWidthVW={ticketWidthVW}
65-
logoScale={logoScaleMap[logo] ?? 1}
71+
logoScale={logo.logoScale ?? 1}
6672
/>
6773
))}
6874
</div>
@@ -77,10 +83,10 @@ export default function PastSponsors(): JSX.Element {
7783
const boothWidth = isMobile ? 90 : isTablet ? 80 : 70;
7884

7985
const ribbonStyles = clsx(
80-
"w-1/2 flex justify-center",
81-
isMobile && "mt-12 mb-6",
82-
isTablet && "mt-16 mb-6",
83-
isDesktop && "mt-20 mb-6",
86+
"w-full flex justify-center",
87+
isMobile && "mt-36 mb-10",
88+
isTablet && "mt-48 mb-8",
89+
isDesktop && "mt-64 mb-12"
8490
);
8591

8692
return (
@@ -99,10 +105,12 @@ export default function PastSponsors(): JSX.Element {
99105
{/* Content overlay */}
100106
<div
101107
className="absolute top-0 left-0 w-full flex flex-col items-center text-white"
102-
style={{ paddingTop: "12vw", gap: "5vw" }}
108+
style={{ gap: "3vw" }}
103109
>
104110
<div className={ribbonStyles}>
105-
<RibbonTitle text="Past Sponsors" />
111+
<div className="w-full max-w-[720px] flex justify-center">
112+
<RibbonTitle text="PAST SPONSORS" />
113+
</div>
106114
</div>
107115

108116
{/* Ticket Rows */}

0 commit comments

Comments
 (0)