11---
22import Layout from " ../../../layouts/Layout.astro" ;
3- import Moment from " moment" ;
43import { Image } from " astro:assets" ;
54import ProjectCard from " ../../../components/ProjectCard.astro" ;
65
76import natureLogo from " ../../../icons/events/nature/logo-full.png" ;
87import type { Project } from " ../../../ts/ModGardenAPI" ;
98import { getEventProjects } from " ../../../ts/ModGardenAPI" ;
9+ import { formatTime , isoTime } from " ../../../ts/TimeHelper" ;
10+ import { getModrinthProject , type Mod } from " ../../../ts/ModrinthHelper" ;
1011
12+ type ProjectAndMod = {
13+ project: Project ;
14+ mod: Mod ;
15+ }
1116
12- const projects: Project [] = await getEventProjects (" mod-garden-nature" );
13- projects .sort ((a , b ) => {
14- return a .slug .localeCompare (b .slug )
15- });
17+ async function getProjects() : Promise <ProjectAndMod []> {
18+ const unsortedProjects = await getEventProjects (" mod-garden-nature" );
19+ const projects = new Array <ProjectAndMod >(unsortedProjects .length );
20+ for (let i = 0 ; i < unsortedProjects .length ; ++ i ) {
21+ const project = unsortedProjects [i ];
22+ const mod = await getModrinthProject (project .modrinth_id );
23+ projects [i ] = { project: project , mod: mod } as ProjectAndMod ;
24+ }
25+ projects .sort ((a , b ) => a .mod .title .localeCompare (b .mod .title ))
26+ return projects ;
27+ }
28+
29+ const projects: ProjectAndMod [] = await getProjects ();
1630
17- const planningStart = Moment ( " 2025-05-18T00:00:00Z" ) ;
18- const planningEnd = Moment ( " 2025-05-25T00:00:00Z" ) ;
19- const developmentStart = Moment ( " 2025-05-25T00:00:00Z" ) ;
20- const tweakStart = Moment ( " 2025-08-22T00:00:00Z" ) ;
21- const buildStart = Moment ( " 2025-09-05T00:00:00Z" ) ;
22- const buildEnd = Moment ( " 2025-10-01T00:00:00Z" ) ;
23- const showcaseStart = Moment ( " 2025-10-03T00:00:00Z" ) ;
24- const showcaseEnd = Moment ( " 2025-10-10T00:00:00Z" ) ;
31+ const planningStart = " 2025-05-18T00:00:00Z" ;
32+ const planningEnd = " 2025-05-25T00:00:00Z" ;
33+ const developmentStart = " 2025-05-25T00:00:00Z" ;
34+ const tweakStart = " 2025-08-22T00:00:00Z" ;
35+ const buildStart = " 2025-09-05T00:00:00Z" ;
36+ const buildEnd = " 2025-10-01T00:00:00Z" ;
37+ const showcaseStart = " 2025-10-03T00:00:00Z" ;
38+ const showcaseEnd = " 2025-10-10T00:00:00Z" ;
2539---
2640
2741<Layout title =" Mod Garden: Nature" favicon =" /images/icon/nature.png" image =" /images/icon/nature.png" color =" #68ae26" >
@@ -119,39 +133,39 @@ const showcaseEnd = Moment("2025-10-10T00:00:00Z");
119133 <ol class =" relative border-s border-leaf-600 dark:border-leaf-200" >
120134 <li class =" mb-[19.5%] ms-4" >
121135 <div class =" absolute w-3 h-3 bg-pine-500 rounded-full mt-1.5 -start-1.5 dark:bg-pine-700" ></div >
122- <time datetime ={ planningStart . toISOString ( )} data-start-time ={ planningStart } class =" mb-1 text-sm font-normal leading-none italic" >{ planningStart . format ( " MM/D/YYYY h:mm A " )} - { planningEnd . format ( " MM/D/YYYY h:mm A " ) } </ time >
136+ <time datetime ={ isoTime ( planningStart )} data-start-time ={ planningStart } class =" mb-1 text-sm font-normal leading-none italic" >{ formatTime ( planningStart )} - { formatTime ( planningEnd ) } time>
123137 <h3 class =" text-lg font-semibold text-gray-900 dark:text-white" >Planning Stage</h3 >
124138 <p class =" text-base font-normal" >
125139 Here you can sign up, and start planning your project. This is the time to start forming teams, planning ideas and general brainstorming.
126140 </p >
127141 </li >
128142 <li class =" mb-[19.5%] ms-4" >
129143 <div class =" absolute w-3 h-3 bg-pine-500 rounded-full mt-1.5 -start-1.5 dark:bg-pine-700" ></div >
130- <time datetime ={ developmentStart . toISOString ( )} data-start-time ={ developmentStart } class =" mb-1 text-sm font-normal leading-none italic" >{ developmentStart . format ( " MM/D/YYYY h:mm A " )} - { tweakStart . format ( " MM/D/YYYY h:mm A " )} </time >
144+ <time datetime ={ isoTime ( developmentStart )} data-start-time ={ developmentStart } class =" mb-1 text-sm font-normal leading-none italic" >{ formatTime ( developmentStart )} - { formatTime ( tweakStart )} </time >
131145 <h3 class =" text-lg font-semibold text-gray-900 dark:text-white" >Development Stage</h3 >
132146 <p class =" text-base font-normal" >
133147 This is when you start working on your project(s). You should be submitted to Modrinth at the end of this stage.
134148 </p >
135149 </li >
136150 <li class =" mb-[19.5%] ms-4" >
137151 <div class =" absolute w-3 h-3 bg-pine-500 rounded-full mt-1.5 -start-1.5 dark:bg-pine-700" ></div >
138- <time datetime ={ tweakStart . toISOString ( )} data-start-time ={ tweakStart } class =" mb-1 text-sm font-normal leading-none italic" >{ tweakStart . format ( " MM/D/YYYY h:mm A " )} - { buildStart . format ( " MM/D/YYYY h:mm A " )} </time >
152+ <time datetime ={ isoTime ( tweakStart )} data-start-time ={ tweakStart } class =" mb-1 text-sm font-normal leading-none italic" >{ formatTime ( tweakStart )} - { formatTime ( buildStart )} </time >
139153 <h3 class =" text-lg font-semibold text-gray-900 dark:text-white" >Tweak Stage</h3 >
140154 <p class =" text-base font-normal" >
141155 This period is all about fixing bugs, and integrating with other mods to have cross compatibility. Extensions will last until the end of the first week of this phase.
142156 </p >
143157 </li >
144158 <li class =" mb-[19.5%] ms-4" >
145159 <div class =" absolute w-3 h-3 bg-pine-500 rounded-full mt-1.5 -start-1.5 dark:bg-pine-700" ></div >
146- <time datetime ={ buildStart . toISOString ( )} data-start-time ={ buildStart } class =" mb-1 text-sm font-normal leading-none italic" >{ buildStart . format ( " MM/D/YYYY h:mm A " )} - { buildEnd . format ( " MM/D/YYYY h:mm A " )} </time >
160+ <time datetime ={ isoTime ( buildStart )} data-start-time ={ buildStart } class =" mb-1 text-sm font-normal leading-none italic" >{ formatTime ( buildStart )} - { formatTime ( buildEnd )} </time >
147161 <h3 class =" text-lg font-semibold text-gray-900 dark:text-white" >Building Stage</h3 >
148162 <p class =" text-base font-normal" >
149163 This stage is optional, but if you want to build a booth for your project, this is the time to do it.
150164 </p >
151165 </li >
152166 <li class =" ms-4" >
153167 <div class =" absolute w-3 h-3 bg-pine-500 rounded-full mt-1.5 -start-1.5 dark:bg-pine-700" ></div >
154- <time datetime ={ showcaseStart . toISOString ( )} data-start-time ={ showcaseStart } class =" mb-1 text-sm font-normal leading-none italic" >{ showcaseStart . format ( " MM/D/YYYY h:mm A " )} - { showcaseEnd . format ( " MM/D/YYYY h:mm A " )} </time >
168+ <time datetime ={ isoTime ( showcaseStart )} data-start-time ={ showcaseStart } class =" mb-1 text-sm font-normal leading-none italic" >{ formatTime ( showcaseStart )} - { formatTime ( showcaseEnd )} </time >
155169 <h3 class =" text-lg font-semibold text-gray-900 dark:text-white" >Showcase Stage</h3 >
156170 <p class =" text-base font-normal" >
157171 This is when the event server is up and running, where you and players can visit booths for all the projects. Players may vote for mods and awards are given in this stage. The server will still be up for some time after this phase ends.
@@ -169,7 +183,8 @@ const showcaseEnd = Moment("2025-10-10T00:00:00Z");
169183 <div class =" grid grid-cols-1 gap-2 md:grid-cols-2 lg:grid-cols-3" >
170184 { projects .map ((project ) => (
171185 <ProjectCard
172- submission = { project }
186+ submission = { project .project }
187+ mod = { project .mod }
173188 showUserInfo = { true }
174189 />
175190 ))}
0 commit comments