Skip to content

Commit

Permalink
Fix cv order
Browse files Browse the repository at this point in the history
  • Loading branch information
bdmendes committed Jan 5, 2025
1 parent 1a6759d commit 4b7c4d5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/pages/cv.astro
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ import { Icon } from "astro-icon/components";
import LargeTitle from "@components/LargeTitle.astro";
import { getCollection } from "astro:content";
const entries = await getCollection("cv");
const description = entries.filter((e) => e.data.type === "description")[0];
const educationEntries = entries
.filter((e) => e.data.type === "education")
.toReversed();
const experienceEntries = entries
.filter((e) => e.data.type === "experience")
.toReversed();
const miscellaneousEntries = entries
.filter((e) => e.data.type === "misc")
const currentYear = new Date().getFullYear();
const entries = (await getCollection("cv"))
.toSorted((a, b) => (a.data.to ?? currentYear) - (b.data.to ?? currentYear))
.toReversed();
const description = entries.filter((e) => e.data.type === "description")[0];
const educationEntries = entries.filter((e) => e.data.type === "education");
const experienceEntries = entries.filter((e) => e.data.type === "experience");
const miscellaneousEntries = entries.filter((e) => e.data.type === "misc");
---

<BaseLayout title="Curriculum Vitae" sideBarActiveItemID="cv" currentPage={1}>
Expand Down

0 comments on commit 4b7c4d5

Please sign in to comment.