11---
22import { Picture } from " astro:assets" ;
3- import { getCollection } from " astro:content" ;
43import { Icon } from " astro-icon/components" ;
54
65import GlobalLayout from " +/layouts/GlobalLayout.astro" ;
@@ -9,25 +8,17 @@ import ActionButton from "+/components/ActionButton.astro";
98import ArticleList from " +/components/ArticleList.astro" ;
109import ProjectList from " +/components/ProjectList.astro" ;
1110import SectionHeader from " +/components/per-page/SectionHeader.astro" ;
11+ import { getArticles , getProjects } from " +/query.ts" ;
1212import { Focus } from " +/schema.ts" ;
1313
1414import LogoGMOMedia from " +/images/donators/gmo-media.png" ;
1515import Hero from " +/images/headers/index.jpg" ;
1616import LabCafe from " +/images/lab-cafe.jpg" ;
1717
18- const projects = (await getCollection (" projects" )).sort ((a , b ) => {
19- const a_order = a .data .order ?? Number .POSITIVE_INFINITY;
20- const b_order = b .data .order ?? Number .POSITIVE_INFINITY;
21- if (a_order !== b_order ) {
22- return a_order - b_order ;
23- }
24- return b .data .date .getTime () - a .data .date .getTime ();
25- });
18+ const projects = await getProjects (" long-term" );
2619projects .splice (6 );
2720
28- const articles = (await getCollection (" articles" )).sort (
29- (a , b ) => b .data .date .getTime () - a .data .date .getTime (),
30- );
21+ const articles = await getArticles ();
3122articles .splice (3 );
3223---
3324
0 commit comments