diff --git a/bun.lockb b/bun.lockb index f699358..a767dd5 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/src/assets/macchinisti/antonio-de-lucreziis.png b/src/assets/macchinisti/antonio-de-lucreziis.png new file mode 100644 index 0000000..061dd12 Binary files /dev/null and b/src/assets/macchinisti/antonio-de-lucreziis.png differ diff --git a/src/assets/macchinisti/fallback.jpg b/src/assets/macchinisti/fallback.jpg new file mode 100644 index 0000000..3120cbe Binary files /dev/null and b/src/assets/macchinisti/fallback.jpg differ diff --git a/src/assets/macchinisti/francesco-baldino.jpg b/src/assets/macchinisti/francesco-baldino.jpg new file mode 100644 index 0000000..3120cbe Binary files /dev/null and b/src/assets/macchinisti/francesco-baldino.jpg differ diff --git a/src/assets/macchinisti/illya-serdyuk.jpg b/src/assets/macchinisti/illya-serdyuk.jpg new file mode 100644 index 0000000..3120cbe Binary files /dev/null and b/src/assets/macchinisti/illya-serdyuk.jpg differ diff --git a/src/assets/macchinisti/luca-lombardo.jpg b/src/assets/macchinisti/luca-lombardo.jpg new file mode 100644 index 0000000..4a21abf Binary files /dev/null and b/src/assets/macchinisti/luca-lombardo.jpg differ diff --git a/src/data/current-macchinisti.json b/src/data/current-macchinisti.json new file mode 100644 index 0000000..a6c2695 --- /dev/null +++ b/src/data/current-macchinisti.json @@ -0,0 +1,47 @@ +[ + { + "fullName": "Antonio De Lucreziis", + "dateIn": "2019", + "dateOut": "", + "description": "Description here", + "github": "https://github.com/adelucreziis", + "website": "", + "linkedin": "" + }, + { + "fullName": "Luca Lombardo", + "dateIn": "2024", + "dateOut": "", + "description": "Algoritmi e Strutture Dati Bla Bla", + "github": "https://github.com/lukefleed", + "website": "https://lukefleex.xyz", + "linkedin": "https://www.linkedin.com/in/l-lombardo/" + }, + { + "fullName": "Francesco Minnocci", + "dateIn": "2022", + "dateOut": "", + "description": "Ho una laurea(?)", + "github": "https://github.com/BachoSeven", + "website": "https://bachoseven.com", + "linkedin": "" + }, + { + "fullName": "Francesco Baldino", + "dateIn": "2022", + "dateOut": "", + "description": "Bla Bla", + "github": "", + "website": "", + "linkedin": "" + }, + { + "fullName": "Illya Serdyuk", + "dateIn": "2019", + "dateOut": "", + "description": "Bla Bla", + "github": "", + "website": "", + "linkedin": "" + } + ] diff --git a/src/data/past-macchinisti.json b/src/data/past-macchinisti.json new file mode 100644 index 0000000..bfe72e2 --- /dev/null +++ b/src/data/past-macchinisti.json @@ -0,0 +1,11 @@ +[ + { + "fullName": "Francesco Manicastri", + "dateIn": "2022", + "dateOut": "2024", + "description": "Geometria bla bla", + "github": "", + "website": "", + "linkedin": "" + } + ] \ No newline at end of file diff --git a/src/pages/macchinisti.astro b/src/pages/macchinisti.astro index 3ca650b..37aa630 100644 --- a/src/pages/macchinisti.astro +++ b/src/pages/macchinisti.astro @@ -1,12 +1,32 @@ --- import BaseLayout from '../layouts/BaseLayout.astro' - import Header from '../components/Header.astro' import Footer from '../components/Footer.astro' +import Bubble from '../components/Bubble.astro' -import francescoMinnocci from '@/assets/macchinisti/francesco-minnocci.png' +import currentMacchinisti from '../data/current-macchinisti.json' +import pastMacchinisti from '../data/past-macchinisti.json' -import Bubble from '../components/Bubble.astro' +// Import all images from assets folder +const images = import.meta.glob('@/assets/macchinisti/*.{jpg,jpeg,png,gif}', { + eager: true +}) + +// Sort by dateIn +const sortedCurrent = currentMacchinisti.sort((a, b) => parseInt(a.dateIn) - parseInt(b.dateIn)) +const sortedPast = pastMacchinisti.sort((a, b) => parseInt(a.dateIn) - parseInt(b.dateIn)) + +// Define a fallback image metadata +const fallbackImage = { default: 'assets/macchinisti/fallback.jpg' } + +// Function to get image for a macchinista +const getImage = (fullName: string) => { + const imageName = fullName.toLowerCase().replaceAll(' ', '-') + const imageModule = Object.entries(images).find(([path]) => + path.includes(imageName) + )?.[1] + return imageModule || fallbackImage +} --- @@ -20,69 +40,43 @@ import Bubble from '../components/Bubble.astro'
- - - - - - - + {sortedCurrent.map(async (macchinista) => ( + + ))}
-
Deus Ex Macchinisti
+
Ex Macchinisti
-

- Gli vogliamo molto bene, molti di loro hanno fatto cose eccoveli che ve li presentiamo - subito ora ADESSO! -

+

Gli vogliamo molto bene, hanno fatto grandi cose!

- - + {sortedPast.map(async (macchinista) => ( + + ))}