Skip to content

Commit 026b4cd

Browse files
committed
Add Fal and Domino's as sponsors
1 parent 06e65fd commit 026b4cd

5 files changed

Lines changed: 53 additions & 4 deletions

File tree

‎public/sponsors/dominos-pizza.svg‎

Lines changed: 25 additions & 0 deletions
Loading

‎public/sponsors/fal.svg‎

Lines changed: 6 additions & 0 deletions
Loading

‎src/content.config.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ const sponsors = defineCollection({
4848
name: z.string(),
4949
image: z.string(),
5050
link: z.url(),
51+
weight: z.number().default(Number.MAX_SAFE_INTEGER),
52+
maxHeightRem: z.number().default(6),
5153
}),
5254
});
5355

‎src/content/sponsors.yaml‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,21 @@
11
- id: europython-society
22
name: EuroPython Society
33
image: /sponsors/eps-text.png
4-
link: https://www.europython-society.org/
4+
link: https://www.europython-society.org
5+
weight: 0
56
- id: startgate
67
name: StartGate
78
image: /sponsors/startgate.svg
8-
link: https://www.startgate.com/
9+
link: https://www.startgate.com
10+
weight: 10
11+
- id: dominos-pizza
12+
name: Domino's Pizza
13+
image: /sponsors/dominos-pizza.svg
14+
link: https://www.dominos.com.tr/kurumsal/hakkimizda
15+
weight: 20
16+
- id: fal
17+
name: fal
18+
image: /sponsors/fal.svg
19+
link: https://fal.ai
20+
weight: 30
21+
maxHeightRem: 4

‎src/sections/Sponsors.astro‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import Section from "@components/Section.astro";
44
import Prose from "@components/Prose.astro";
55
import { event } from "@data/event";
66
7-
const sponsors = await getCollection("sponsors");
7+
const sponsors = (await getCollection("sponsors")).sort(
8+
(a, b) => a.data.weight - b.data.weight,
9+
);
810
---
911

1012
<Section id="sponsors" title="Sponsors" size="lg">
@@ -28,7 +30,8 @@ const sponsors = await getCollection("sponsors");
2830
<img
2931
src={s.data.image}
3032
alt={s.data.name}
31-
class="w-full h-auto max-h-24 object-contain"
33+
class="w-full h-auto object-contain"
34+
style={{ maxHeight: `${s.data.maxHeightRem}rem` }}
3235
/>
3336
</a>
3437
))}

0 commit comments

Comments
 (0)