Initial Commit

This commit is contained in:
Greg Kilmer
2026-07-04 07:42:24 -04:00
commit 71bffad507
77 changed files with 14437 additions and 0 deletions
+193
View File
@@ -0,0 +1,193 @@
/**
* ContactForm.tsx
* ---------------------------------------------------------------------------
* Accessible contact form island. Posts to /api/contact, which either sends an
* email via SMTP or fires a webhook. Manages idle / submitting / success / error
* states, does lightweight client validation, and includes a honeypot field for
* crude spam defense (the server also rate-limits).
*
* The form is keyboard-accessible, labels every field, and announces status
* changes via an aria-live region.
*/
import { useState, type FormEvent } from 'react';
type Status = 'idle' | 'submitting' | 'success' | 'error';
interface FieldErrors {
name?: string;
email?: string;
message?: string;
}
const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
export default function ContactForm() {
const [status, setStatus] = useState<Status>('idle');
const [errors, setErrors] = useState<FieldErrors>({});
const [errorMsg, setErrorMsg] = useState<string>('');
function validate(values: { name: string; email: string; message: string }): FieldErrors {
const e: FieldErrors = {};
if (!values.name.trim()) e.name = 'Please enter your name.';
if (!values.email.trim()) e.email = 'Please enter your email.';
else if (!EMAIL_RE.test(values.email)) e.email = 'That email address looks off.';
if (!values.message.trim()) e.message = 'Please enter a message.';
else if (values.message.trim().length < 10) e.message = 'A little more detail, please (10+ characters).';
return e;
}
async function onSubmit(ev: FormEvent<HTMLFormElement>) {
ev.preventDefault();
const form = ev.currentTarget;
const data = new FormData(form);
const values = {
name: String(data.get('name') ?? '').trim(),
email: String(data.get('email') ?? '').trim(),
message: String(data.get('message') ?? '').trim(),
// Honeypot: bots fill this, humans never see it.
company: String(data.get('company') ?? ''),
};
const found = validate(values);
setErrors(found);
if (Object.keys(found).length > 0) return;
setStatus('submitting');
setErrorMsg('');
try {
const res = await fetch('/api/contact', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(values),
});
const body = await res.json().catch(() => ({}));
if (!res.ok) {
throw new Error(body.error || 'Something went wrong. Please try again.');
}
setStatus('success');
form.reset();
} catch (err) {
setStatus('error');
setErrorMsg(err instanceof Error ? err.message : 'Something went wrong. Please try again.');
}
}
const inputBase =
'w-full rounded-lg border bg-transparent px-3 py-2.5 text-sm outline-none transition-colors focus:border-[var(--color-accent)]';
const labelBase = 'mb-1.5 block font-sans text-sm font-medium';
if (status === 'success') {
return (
<div
className="flex flex-col items-center gap-3 rounded-xl border p-8 text-center"
style={{ borderColor: 'var(--color-accent)', background: 'color-mix(in srgb, var(--color-accent) 8%, transparent)' }}
>
<span
className="inline-flex h-12 w-12 items-center justify-center rounded-full"
style={{ background: 'var(--color-accent)', color: 'var(--color-accent-contrast)' }}
aria-hidden="true"
>
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="3" strokeLinecap="round" strokeLinejoin="round">
<path d="M20 6L9 17l-5-5" />
</svg>
</span>
<h3 className="font-sans text-lg font-semibold" style={{ color: 'var(--color-text)' }}>
Message sent.
</h3>
<p className="text-sm" style={{ color: 'var(--color-text-muted)' }}>
Thanks for reaching out. I will get back to you soon.
</p>
<button
type="button"
onClick={() => setStatus('idle')}
className="btn btn-secondary mt-2"
>
Send another
</button>
</div>
);
}
return (
<form onSubmit={onSubmit} noValidate className="flex flex-col gap-5">
{/* Honeypot: visually hidden, not aria-hidden so screen readers can skip it. */}
<div style={{ position: 'absolute', left: '-9999px', top: 'auto', width: 1, height: 1, overflow: 'hidden' }} aria-hidden="true">
<label htmlFor="company">Company (leave blank)</label>
<input id="company" name="company" type="text" tabIndex={-1} autoComplete="off" />
</div>
<div className="flex flex-col">
<label htmlFor="name" className={labelBase} style={{ color: 'var(--color-text)' }}>Name</label>
<input
id="name"
name="name"
type="text"
autoComplete="name"
className={inputBase}
style={{
borderColor: errors.name ? 'var(--color-accent)' : 'var(--color-border)',
color: 'var(--color-text)',
}}
aria-invalid={Boolean(errors.name)}
aria-describedby={errors.name ? 'name-error' : undefined}
/>
{errors.name && <p id="name-error" className="mt-1 text-xs" style={{ color: 'var(--color-accent)' }}>{errors.name}</p>}
</div>
<div className="flex flex-col">
<label htmlFor="email" className={labelBase} style={{ color: 'var(--color-text)' }}>Email</label>
<input
id="email"
name="email"
type="email"
autoComplete="email"
className={inputBase}
style={{
borderColor: errors.email ? 'var(--color-accent)' : 'var(--color-border)',
color: 'var(--color-text)',
}}
aria-invalid={Boolean(errors.email)}
aria-describedby={errors.email ? 'email-error' : undefined}
/>
{errors.email && <p id="email-error" className="mt-1 text-xs" style={{ color: 'var(--color-accent)' }}>{errors.email}</p>}
</div>
<div className="flex flex-col">
<label htmlFor="message" className={labelBase} style={{ color: 'var(--color-text)' }}>Message</label>
<textarea
id="message"
name="message"
rows={5}
className={inputBase}
style={{
borderColor: errors.message ? 'var(--color-accent)' : 'var(--color-border)',
color: 'var(--color-text)',
resize: 'vertical',
}}
aria-invalid={Boolean(errors.message)}
aria-describedby={errors.message ? 'message-error' : undefined}
/>
{errors.message && <p id="message-error" className="mt-1 text-xs" style={{ color: 'var(--color-accent)' }}>{errors.message}</p>}
</div>
{status === 'error' && (
<p className="rounded-lg p-3 text-sm" style={{ background: 'color-mix(in srgb, var(--color-accent) 12%, transparent)', color: 'var(--color-accent)' }}>
{errorMsg}
</p>
)}
<button
type="submit"
disabled={status === 'submitting'}
className="btn btn-primary self-start disabled:cursor-not-allowed disabled:opacity-60"
>
{status === 'submitting' ? 'Sending…' : 'Send message'}
</button>
{/* Screen-reader status announcements. */}
<p className="sr-only" role="status" aria-live="polite">
{status === 'submitting' ? 'Sending your message.' : ''}
</p>
</form>
);
}
@@ -0,0 +1,79 @@
---
/**
* ProjectCard.astro
* ---------------------------------------------------------------------------
* Card for a single project entry from the `projects` collection. Renders title,
* role, tech pills, summary, and links (repo/demo/case study). Placeholder
* entries (frontmatter `placeholder: true`) get a subtle badge so they read as
* "to be filled" rather than real work, per the chosen content approach.
*/
import { type CollectionEntry } from 'astro:content';
import Icon from '@components/Icon.astro';
interface Props {
project: CollectionEntry<'projects'>;
}
const { project } = Astro.props;
const d = project.data;
const links = [
d.repo && { href: d.repo, label: 'GitHub', icon: 'github' },
d.demo && { href: d.demo, label: 'Live demo', icon: 'open-in-new' },
d.caseStudy && { href: d.caseStudy, label: 'Case study', icon: 'file-document-outline' },
].filter(Boolean) as { href: string; label: string; icon: string }[];
---
<article
class:list={[
'card card-interactive flex h-full flex-col gap-4',
d.placeholder && 'border-dashed',
]}
style={d.placeholder ? 'border-color: color-mix(in srgb, var(--color-accent) 45%, transparent);' : ''}
>
<div class="flex items-start justify-between gap-3">
<div class="flex flex-col gap-1">
<h3 style="color: var(--color-text);">{d.title}</h3>
<p class="font-mono text-xs uppercase tracking-[0.18em]" style="color: var(--color-text-subtle);">
{d.role}
</p>
</div>
{d.placeholder && (
<span
class="pill"
style="background: color-mix(in srgb, var(--color-accent) 18%, transparent); color: var(--color-accent);"
>
<Icon name="pencil" class="h-3.5 w-3.5" />
Placeholder
</span>
)}
</div>
{d.tech.length > 0 && (
<ul class="flex flex-wrap gap-2">
{d.tech.map((t) => <li class="pill">{t}</li>)}
</ul>
)}
<p class="grow text-sm leading-relaxed" style="color: var(--color-text-muted);">
{d.summary}
</p>
{links.length > 0 && (
<ul class="mt-1 flex flex-wrap gap-4">
{links.map((l) => (
<li>
<a
href={l.href}
target="_blank"
rel="noopener noreferrer"
class="inline-flex items-center gap-1.5 font-sans text-sm font-semibold transition-colors"
style="color: var(--color-accent);"
>
<Icon name={l.icon} class="h-4 w-4" />
{l.label}
</a>
</li>
))}
</ul>
)}
</article>
@@ -0,0 +1,74 @@
---
/**
* SectionNav.astro
* ---------------------------------------------------------------------------
* Sticky in-page sub-navigation for the Professional page. Jumps between the
* six anchor sections (Summary, Experience, Skills, Projects, Education,
* Contact) via smooth scroll. Hidden on small screens where the page reads as a
* simple scroll. Active state is computed client-side via IntersectionObserver.
*/
import Icon from '@components/Icon.astro';
const sections = [
{ id: 'summary', label: 'Summary', icon: 'format-list-text' },
{ id: 'experience', label: 'Experience', icon: 'timeline-text' },
{ id: 'skills', label: 'Skills', icon: 'chart-bar' },
{ id: 'projects', label: 'Projects', icon: 'view-grid' },
{ id: 'education', label: 'Education', icon: 'school' },
{ id: 'contact', label: 'Contact', icon: 'email' },
];
---
<nav aria-label="Professional sections" class="hidden lg:block">
<div
class="sticky top-24 flex flex-wrap gap-1 rounded-xl border p-1.5"
style="border-color: var(--color-border); background: color-mix(in srgb, var(--color-surface-raised) 60%, transparent); backdrop-filter: blur(6px);"
>
{sections.map((s) => (
<a
href={`#${s.id}`}
data-section-link={s.id}
class="inline-flex items-center gap-1.5 rounded-lg px-3 py-1.5 font-sans text-sm font-medium transition-colors"
style="color: var(--color-text-muted);"
>
<Icon name={s.icon} class="h-4 w-4" />
{s.label}
</a>
))}
</div>
</nav>
<script>
// Highlight the link for whichever section is currently in view.
function setupSectionSpy() {
const links = Array.from(
document.querySelectorAll<HTMLAnchorElement>('[data-section-link]'),
);
if (!links.length) return;
const sections = links
.map((l) => document.getElementById(l.dataset.sectionLink!))
.filter((el): el is HTMLElement => Boolean(el));
const setActive = (id: string) => {
for (const l of links) {
const active = l.dataset.sectionLink === id;
l.style.color = active ? 'var(--color-accent)' : 'var(--color-text-muted)';
l.style.background = active
? 'color-mix(in srgb, var(--color-accent) 14%, transparent)'
: 'transparent';
}
};
const io = new IntersectionObserver(
(entries) => {
const visible = entries
.filter((e) => e.isIntersecting)
.sort((a, b) => b.intersectionRatio - a.intersectionRatio)[0];
if (visible) setActive(visible.target.id);
},
{ rootMargin: '-30% 0px -55% 0px', threshold: [0, 0.25, 0.5] },
);
sections.forEach((s) => io.observe(s));
}
setupSectionSpy();
document.addEventListener('astro:page-load', setupSectionSpy);
</script>
+115
View File
@@ -0,0 +1,115 @@
---
/**
* SkillGrid.astro
* ---------------------------------------------------------------------------
* Renders the spec's three skill tiers (Core Competencies, Technical Stack,
* Emerging & Exploring) as categorized cards. The spec lists some items as
* "[Fill in]" for languages/frameworks/tools; those are surfaced as Placeholder
* slots rather than invented content.
*
* Items map to mdi icons for visual texture. The Core tier uses a subtle bar
* treatment (decorative, not a proficiency claim) to feel like the spec's
* "visual skill bars" suggestion without implying false metrics.
*/
import Icon from '@components/Icon.astro';
import Placeholder from '@components/layout/Placeholder.astro';
const core = [
{ icon: 'cloud', label: 'Cloud Architecture & Development' },
{ icon: 'cellphone-link', label: 'Mobile Application Development' },
{ icon: 'server-network', label: 'SAP Business Technology Platform (BTP)' },
{ icon: 'account-group', label: 'Team Leadership & Technical Mentorship' },
{ icon: 'translate', label: 'Cross-functional Communication' },
];
const emerging = [
{ icon: 'chart-line', label: 'SAP BTP deep-dive (active expansion)' },
{ icon: 'robot', label: 'AI-powered development tooling' },
{ icon: 'cog-refresh', label: 'Advanced automation and workflow engineering' },
];
// Technical stack mixes known items (from spec context) with explicit gaps.
const techStack = [
{ icon: 'code-braces', label: 'Languages', value: null, hint: 'Likely JavaScript/TypeScript, Python, Java, ABAP given SAP focus.' },
{ icon: 'cube-outline', label: 'Frameworks', value: null, hint: 'Add your primary frameworks here.' },
{ icon: 'microsoft-azure-devops', label: 'Cloud Platforms', value: 'SAP BTP, [others]', hint: 'List the cloud platforms you ship on.' },
{ icon: 'git', label: 'Tools', value: 'Git, CI/CD pipelines, [fill in]', hint: 'Add the rest of your toolchain.' },
{ icon: 'brain', label: 'AI/ML', value: 'Hands-on experience with machine learning frameworks and LLM integration', hint: null },
];
---
<div class="flex flex-col gap-8">
<!-- Core Competencies -->
<div class="flex flex-col gap-4">
<h3 class="font-sans" style="color: var(--color-text);">Core Competencies</h3>
<ul class="grid gap-3 sm:grid-cols-2">
{core.map((item, i) => (
<li
class="reveal card flex items-center gap-3"
data-reveal
style={`transition-delay:${i * 60}ms`}
>
<span
class="inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-lg"
style="background: color-mix(in srgb, var(--color-accent) 16%, transparent); color: var(--color-accent);"
aria-hidden="true"
>
<Icon name={item.icon} class="h-5 w-5" />
</span>
<span class="text-sm font-medium" style="color: var(--color-text);">{item.label}</span>
{/* Decorative bar; intentionally not a % so we never imply false metrics. */}
<span class="ml-auto hidden h-1.5 w-16 overflow-hidden rounded-full sm:block" style="background: var(--color-border);" aria-hidden="true">
<span class="block h-full w-full" style="background: var(--color-accent);"></span>
</span>
</li>
))}
</ul>
</div>
<!-- Technical Stack -->
<div class="flex flex-col gap-4">
<h3 class="font-sans" style="color: var(--color-text);">Technical Stack</h3>
<div class="grid gap-4 sm:grid-cols-2">
{techStack.map((item) => (
<div class="card flex flex-col gap-2">
<div class="flex items-center gap-3">
<span
class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg"
style="background: color-mix(in srgb, var(--color-secondary) 18%, transparent); color: var(--color-secondary);"
aria-hidden="true"
>
<Icon name={item.icon} class="h-5 w-5" />
</span>
<span class="font-sans text-sm font-semibold" style="color: var(--color-text);">{item.label}</span>
</div>
{item.value
? <p class="text-sm" style="color: var(--color-text-muted);">{item.value}</p>
: <Placeholder label={item.label} hint={item.hint ?? ''} class="mt-1" />}
</div>
))}
</div>
</div>
<!-- Emerging & Exploring -->
<div class="flex flex-col gap-4">
<h3 class="font-sans" style="color: var(--color-text);">Emerging &amp; Exploring</h3>
<ul class="grid gap-3 sm:grid-cols-3">
{emerging.map((item, i) => (
<li
class="reveal card flex items-start gap-3"
data-reveal
style={`transition-delay:${i * 70}ms`}
>
<span
class="inline-flex h-9 w-9 shrink-0 items-center justify-center rounded-lg"
style="background: color-mix(in srgb, var(--color-accent) 16%, transparent); color: var(--color-accent);"
aria-hidden="true"
>
<Icon name={item.icon} class="h-5 w-5" />
</span>
<span class="text-sm" style="color: var(--color-text);">{item.label}</span>
</li>
))}
</ul>
</div>
</div>
@@ -0,0 +1,95 @@
---
/**
* Timeline.astro
* ---------------------------------------------------------------------------
* Vertical timeline for the Experience section. Each entry has a marker (mdi
* icon), a period label, company/title, focus, and rendered markdown body (the
* bullet list from the experience collection entry).
*
* The vertical line is drawn with a pseudo-element; markers sit on it. Entry
* bodies are expandable detail (the spec asks for "expandable detail"). On
* small screens the marker line stays but spacing tightens.
*
* Astro 7 content layer: `render(entry)` returns `{ Content }` (an Astro
* component), which we render with `<Content />` rather than stringifying.
*/
import { type CollectionEntry, render } from 'astro:content';
import Icon from '@components/Icon.astro';
import Reveal from '@components/motion/Reveal.astro';
interface Props {
entries: CollectionEntry<'experience'>[];
}
const { entries } = Astro.props;
// Pre-render each entry to get its Content component (Astro 7 API).
const rendered = await Promise.all(
entries.map(async (e) => ({
entry: e,
Content: (await render(e)).Content,
})),
);
---
<ol class="relative flex flex-col gap-10">
{/* The vertical line. */}
<span
class="absolute left-[1.15rem] top-2 bottom-2 w-px"
style="background: var(--color-border);"
aria-hidden="true"
></span>
{rendered.map(({ entry, Content }, i) => (
<li class="relative pl-12">
<Reveal delay={i * 80}>
{/* Marker */}
<span
class="absolute left-0 top-0 inline-flex h-9 w-9 items-center justify-center rounded-full border-4"
style="background: var(--color-surface-raised); border-color: var(--color-surface);"
aria-hidden="true"
>
<span
class="inline-flex h-9 w-9 items-center justify-center rounded-full"
style="background: color-mix(in srgb, var(--color-accent) 16%, transparent);"
>
<Icon name={entry.data.icon} class="h-4 w-4" />
</span>
</span>
<div class="card flex flex-col gap-3">
<div class="flex flex-wrap items-baseline justify-between gap-x-4 gap-y-1">
<h3 style="color: var(--color-text);">{entry.data.company}</h3>
<span class="font-mono text-xs uppercase tracking-[0.18em]" style="color: var(--color-text-subtle);">
{entry.data.period}
</span>
</div>
<p class="font-sans font-semibold" style="color: var(--color-accent);">
{entry.data.title}
</p>
{entry.data.focus && (
<p class="text-sm italic" style="color: var(--color-text-muted);">
Focus: {entry.data.focus}
</p>
)}
<details class="group mt-1">
<summary
class="flex cursor-pointer list-none items-center gap-2 font-sans text-sm font-semibold transition-colors"
style="color: var(--color-accent);"
>
<Icon name="chevron-down" class="h-4 w-4 transition-transform group-open:rotate-180" />
Show details
</summary>
<div
class="mt-4 flex flex-col gap-3 text-sm leading-relaxed [&_ul]:flex [&_ul]:flex-col [&_ul]:gap-2 [&_li]:ml-4 [&_li]:list-disc [&_strong]:font-semibold [&_strong]:text-[var(--color-text)] [&_p:first-child]:mt-0"
style="color: var(--color-text-muted);"
>
<Content />
</div>
</details>
</div>
</Reveal>
</li>
))}
</ol>