feat(resume): native /resume page built from JSON Resume data

Replaces the S3 PDF link in the nav with an everforest-native page:
- data/resume.json holds the resume as JSON Resume schema
- app/resume/page.tsx renders it with the site palette (light + dark)
- nav, author card and footer now point at /resume; the PDF stays
  reachable via the page's Download PDF button (siteMetadata.resumePdf)
- /resume added to the sitemap
This commit is contained in:
trex Bot committed 2026-11-22 23:40:50 -06:00
1 parent 971ae99c9a
commit fd3e983fd0
6 files changed
+389 -4

No files matched your search

+202
View File
@@ -0,0 +1,202 @@
import resume from '@/data/resume.json'
import siteMetadata from '@/data/siteMetadata'
import Link from '@/components/Link'
import { genPageMetadata } from 'app/seo'
export const metadata = genPageMetadata({
title: 'Resume',
description: `${resume.basics.name} — ${resume.basics.label}`,
})
const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
function formatDate(value: string) {
if (!value) return ''
const [year, month] = value.split('-')
return month ? `${MONTHS[Number(month) - 1]} ${year}` : year
}
function formatRange(start: string, end: string) {
const from = formatDate(start)
const to = end ? formatDate(end) : 'Present'
return from ? `${from} — ${to}` : to
}
function SectionHeading({ children }: { children: React.ReactNode }) {
return (
<h2 className="mt-10 border-b border-gray-200 pb-2 text-[11.5px] font-bold uppercase tracking-[0.14em] text-primary-600 dark:border-gray-700 dark:text-primary-400">
{children}
</h2>
)
}
export default function Resume() {
const { basics, work, skills, education, certificates, projects } = resume
const contact = [
[basics.location.city, basics.location.region].filter(Boolean).join(', '),
basics.email,
basics.phone,
basics.url.replace(/^https?:\/\//, ''),
...basics.profiles.map((p) => p.network),
].filter(Boolean)
const contactHrefs: Record<string, string> = {
[basics.email]: `mailto:${basics.email}`,
[basics.phone]: `tel:${basics.phone.replace(/[^0-9+]/g, '')}`,
[basics.url.replace(/^https?:\/\//, '')]: basics.url,
...Object.fromEntries(basics.profiles.map((p) => [p.network, p.url])),
}
return (
<div className="divide-y divide-gray-200 dark:divide-gray-700">
<div className="flex flex-wrap items-end justify-between gap-4 pb-8 pt-6">
<div className="space-y-2">
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-5xl md:leading-14">
{basics.name}
</h1>
<p className="text-lg font-medium leading-7 text-primary-600 dark:text-primary-400">
{basics.label}
</p>
</div>
<Link
href={siteMetadata.resumePdf}
className="rounded-full border border-gray-300 px-3 py-1 text-[12.5px] font-medium text-gray-600 hover:border-primary-500 hover:text-primary-600 dark:border-gray-700 dark:text-gray-300 dark:hover:border-primary-400 dark:hover:text-primary-400"
>
Download PDF
</Link>
</div>
<div className="pt-8">
<div className="flex flex-wrap items-center gap-x-3.5 gap-y-1.5 border-b border-gray-200 pb-6 text-[13.5px] text-gray-500 dark:border-gray-700 dark:text-gray-400">
{contact.map((item, i) => (
<span key={item} className="flex items-center gap-x-3.5">
{i > 0 && (
<span aria-hidden="true" className="text-gray-400 dark:text-gray-500">
·
</span>
)}
{contactHrefs[item] ? (
<Link
href={contactHrefs[item]}
className="hover:text-primary-600 dark:hover:text-primary-400"
>
{item}
</Link>
) : (
<span>{item}</span>
)}
</span>
))}
</div>
<p className="mt-6 max-w-[62ch] text-[15.5px] leading-7 text-gray-700 dark:text-gray-300">
{basics.summary}
</p>
<SectionHeading>Experience</SectionHeading>
{work.map((job) => (
<div key={`${job.name}-${job.position}`} className="mt-5">
<div className="flex items-baseline justify-between gap-4">
<h3 className="text-base font-semibold tracking-tight text-gray-900 dark:text-gray-100">
{job.position}{' '}
<span className="text-primary-600 dark:text-primary-400">· {job.name}</span>
</h3>
<span className="whitespace-nowrap text-[12.5px] tabular-nums text-gray-500 dark:text-gray-400">
{formatRange(job.startDate, job.endDate)}
</span>
</div>
<ul className="mt-2 space-y-1">
{job.highlights.map((highlight) => (
<li
key={highlight}
className="relative pl-4 text-[14.5px] leading-6 text-gray-700 dark:text-gray-300"
>
<span
aria-hidden="true"
className="absolute left-0.5 top-[0.62em] h-[5px] w-[5px] rounded-full bg-primary-400"
/>
{highlight}
</li>
))}
</ul>
</div>
))}
<SectionHeading>Skills</SectionHeading>
{skills.map((group) => (
<div key={group.name} className="mt-4">
<div className="mb-2 text-xs font-semibold uppercase tracking-[0.04em] text-gray-500 dark:text-gray-400">
{group.name}
</div>
<div className="flex flex-wrap gap-[7px]">
{group.keywords.map((keyword) => (
<span
key={keyword}
className="rounded-full border border-gray-200 bg-gray-100 px-2.5 py-[3px] text-[12.5px] text-gray-700 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300"
>
{keyword}
</span>
))}
</div>
</div>
))}
<div className="grid gap-x-7 sm:grid-cols-2">
<div>
<SectionHeading>Education</SectionHeading>
{education.map((school) => (
<div key={school.institution} className="mt-4">
<div className="text-[15px] font-semibold text-gray-900 dark:text-gray-100">
{school.institution}
</div>
<div className="text-[13.5px] text-gray-500 dark:text-gray-400">{school.area}</div>
<div className="text-[12.5px] text-gray-500 dark:text-gray-400">
{formatDate(school.endDate)}
</div>
</div>
))}
</div>
<div>
<SectionHeading>Certifications</SectionHeading>
<ul className="mt-4">
{certificates.map((cert) => (
<li
key={cert.name}
className="border-b border-dashed border-gray-300 py-[5px] text-sm text-gray-700 last:border-b-0 dark:border-gray-700 dark:text-gray-300"
>
{cert.name}
{!cert.name.includes(cert.issuer) && (
<span className="text-gray-500 dark:text-gray-400"> · {cert.issuer}</span>
)}
</li>
))}
</ul>
</div>
</div>
<SectionHeading>Projects</SectionHeading>
{projects.map((project) => (
<div key={project.name} className="mt-4">
<div className="text-[15px] font-semibold text-gray-900 dark:text-gray-100">
{project.url ? (
<Link
href={project.url}
className="text-primary-600 hover:text-primary-700 dark:text-primary-400 dark:hover:text-primary-300"
>
{project.name}
</Link>
) : (
project.name
)}
</div>
<div className="text-sm text-gray-500 dark:text-gray-400">{project.description}</div>
</div>
))}
</div>
</div>
)
}