Skip to content

Commit 7ccbe48

Browse files
committed
Update sponsors social cards
1 parent 54b295d commit 7ccbe48

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

public/social/bg5.png

421 KB
Loading

src/components/SocialMediaSponsorCard.astro

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,26 @@ import { sponsorLogos } from "@data/sponsorLogos";
44
const { sponsor } = Astro.props;
55
const {
66
name: title,
7+
tier,
78
logo_padding = false,
89
} = sponsor.data;
910
1011
const logo = sponsorLogos[sponsor.id];
1112
13+
const tiers = [
14+
"Keystone",
15+
"Diamond",
16+
"Platinum",
17+
"Platinum X",
18+
"Gold",
19+
"Silver",
20+
"Bronze",
21+
"Patron",
22+
] as const;
23+
24+
const bg_url = tiers.includes(tier)? '/social/bg4.png' : '/social/bg5.png';
25+
26+
1227
// Function to parse CSS padding values
1328
function parsePadding(paddingStr: string) {
1429
if (!paddingStr || paddingStr === "0") {
@@ -65,7 +80,7 @@ const y = 650 - (height + padding.top + padding.bottom) / 2 + padding.top;
6580
---
6681

6782
<svg class="bg" width="900" height="900" class="h-full w-full -z-10">
68-
<image href="/social/bg4.png" width="900" height="900" />
83+
<image href={bg_url} width="900" height="900" />
6984
</svg>
7085

7186
<svg class="sponsor-logo" width="900" height="900">

0 commit comments

Comments
 (0)