@@ -6,12 +6,14 @@ import Author from '@/components/ui/Author.astro';
66import { DEFAULT_CONFIGURATION } from ' @/lib/constants' ;
77import WorkExperience from ' @/components/ui/WorkExperience.astro' ;
88import Talk from ' @/components/ui/Talk.astro' ;
9+ import { sortJobsByDate } from ' @/lib/utils' ;
910
1011const entry = await getEntry (' pages' , ' homepage' );
1112const { Content } = await render (entry );
1213
1314const links = await getCollection (' links' );
1415const jobs = await getCollection (' jobs' );
16+ const sortedJobs = sortJobsByDate (jobs );
1517const talks = await getCollection (' talks' );
1618---
1719
@@ -33,47 +35,66 @@ const talks = await getCollection('talks');
3335 </div >
3436 </Container >
3537 </section >
36- { links .length > 0 && (
37- <section class = " py-8" >
38- <Container >
39- <div class = " flex flex-col gap-5" >
40- <span class = " text-headings" >Contact</span >
41- <ul class = " flex flex-col gap-3" >
42- { links .map ((link ) => (
43- <li class = " py-0.5" >
44- <div class = " flex items-center gap-5" >
45- <span class = " min-w-28 text-muted-foreground" >{ link .data .label } </span >
46- <a class = " text-headings font-medium" rel = " noopener noreferrer" target = " _blank" href = { link .data .url } >{ link .data .name } </a >
47- </div >
48- </li >
49- ))}
50- </ul >
51- </div >
52- </Container >
53- </section >
54- )}
55- { jobs .length > 0 && (
56- <section class = " py-6" >
57- <Container >
58- <div class = " flex flex-col gap-5" >
59- <span class = " text-headings" >Work Experience</span >
60- <ul class = " flex flex-col gap-8" >
61- { jobs .map ((job ) => <WorkExperience entry = { job } />)}
62- </ul >
63- </div >
64- </Container >
65- </section >
66- )}
67- { talks .length > 0 && (
68- <section class = " py-6" >
69- <Container >
70- <div class = " flex flex-col gap-5" >
71- <span class = " text-headings" >Speaking</span >
72- <ul class = " flex flex-col gap-8" >
73- { talks .map ((talk ) => <Talk entry = { talk } />)}
74- </ul >
75- </div >
76- </Container >
77- </section >
78- )}
79- </BaseLayout >
38+ {
39+ links .length > 0 && (
40+ <section class = " py-8" >
41+ <Container >
42+ <div class = " flex flex-col gap-5" >
43+ <span class = " text-headings" >Contact</span >
44+ <ul class = " flex flex-col gap-3" >
45+ { links .map ((link ) => (
46+ <li class = " py-0.5" >
47+ <div class = " flex items-center gap-5" >
48+ <span class = " min-w-28 text-muted-foreground" >
49+ { link .data .label }
50+ </span >
51+ <a
52+ class = " text-headings font-medium"
53+ rel = " noopener noreferrer"
54+ target = " _blank"
55+ href = { link .data .url }
56+ >
57+ { link .data .name }
58+ </a >
59+ </div >
60+ </li >
61+ ))}
62+ </ul >
63+ </div >
64+ </Container >
65+ </section >
66+ )
67+ }
68+ {
69+ sortedJobs .length > 0 && (
70+ <section class = " py-6" >
71+ <Container >
72+ <div class = " flex flex-col gap-5" >
73+ <span class = " text-headings" >Work Experience</span >
74+ <ul class = " flex flex-col gap-8" >
75+ { sortedJobs .map ((job ) => (
76+ <WorkExperience entry = { job } />
77+ ))}
78+ </ul >
79+ </div >
80+ </Container >
81+ </section >
82+ )
83+ }
84+ {
85+ talks .length > 0 && (
86+ <section class = " py-6" >
87+ <Container >
88+ <div class = " flex flex-col gap-5" >
89+ <span class = " text-headings" >Speaking</span >
90+ <ul class = " flex flex-col gap-8" >
91+ { talks .map ((talk ) => (
92+ <Talk entry = { talk } />
93+ ))}
94+ </ul >
95+ </div >
96+ </Container >
97+ </section >
98+ )
99+ }
100+ </BaseLayout >
0 commit comments