Skip to content

Commit

Permalink
Move timeline to /work and remove the old markdwon content along with…
Browse files Browse the repository at this point in the history
… removeing /legal]
  • Loading branch information
Husky-Devel committed Nov 6, 2024
1 parent 75c8614 commit fd0a0cf
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 176 deletions.
15 changes: 0 additions & 15 deletions nginx.conf

This file was deleted.

10 changes: 1 addition & 9 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,6 @@ const projects = defineCollection({
}),
})

const legal = defineCollection({
type: "content",
schema: z.object({
title: z.string(),
date: z.coerce.date(),
}),
})

// Add the CV collection
const cv = defineCollection({
type: "content",
Expand All @@ -51,4 +43,4 @@ const cv = defineCollection({
}),
})

export const collections = { work, blog, projects, legal, cv }
export const collections = { work, blog, projects, cv }
28 changes: 0 additions & 28 deletions src/content/legal/privacy.md

This file was deleted.

27 changes: 0 additions & 27 deletions src/content/legal/terms.md

This file was deleted.

7 changes: 4 additions & 3 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { SITE, SOCIALS } from "@consts"
import TwinklingStars from "@components/TwinklingStars.astro"
import MeteorShower from "@components/MeteorShower.astro"
// Renable with twitch embed at later point import Twitch from "@components/TwitchEmbed.astro"
import TimelineSkills from "@components/TimelineSkills.astro"
import GitHubActivity from "@components/GitHubActivity.astro"
import ContactForm from '@components/ContactForm.astro';
Expand Down Expand Up @@ -118,10 +117,12 @@ phClient.capture(
<section class="animate">
<GitHubActivity />
</section>
<section class="animate">
<!-- Disable timeline on main page this was moved to /work
<section class="animate">
<TimelineSkills />
</section>
<!-- Twitch Embed, Displays message when offline - Reanable later
-->
<!-- Twitch Embed, Displays message when offline - Reanable later
<section id="contact" class="animate">
<Twitch />
</section>
Expand Down
42 changes: 0 additions & 42 deletions src/pages/legal/[...slug].astro

This file was deleted.

56 changes: 4 additions & 52 deletions src/pages/work/index.astro
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>

0 comments on commit fd0a0cf

Please sign in to comment.