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
25 changes: 25 additions & 0 deletions public/sponsors/dominos-pizza.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/sponsors/fal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/content.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ const sponsors = defineCollection({
name: z.string(),
image: z.string(),
link: z.url(),
weight: z.number().default(Number.MAX_SAFE_INTEGER),
maxHeightRem: z.number().default(6),
}),
});

Expand Down
17 changes: 15 additions & 2 deletions src/content/sponsors.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
- id: europython-society
name: EuroPython Society
image: /sponsors/eps-text.png
link: https://www.europython-society.org/
link: https://www.europython-society.org
weight: 0
- id: startgate
name: StartGate
image: /sponsors/startgate.svg
link: https://www.startgate.com/
link: https://www.startgate.com
weight: 10
- id: dominos-pizza
name: Domino's Pizza
image: /sponsors/dominos-pizza.svg
link: https://www.dominos.com.tr/kurumsal/hakkimizda
weight: 20
- id: fal
name: fal
image: /sponsors/fal.svg
link: https://fal.ai
weight: 30
maxHeightRem: 4
7 changes: 5 additions & 2 deletions src/sections/Sponsors.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import Section from "@components/Section.astro";
import Prose from "@components/Prose.astro";
import { event } from "@data/event";

const sponsors = await getCollection("sponsors");
const sponsors = (await getCollection("sponsors")).sort(
(a, b) => a.data.weight - b.data.weight,
);
---

<Section id="sponsors" title="Sponsors" size="lg">
Expand All @@ -28,7 +30,8 @@ const sponsors = await getCollection("sponsors");
<img
src={s.data.image}
alt={s.data.name}
class="w-full h-auto max-h-24 object-contain"
class="w-full h-auto object-contain"
style={{ maxHeight: `${s.data.maxHeightRem}rem` }}
/>
</a>
))}
Expand Down
Loading