Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🚧 wip
Browse files Browse the repository at this point in the history
Fredkiss3 committed Sep 23, 2024
1 parent 3e424d7 commit 88c6532
Showing 4 changed files with 43 additions and 5 deletions.
10 changes: 8 additions & 2 deletions src/content/config.ts
Original file line number Diff line number Diff line change
@@ -14,11 +14,17 @@ const workExperienceCollection = defineCollection({
const projectCollection = defineCollection({
type: "content",
schema: z.object({
/* ... */
title: z.string().min(1),
repository: z.string().url(),
role: z
.array(z.enum(["creator", "maintainer", "contributor"]))
.default(["creator"]),
startDate: z.coerce.date(),
image: z.string().min(1),
}),
});

export const collections = {
work: workExperienceCollection,
project: projectCollection,
projects: projectCollection,
};
6 changes: 6 additions & 0 deletions src/content/projects/zaneops.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: ZaneOps
repository: https://github.com/zane-ops/zane-ops
startDate: "2024-02-01"
image: "~/images/zaneops-screenshot.png"
---
Binary file added src/images/zaneops-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 29 additions & 3 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -14,6 +14,10 @@ const workExperiences = (await getCollection("work")).sort(
(b.data.endDate?.getTime() ?? new Date().getTime()) -
(a.data.endDate?.getTime() ?? new Date().getTime())
);
const projects = (await getCollection("projects")).sort(
(a, b) => b.data.startDate.getTime() - a.data.startDate.getTime()
);
---

<BaseLayout>
@@ -137,11 +141,11 @@ const workExperiences = (await getCollection("work")).sort(
return (
<li>
<article class="flex flex-col gap-2">
<h2 class="text-lg font-semibold">
<h3 class="text-lg font-semibold">
<a target="_blank" rel="noopener noreferrer" href={xp.link}>
{xp.company.toLowerCase()}
</a>
</h2>
</h3>

<h3 class="lowercase text-lg">
{xp.jobTitle} ({formattedDateRange})
@@ -158,7 +162,29 @@ const workExperiences = (await getCollection("work")).sort(
</ul>
</section>

<section id="projects">
<section id="projects" class="flex flex-col gap-3">
<h2 class="text-xl font-semibold">projects</h2>
<ul class="flex flex-col gap-5">
{
projects.map(async entry => {
const project = entry.data;
const { Content } = await entry.render();
return (
<li>
<article>
<h3 class="text-lg font-semibold">
<a
target="_blank"
rel="noopener noreferrer"
href={project.repository}>
{project.title.toLowerCase()}
</a>
</h3>
</article>
</li>
);
})
}
</ul>
</section>
</BaseLayout>

0 comments on commit 88c6532

Please sign in to comment.