portfolio/app/page.tsx

87 lines
3.8 KiB
TypeScript
Raw Permalink Normal View History

import React from 'react'
2023-02-14 21:40:16 +00:00
import {Card} from '@/components/ui/Card'
2023-07-29 22:40:36 +00:00
import {Views} from '@/components/ui/Views'
2023-02-14 21:40:16 +00:00
import {Resume} from '@/components/ui/Resume'
import {SocialLink} from '@/components/ui/SocialLink'
2023-07-29 22:40:36 +00:00
import {Container} from '@/components/common/Container'
import {GitHubIcon, LinkedInIcon} from '@/components/icons/SocialIcons'
2022-12-06 12:54:34 +00:00
import {getAllArticles} from '@/lib/getAllArticles'
2023-07-29 22:40:36 +00:00
import {formatDate} from '@/lib/formatDate'
import type {Article} from '@/types'
2022-12-06 12:54:34 +00:00
2023-01-14 19:31:05 +00:00
function Article(article: Article) {
2022-12-06 12:54:34 +00:00
return (
<article>
<Card>
<Card.Title href={`/writing/${article.slug}`}>
{article.title}
</Card.Title>
<p className="flex order-first space-x-1 z-10 mb-3">
<Card.Eyebrow as="time" dateTime={article.date} decorate={false}>
{formatDate(article.date)}
</Card.Eyebrow>
2023-04-11 16:48:47 +00:00
<Views
slug={article.slug}
className="text-sm text-zinc-500 dark:text-zinc-400"
shouldUpdateViews={false}
/>
</p>
</Card>
</article>
2022-12-06 12:54:34 +00:00
)
}
2023-07-29 22:40:36 +00:00
export default async function Home() {
const articles = (await getAllArticles())
.slice(0, 3)
.map(component => component)
2022-12-06 12:54:34 +00:00
return (
<>
<Container className="mt-9">
<div className="max-w-2xl">
2023-03-28 20:32:52 +00:00
<h1 className="text-4xl font-bold tracking-tight text-zinc-800 sm:text-5xl bg-clip-text dark:text-transparent bg-gradient-to-r from-pink-500 via-red-500 to-yellow-500">
2022-12-06 12:54:34 +00:00
Full-stack software engineer who enjoys building cloud-native applications.
</h1>
<p className="mt-6 text-base text-zinc-600 dark:text-zinc-400">
Hi. I&apos;m Ryan, a software engineer based in Dublin, Ireland. I&apos;m currently working in the
aviation industry for Aer Lingus. I am passionate about personal growth and progressing in my career. This
2023-01-16 20:37:22 +00:00
is my personal website where you can learn more about me, read articles I&apos;ve written and see projects
I&apos;ve worked on.
2022-12-06 12:54:34 +00:00
</p>
<div className="mt-6 flex gap-6">
<SocialLink
href="https://github.com/r-freeman"
2023-01-22 00:12:13 +00:00
ariaLabel="Follow on GitHub"
2022-12-06 12:54:34 +00:00
icon={GitHubIcon}
/>
<SocialLink
href="https://linkedin.com/in/r-freeman/"
2023-01-22 00:12:13 +00:00
ariaLabel="Follow on LinkedIn"
2022-12-06 12:54:34 +00:00
icon={LinkedInIcon}
/>
</div>
</div>
2024-08-26 20:34:46 +00:00
<Views slug="/home" shouldUpdateViews={true} shouldRender={false}/>
2022-12-06 12:54:34 +00:00
</Container>
<Container className="mt-24 md:mt-28">
<div className="mx-auto grid max-w-xl grid-cols-1 gap-y-20 lg:max-w-none lg:grid-cols-2">
2023-02-03 23:32:56 +00:00
<div className="flex flex-col gap-16 mt-6">
2023-01-14 19:31:05 +00:00
{articles.map(({slug, title, description, date}) => (
<Article
key={slug}
title={title}
description={description}
slug={slug}
date={date}
/>
2022-12-06 12:54:34 +00:00
))}
</div>
<div className="space-y-10 lg:pl-16 xl:pl-24">
<Resume/>
</div>
</div>
</Container>
</>
)
2023-07-29 22:40:36 +00:00
}