Fixed term!
Some checks failed
Docker Deploy / build-and-push (push) Has been cancelled

This commit is contained in:
2025-06-26 16:19:52 -06:00
parent f89d32d6ce
commit 43c96c73b2
7 changed files with 534 additions and 160 deletions

View File

@@ -45,13 +45,19 @@ interface ResumeData {
position: string;
date: string;
}[];
awards: {
title: string;
organization: string;
date: string;
description?: string;
}[];
}
let resumeData: ResumeData | undefined = undefined;
let fetchError: string | null = null;
// Check if resume JSON file is configured before attempting to fetch
if (!siteConfig.resume.jsonFile || !siteConfig.resume.jsonFile.trim()) {
// Check if resume TOML file is configured before attempting to fetch
if (!siteConfig.resume.tomlFile || !siteConfig.resume.tomlFile.trim()) {
return Astro.redirect("/");
}
@@ -60,7 +66,7 @@ try {
const baseUrl = Astro.url.origin;
// Fetch the TOML file from the public directory
const response = await fetch(`${baseUrl}${siteConfig.resume.jsonFile}`);
const response = await fetch(`${baseUrl}${siteConfig.resume.tomlFile}`);
if (!response.ok) {
throw new Error(
@@ -331,5 +337,42 @@ if (!data) {
</div>
)
}
{
data.awards &&
data.awards.length > 0 &&
resumeConfig.sections.awards?.enabled && (
<div class="card bg-base-200 shadow-xl mb-4 sm:mb-6">
<div class="card-body p-4 sm:p-6 break-words">
<h2 class="card-title text-xl sm:text-2xl">
{resumeConfig.sections.awards.title ||
"Awards & Recognition"}
</h2>
<div class="space-y-4">
{data.awards.map((award) => (
<div class="border-l-2 border-warning pl-4 sm:pl-6">
<h3 class="text-lg sm:text-xl font-semibold">
{award.title}
</h3>
<div class="text-sm sm:text-base text-base-content/70 mb-2">
<span class="font-medium">
{award.organization}
</span>
<span class="block sm:inline sm:ml-4">
{award.date}
</span>
</div>
{award.description && (
<div class="text-sm sm:text-base text-base-content/80 mt-2">
{award.description}
</div>
)}
</div>
))}
</div>
</div>
</div>
)
}
</div>
</Layout>