diff --git a/src/components/Header.astro b/src/components/Header.astro index 53e818d..64b0632 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -31,9 +31,9 @@ import { SITE } from "@consts"; {`/`} - + diff --git a/src/layouts/PageLayout.astro b/src/layouts/PageLayout.astro index 8501422..7bc6e78 100644 --- a/src/layouts/PageLayout.astro +++ b/src/layouts/PageLayout.astro @@ -19,7 +19,6 @@ const { title, description, redirect } = Astro.props; -
diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro deleted file mode 100644 index cbddad1..0000000 --- a/src/pages/blog/[...slug].astro +++ /dev/null @@ -1,49 +0,0 @@ ---- -import { type CollectionEntry, getCollection } from "astro:content"; -import PageLayout from "@layouts/PageLayout.astro"; -import Container from "@components/Container.astro"; -import FormattedDate from "@components/FormattedDate.astro"; -import { readingTime } from "@lib/utils"; -import BackToPrev from "@components/BackToPrev.astro"; - -export async function getStaticPaths() { - const posts = (await getCollection("blog")) - .filter(post => !post.data.draft) - .sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()); - return posts.map((post) => ({ - params: { slug: post.slug }, - props: post, - })); -} -type Props = CollectionEntry<"blog">; - -const post = Astro.props; -const { Content } = await post.render(); ---- - - - -
- - Back to blog - -
-
-
-
- -
- • -
- {readingTime(post.body)} -
-
-
- {post.data.title} -
-
-
- -
-
-
\ No newline at end of file diff --git a/src/pages/blog/index.astro b/src/pages/blog/index.astro deleted file mode 100644 index e2b653e..0000000 --- a/src/pages/blog/index.astro +++ /dev/null @@ -1,56 +0,0 @@ ---- -import { type CollectionEntry, getCollection } from "astro:content"; -import PageLayout from "@layouts/PageLayout.astro"; -import Container from "@components/Container.astro"; -import ArrowCard from "@components/ArrowCard.astro"; -import { BLOG } from "@consts"; - -const data = (await getCollection("blog")) - .filter(post => !post.data.draft) - .sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()); - -type Acc = { - [year: string]: CollectionEntry<"blog">[]; -} - -const posts = data.reduce((acc: Acc, post) => { - const year = post.data.date.getFullYear().toString(); - if (!acc[year]) { - acc[year] = []; - } - acc[year].push(post); - return acc; - }, {}); - -const years = Object.keys(posts).sort((a, b) => parseInt(b) - parseInt(a)); ---- - - - -
-
- Blog -
-
- {years.map(year => ( -
-
- {year} -
-
-
    - { - posts[year].map((post) => ( -
  • - -
  • - )) - } -
-
-
- ))} -
-
-
-
diff --git a/src/pages/index.astro b/src/pages/index.astro index 02b5415..e178aba 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,146 +1,26 @@ --- -import { getCollection } from "astro:content"; import Container from "@components/Container.astro"; import PageLayout from "@layouts/PageLayout.astro"; -import ArrowCard from "@components/ArrowCard.astro"; -import Link from "@components/Link.astro"; -import { dateRange } from "@lib/utils"; -import { SITE, HOME, SOCIALS } from "@consts"; +import { HOME } from "@consts"; import EmojiScroller from "@components/EmojiScroller.astro"; - -const blog = (await getCollection("blog")) - .filter(post => !post.data.draft) - .sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()) - .slice(0,SITE.NUM_POSTS_ON_HOMEPAGE); - -const projects = (await getCollection("projects")) - .filter(project => !project.data.draft) - .sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()) - .slice(0,SITE.NUM_PROJECTS_ON_HOMEPAGE); - -const allwork = (await getCollection("work")) - .sort((a, b) => new Date(b.data.dateStart).valueOf() - new Date(a.data.dateStart).valueOf()) - .slice(0,SITE.NUM_WORKS_ON_HOMEPAGE); - -const work = await Promise.all( - allwork.map(async (item) => { - const { Content } = await item.render(); - return { ...item, Content }; - }) -); - +import LinkCard from "@components/LinkCard.astro"; +import Link from "@components/Link.astro"; --- - -

- Hi, I'm Michael + Welcome

-
-
-
-

- I'm a software engineer at the University of Canterbury, working on Tuihono UC | UC Online. - - I specialize in full-stack development. While my primary expertise is in software engineering, I also have a strong interest in cloud infrastructure and DevOps. Based in Christchurch, New Zealand -

