File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const {
2020} = sponsor .data ;
2121
2222const logo = sponsorLogos [sponsor .id ];
23- const slug = tier === " Partners" ? ` /community-partners#sponsor-${sponsorId } ` : tier === " Platinum" ? ` /sponsor/${sponsorId } ` : tier === " Media Partners" ? ` /media-partners#sponsor-${sponsorId } ` : tier === " Startups" ? ` /startups#sponsor-${sponsorId } ` : ` /sponsors#sponsor-${ sponsorId } `
23+ const slug = tier === " Partners" ? ` /community-partners#sponsor-${sponsorId } ` : tier === " Platinum" ? ` /sponsor/${sponsorId } ` : tier === " Media Partners" ? ` /media-partners#sponsor-${sponsorId } ` : tier === " Startups" ? ` /startups#sponsor-${sponsorId } ` : " "
2424
2525---
2626
@@ -29,7 +29,7 @@ const slug = tier==="Partners"? `/community-partners#sponsor-${sponsorId}`: tier
2929>
3030 <div class =" w-full flex justify-center items-center md:items-center" >
3131 {
32- website ? (
32+ website && slug ? (
3333
3434 <a href = { slug } aria-label = { ` Link to ${title } ` }
3535>
Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ import Button from "@ui/Button.astro";
77
88import { slugify } from " @utils/content" ;
99
10- const sponsors = await getCollection (" sponsors" );
10+ const sponsors = (await getCollection (" sponsors" , ({ data }) => {
11+ const isProd = import .meta .env .MODE === " production" ;
12+ const notDraft = ! isProd || data .draft !== true ;
13+ return notDraft ;
14+ })).sort ((a , b ) => a .id .localeCompare (b .id ));
1115
1216
1317const tiers = [
Original file line number Diff line number Diff line change @@ -21,9 +21,11 @@ const sponsors = (await getCollection("sponsors", ({ data }) => {
2121>
2222
2323 <Headline as =" h1" id =" startups" title =" Startups" />
24+ { sponsors .length > 0 &&
2425 <p class = " pb-5" >
2526 EuroPython is a community-driven conference, and we wouldn’t be able to empower early-stage innovation and support emerging talent in the Python ecosystem without the generous support of our <strong >Startups</strong > tier sponsors. Learn more about them below (listed in alphabetical order).
2627 </p >
28+ }
2729 { sponsors .length > 0 && (
2830 <div class = " grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6" >
2931 { sponsors .map ((sponsor ) => (
You can’t perform that action at this time.
0 commit comments