File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ import Section from "@components/Section.astro";
44import Prose from " @components/Prose.astro" ;
55import { 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 ))}
You can’t perform that action at this time.
0 commit comments