Skip to content
Merged
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
8 changes: 6 additions & 2 deletions src/components/SponsorLogo.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { getEntry } from "astro:content";
import { Image } from "astro:assets";
import { sponsorLogos } from "@data/sponsorLogos";
const { sponsor: sponsorId } = Astro.props;
const { sponsor: sponsorId, special_event=false } = Astro.props;
const sponsor = await getEntry("sponsors", sponsorId);
Expand All @@ -16,6 +16,7 @@ const {
name: title,
url: website,
tier,
event_name,
logo_padding = false,
} = sponsor.data;
Expand All @@ -27,7 +28,7 @@ const slug = tier==="Partners"? `/community-partners#sponsor-${sponsorId}`: tier
<div
class="lg:max-w-[400px] flex flex-col p-6 bg-white"
>
<div class="w-full flex justify-center items-center md:items-center">
<div class="w-full grid text-center justify-center items-center md:items-center">
{
website && slug ? (

Expand Down Expand Up @@ -56,5 +57,8 @@ const slug = tier==="Partners"? `/community-partners#sponsor-${sponsorId}`: tier
}}
/>
}
{ special_event && event_name &&
<span class="">{event_name}</span>
}
</div>
</div>
9 changes: 5 additions & 4 deletions src/components/sections/sponsors/sponsor-tier.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface Props {
}
const { tier, level = 2} = Astro.props;
const special_event = tier.name === "Special Event";
---

<div class="relative">
Expand All @@ -30,15 +31,15 @@ const { tier, level = 2} = Astro.props;
`level-${level}`,
{
"grid-cols-1 md:grid-cols-2 m-20 [&>*]:scale-110": level===0,
"grid-cols-1 md:grid-cols-2 lg:grid-cols-3 [&>*]:scale-90": level > 0 && level << 6,
"grid-cols-2 md:grid-cols-3 lg:grid-cols-4 [&>*]:scale-90" : level===6,
"grid-cols-2 md:grid-cols-3 lg:grid-cols-4 [&>*]:scale-85" : level>6,
"grid-cols-1 md:grid-cols-2 lg:grid-cols-3 [&>*]:scale-90": level > 0 && level < 6,
"grid-cols-2 md:grid-cols-3 lg:grid-cols-4 [&>*]:scale-70" : level >= 6 && level < 7,
"grid-cols-2 md:grid-cols-3 lg:grid-cols-4 [&>*]:scale-85" : level >= 7,
},
]}
>
{
tier.sponsors.map((sponsor) => (
<SponsorLogo sponsor={sponsor.id} />
<SponsorLogo sponsor={sponsor.id} {special_event} />
))
}
</div>
Expand Down
21 changes: 17 additions & 4 deletions src/components/sections/sponsors/sponsors.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const tiers = [
"Startups",
"Bronze",
"Patron",
"Special Event",
"Financial Aid",
"Supporters",
"Partners",
Expand All @@ -29,9 +30,21 @@ let hasSponsors = false;

const sponsorTiers = tiers
.map((tier) => {
const tierSponsors = sponsors.filter(
(sponsor) => sponsor.data.tier === tier,
);
const tierSponsors = sponsors.filter((sponsor) => {
// Original tier matching
if (sponsor.data.tier === tier) {
return true;
}

// Also include in "Special Event" if sponsor has event_name
if (tier === "Special Event" &&
sponsor.data.event_name &&
sponsor.data.event_name.trim() !== "") {
return true;
}

return false;
});

if (tierSponsors.length > 0) {
hasSponsors = true;
Expand Down Expand Up @@ -77,7 +90,7 @@ const sponsorTiers = tiers
{
sponsorTiers.map((tier, index) => (
<Fragment>
<SponsorTier tier={tier} level={index} />
<SponsorTier tier={tier} level={index} />
{index !== sponsorTiers.length - 1 && <hr />}
</Fragment>
))
Expand Down
1 change: 1 addition & 0 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ const sponsors = defineCollection({
youtube: z.string().url().optional().nullable(),
})
.optional(),
event_name: z.string().optional().nullable(),
logo_padding: z.string().optional(),
draft: z.boolean().optional().default(false),
jobs: z.array(reference("jobs")).optional().default([]),
Expand Down
1 change: 1 addition & 0 deletions src/content/sponsors/anaconda/anaconda.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions src/content/sponsors/anaconda/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Anaconda
url: https://www.anaconda.com
description:
"Anaconda is built to advance AI with open source at scale, giving builders
and organizations the confidence to increase productivity, and save time,
spend and risk associated with open source. "
socials:
linkedin: "https://www.linkedin.com/company/anacondainc"
twitter: "https://x.com/anacondainc"
github: "https://github.com/ContinuumIO"
discord: "https://discord.com/invite/3zWZbsEx7A"
mastodon:
bluesky:
facebook: "https://www.facebook.com/anacondainc"
instagram: "https://www.instagram.com/anaconda_inc/"
youtube: "https://www.youtube.com/c/ContinuumIo"
tier: Bronze
event_name: Open Space & Sprint
logo_padding: "10px 0"
---