Skip to content
Closed
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
16 changes: 14 additions & 2 deletions src/components/sections/sponsors/sponsors.astro
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ const tiers = [
"Startups",
"Bronze",
"Patron",
"Sprint",
"Financial Aid",
"Supporters",
"Open Space",
Comment on lines +20 to +22
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe to have one category Events Sponsors or Activities Sponsors and inside of it to have Sprints and Open Space and under both to have their logo? Wdyt?

Also cc @nikoshell for opinions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we explicitly agreed with sponsors to be listed as an open space or sprint sponsor, and that was also the brief I got, so though I liked the idea aesthetically, it might not work out this year.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry! I completely misread your message. So you want a nested tiers? That would work too but not sure how it should look like. Happy for Marcin to take over.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay! that's okay for me then :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I meant nested tiers like this
image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe to have one category Events Sponsors or Activities Sponsors and inside of it to have Sprints and Open Space and under both to have their logo? Wdyt?

Also cc @nikoshell for opinions.

From my perspective Open Space and Sprints are not tiers, both also have or will have dedicated page where we can mention sponsors with their logos.

I also don't remember any event that duplicate logos in sponsors section.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of having it only on respective pages! That's how we had Kraken last year for PyLadies lunch. I'm not sure if there wasn't any other deal with Anaconda, so maybe this is a question for the requestor of the feature-- @artcz if you're okay with having it on pages only?

"Supporters",
"Partners",
"Media Partners"
] as const;
Expand All @@ -27,10 +29,20 @@ const sponsors = await getCollection("sponsors");

let hasSponsors = false;

function getSponsorTiers(sponsor) {
if (typeof sponsor.data.tier === 'string') {
return sponsor.data.tier.split(',').map(tier => tier.trim());
}
return Array.isArray(sponsor.data.tier) ? sponsor.data.tier : [sponsor.data.tier];
}

const sponsorTiers = tiers
.map((tier) => {
const tierSponsors = sponsors.filter(
(sponsor) => sponsor.data.tier === tier,
(sponsor) => {
const sponsorTiers = getSponsorTiers(sponsor);
return sponsorTiers.includes(tier);
}
);

if (tierSponsors.length > 0) {
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.
20 changes: 20 additions & 0 deletions src/content/sponsors/anaconda/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
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, Open Space, Sprint
logo_padding: 20px 0
---
13 changes: 12 additions & 1 deletion src/pages/sponsors.astro
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,30 @@ const tiers = [
"Silver",
"Bronze",
"Patron",
"Sprint",
"Financial Aid",
"Open Space",
"Supporters",
"Partners",
] as const;

function getSponsorTiers(sponsor) {
if (typeof sponsor.data.tier === 'string') {
return sponsor.data.tier.split(',').map(tier => tier.trim());
}
return Array.isArray(sponsor.data.tier) ? sponsor.data.tier : [sponsor.data.tier];
}

// Group sponsors by their tier
const grouped = sponsors.reduce((acc, sponsor) => {
const tier = sponsor.data.tier;
const sponsorTiers = getSponsorTiers(sponsor);
sponsorTiers.forEach(tier => {
const key = tier ?? 'unknown';
if (!acc[key]) {
acc[key] = [];
}
acc[key].push(sponsor);
});
return acc;
}, {} as Record<string, CollectionEntry<"sponsors">[]>);
---
Expand Down