Skip to content

Commit 7e0ef62

Browse files
authored
Rearrange projects and show projects in CV instead of working experience (#50)
* feat(ProjectsSection): contributions are in "Other" section * feat(CV): show projects instead of working experiences
1 parent aeebdd3 commit 7e0ef62

File tree

2 files changed

+40
-7
lines changed

2 files changed

+40
-7
lines changed

src/components/ProjectsSection.astro

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ const imageResult = imageMetadata.map((projectMediaMetadata) =>
9494
const featuredProjects: Project[] = []
9595
const otherProjects: Project[] = []
9696
97-
/**
98-
* For me open source contributions are much more important
99-
*/
10097
for (let projectId = 0; projectId < projects.length; projectId++) {
10198
const project = projects[projectId]
10299
if (!project) {
@@ -125,9 +122,9 @@ for (let projectId = 0; projectId < projects.length; projectId++) {
125122
contributorRegexp.test(project.name) ||
126123
contributorRegexp.test(project.summary!)
127124
) {
128-
featuredProjects.push({ ...project, technologies, images })
129-
} else {
130125
otherProjects.push({ ...project, technologies, images })
126+
} else {
127+
featuredProjects.push({ ...project, technologies, images })
131128
}
132129
}
133130
@@ -230,6 +227,42 @@ const isCV = isCVMode()
230227
{
231228
otherProjects.map((project) => (
232229
<Card class="group hover-scale transition-all duration-300">
230+
{project.images.length > 0 && !isCV && (
231+
<div>
232+
<Carousel
233+
imgs={project.images.map(
234+
(image, imageIndex) => {
235+
const carouselImage: CarouselImage =
236+
{
237+
srcset: image.srcSet
238+
.attribute,
239+
src: image.src,
240+
loading:
241+
imageIndex === 0
242+
? 'eager'
243+
: 'lazy',
244+
}
245+
const label =
246+
project.media[imageIndex]
247+
?.name
248+
const link =
249+
project.media[imageIndex]
250+
?.url
251+
252+
if (label) {
253+
carouselImage.label = label
254+
}
255+
256+
if (link) {
257+
carouselImage.link = link
258+
}
259+
260+
return carouselImage
261+
}
262+
)}
263+
/>
264+
</div>
265+
)}
233266
<CardHeader>
234267
<div class="flex items-center gap-2 mb-2">
235268
<Folder class="text-primary" size={18} />

src/pages/index.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ const htmlClassList = import.meta.env.CV === 'dark' ? ['dark'] : []
7676
{!isCV && <Navigation />}
7777
<main>
7878
<HeroSection />
79-
<ResumeSection />
80-
{!isCV && <ProjectsSection />}
79+
{!isCV && <ResumeSection />}
80+
<ProjectsSection />
8181
<ContactSection />
8282
</main>
8383

0 commit comments

Comments
 (0)