- Feel free to connect with me through any of the social media links at the bottom of this page! -

-
-
- -
-
-
- Latest posts -
- - See all posts - -
-
    - {blog.map(post => ( -
  • - -
  • - ))} -
-
- -
-
-
- Work Experience -
- - See all work - -
-
    - {work.map(entry => ( -
  • -
    - {dateRange(entry.data.dateStart, entry.data.dateEnd)} -
    -
    - {entry.data.company} -
    -
    - {entry.data.role} -
    -
    - -
    -
  • - ))} -
-
- -
-
-
- Recent projects -
- - See all projects - -
-
    - {projects.map(project => ( -
  • - -
  • - ))} -
-
- -
-
- Let's Connect -
-
-

- If you want to get in touch with me about something or just to say hi, - reach out on social media or send me an email. -

-
-
    - {SOCIALS.map(SOCIAL => ( -
  • - - {SOCIAL.NAME} - - {"/"} -
  • - ))} -
  • - - {SITE.EMAIL} - -
  • -
-
+
+

If you've landed here, you're probably not in the right place.

+ +
+ Head to my website -> +
+ +

+ Recieved an email from this address? All emails sent to the @mkl.gg domain are forwarded to me. I may have provided you with a unique address, such as yourcompany@mkl.gg. These addresses are legitimate and help me organize and prioritize my emails while minimizing spam. +

diff --git a/src/pages/projects/[...slug].astro b/src/pages/projects/[...slug].astro deleted file mode 100644 index d62670a..0000000 --- a/src/pages/projects/[...slug].astro +++ /dev/null @@ -1,67 +0,0 @@ ---- -import { type CollectionEntry, getCollection } from "astro:content"; -import PageLayout from "@layouts/PageLayout.astro"; -import Container from "@components/Container.astro"; -import FormattedDate from "@components/FormattedDate.astro"; -import { readingTime } from "@lib/utils"; -import BackToPrev from "@components/BackToPrev.astro"; -import Link from "@components/Link.astro"; - -export async function getStaticPaths() { - const projects = (await getCollection("projects")) - .filter(post => !post.data.draft) - .sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()); - return projects.map((project) => ({ - params: { slug: project.slug }, - props: project, - })); -} -type Props = CollectionEntry<"projects">; - -const project = Astro.props; -const { Content } = await project.render(); ---- - - - -
- - Back to projects - -
-
-
-
- -
- • -
- {readingTime(project.body)} -
-
-
- {project.data.title} -
- {(project.data.demoURL || project.data.repoURL) && ( - - )} -
-
- -
-
-
\ No newline at end of file diff --git a/src/pages/projects/index.astro b/src/pages/projects/index.astro deleted file mode 100644 index e3e0ed0..0000000 --- a/src/pages/projects/index.astro +++ /dev/null @@ -1,30 +0,0 @@ ---- -import { getCollection } from "astro:content"; -import PageLayout from "@layouts/PageLayout.astro"; -import Container from "@components/Container.astro"; -import ArrowCard from "@components/ArrowCard.astro"; -import { PROJECTS } from "@consts"; - -const projects = (await getCollection("projects")) - .filter(project => !project.data.draft) - .sort((a, b) => b.data.date.valueOf() - a.data.date.valueOf()); ---- - - - -
-
- Projects -
-
    - { - projects.map((project) => ( -
  • - -
  • - )) - } -
-
-
-
diff --git a/src/pages/work/index.astro b/src/pages/work/index.astro deleted file mode 100644 index 35ce5d5..0000000 --- a/src/pages/work/index.astro +++ /dev/null @@ -1,51 +0,0 @@ ---- -import { getCollection } from "astro:content"; -import PageLayout from "@layouts/PageLayout.astro"; -import Container from "@components/Container.astro"; -import { dateRange } from "@lib/utils"; -import { WORK } from "@consts"; - -const collection = (await getCollection("work")) - .sort((a, b) => new Date(b.data.dateStart).valueOf() - new Date(a.data.dateStart).valueOf()); - -const work = await Promise.all( - collection.map(async (item) => { - const { Content } = await item.render(); - return { ...item, Content }; - }) -); ---- - - - -
-
- Work -
-
    - { - work.map(entry => ( -
  • -
    - {dateRange(entry.data.dateStart, entry.data.dateEnd)} -
    -
    - {entry.data.company} -
    -
    - {entry.data.role} -
    -
    - -
    -
  • - )) - } -
- -
-
-