-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from huskynz/dev
Move timeline to /work and remove the old markdwon content along with removeing /legal
- Loading branch information
Showing
7 changed files
with
9 additions
and
176 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,11 @@ | ||
--- | ||
import { getCollection } from "astro:content" | ||
import PageLayout from "@layouts/PageLayout.astro" | ||
import TopLayout from "@layouts/TopLayout.astro" | ||
import BottomLayout from "@layouts/BottomLayout.astro" | ||
import { WORK } from "@consts" | ||
import TimelineSkills from "@components/TimelineSkills.astro" | ||
const collection = await getCollection("work") | ||
collection.sort((a, b) => new Date(b.data.dateStart).getTime() - new Date(a.data.dateStart).getTime()) | ||
const work = await Promise.all( | ||
collection.map(async (item) => { | ||
const { Content } = await item.render() | ||
return { ...item, Content } | ||
}) | ||
) | ||
function formatWorkDate(input: Date | string) { | ||
if (typeof input === "string") return input | ||
--- | ||
|
||
const month = input.toLocaleDateString("en-US", { | ||
month: "short", | ||
}) | ||
<PageLayout title="Work" description="A timeline of my skills"> | ||
|
||
const year = new Date(input).getFullYear() | ||
return `${month} ${year}` | ||
} | ||
--- | ||
<TimelineSkills /> | ||
|
||
<PageLayout title={WORK.TITLE} description={WORK.DESCRIPTION}> | ||
<TopLayout> | ||
<div class="animate page-heading"> | ||
{WORK.TITLE} | ||
</div> | ||
</TopLayout> | ||
<BottomLayout> | ||
<ul> | ||
{ | ||
work.map((entry) => ( | ||
<li class="animate border-b border-black/10 dark:border-white/25 mt-4 py-8 first-of-type:mt-0 first-of-type:pt-0 last-of-type:border-none"> | ||
<div class="text-sm uppercase mb-4"> | ||
{formatWorkDate(entry.data.dateStart)} - {formatWorkDate(entry.data.dateEnd)} | ||
</div> | ||
<div class="text-black dark:text-white font-semibold"> | ||
{entry.data.company} | ||
</div> | ||
<div class="text-sm font-semibold"> | ||
{entry.data.role} | ||
</div> | ||
<article class="prose dark:prose-invert"> | ||
<entry.Content /> | ||
</article> | ||
</li> | ||
)) | ||
} | ||
</ul> | ||
</BottomLayout> | ||
</PageLayout> |