Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

fixes #2868

Amruth Pillai11373763fd67
diff --git a/src/components/resume/shared/items/awards-item.tsx b/src/components/resume/shared/items/awards-item.tsx
index 4e0bc3141..d57d3e1a7 100644
--- a/src/components/resume/shared/items/awards-item.tsx
+++ b/src/components/resume/shared/items/awards-item.tsx
@@ -45,12 +45,13 @@ export function AwardsItem({ className, ...item }: AwardsItemProps) {
<div className={cn("awards-item", className)}>
{/* Header */}
<div className="section-item-header awards-item-header">
- <div className="flex flex-wrap items-start justify-between gap-x-2">
- {headerFields.map((field, index) => (
- <div key={field.key} className={cn(index === 0 && "basis-full")}>
- {field.content}
- </div>
- ))}
+ <div className="flex items-start justify-between gap-x-2">
+ <div className="flex min-w-0 flex-1 flex-col items-start">
+ {headerFields.get("title")?.content}
+ {headerFields.get("awarder")?.content}
+ </div>
+
+ <div className="flex min-w-0 shrink-0 flex-col items-end text-end">{headerFields.get("date")?.content}</div>
</div>
</div>
diff --git a/src/components/resume/shared/items/certifications-item.tsx b/src/components/resume/shared/items/certifications-item.tsx
index 352e55506..d38d89fb2 100644
--- a/src/components/resume/shared/items/certifications-item.tsx
+++ b/src/components/resume/shared/items/certifications-item.tsx
@@ -45,12 +45,13 @@ export function CertificationsItem({ className, ...item }: CertificationsItemPro
<div className={cn("certifications-item", className)}>
{/* Header */}
<div className="section-item-header certifications-item-header">
- <div className="flex flex-wrap items-start justify-between gap-x-2">
- {headerFields.map((field, index) => (
- <div key={field.key} className={cn(index === 0 && "basis-full")}>
- {field.content}
- </div>
- ))}
+ <div className="flex items-start justify-between gap-x-2">
+ <div className="flex min-w-0 flex-1 flex-col items-start">
+ {headerFields.get("title")?.content}
+ {headerFields.get("issuer")?.content}
+ </div>
+
+ <div className="flex min-w-0 shrink-0 flex-col items-end text-end">{headerFields.get("date")?.content}</div>
</div>
</div>
diff --git a/src/components/resume/shared/items/education-item.tsx b/src/components/resume/shared/items/education-item.tsx
index b2a45807e..40929f687 100644
--- a/src/components/resume/shared/items/education-item.tsx
+++ b/src/components/resume/shared/items/education-item.tsx
@@ -52,12 +52,16 @@ export function EducationItem({ className, ...item }: EducationItemProps) {
<div className={cn("education-item", className)}>
{/* Header */}
<div className="section-item-header education-item-header mb-2">
- <div className="flex flex-wrap items-start justify-between gap-x-2">
- {headerFields.map((field, index) => (
- <div key={field.key} className={cn(index === 0 && "basis-full")}>
- {field.content}
- </div>
- ))}
+ <div className="flex items-start justify-between gap-x-2">
+ <div className="flex min-w-0 flex-1 flex-col items-start">
+ {headerFields.get("school")?.content}
+ {headerFields.get("area")?.content}
+ </div>
+
+ <div className="flex min-w-0 shrink-0 flex-col items-end text-end">
+ {headerFields.get("degreeAndGrade")?.content}
+ {headerFields.get("locationAndPeriod")?.content}
+ </div>
</div>
</div>
diff --git a/src/components/resume/shared/items/experience-item.tsx b/src/components/resume/shared/items/experience-item.tsx
index b3fabea1a..28a7a5447 100644
--- a/src/components/resume/shared/items/experience-item.tsx
+++ b/src/components/resume/shared/items/experience-item.tsx
@@ -46,17 +46,20 @@ export function ExperienceItem({ className, ...item }: ExperienceItemProps) {
content: <span className="section-item-metadata experience-item-period">{item.period}</span>,
},
);
-
return (
<div className={cn("experience-item", className)}>
{/* Header */}
<div className="section-item-header experience-item-header">
- <div className="flex flex-wrap items-start justify-between gap-x-2">
- {headerFields.map((field, index) => (
- <div key={field.key} className={cn(index === 0 && "basis-full")}>
- {field.content}
- </div>
- ))}
+ <div className="flex items-start justify-between gap-x-2">
+ <div className="flex min-w-0 flex-1 flex-col items-start">
+ {headerFields.get("company")?.content}
+ {headerFields.get("position")?.content}
+ </div>
+
+ <div className="flex min-w-0 shrink-0 flex-col items-end text-end">
+ {headerFields.get("location")?.content}
+ {headerFields.get("period")?.content}
+ </div>
</div>
</div>
@@ -65,7 +68,7 @@ export function ExperienceItem({ className, ...item }: ExperienceItemProps) {
<div className="experience-item-roles mt-0 flex flex-col gap-y-1">
{item.roles.map((role) => (
<div key={role.id} className="experience-item-role">
- <div className="flex flex-wrap items-start justify-between gap-x-2">
+ <div className="grid grid-cols-2 items-start justify-between gap-x-2">
<div className="section-item-metadata experience-item-role-position">{role.position}</div>
<div className="section-item-metadata experience-item-role-period">{role.period}</div>
</div>
diff --git a/src/components/resume/shared/items/publications-item.tsx b/src/components/resume/shared/items/publications-item.tsx
index 5735bfda4..e56715fd2 100644
--- a/src/components/resume/shared/items/publications-item.tsx
+++ b/src/components/resume/shared/items/publications-item.tsx
@@ -45,12 +45,13 @@ export function PublicationsItem({ className, ...item }: PublicationsItemProps)
<div className={cn("publications-item", className)}>
{/* Header */}
<div className="section-item-header publications-item-header">
- <div className="flex flex-wrap items-start justify-between gap-x-2">
- {headerFields.map((field, index) => (
- <div key={field.key} className={cn(index === 0 && "basis-full")}>
- {field.content}
- </div>
- ))}
+ <div className="flex items-start justify-between gap-x-2">
+ <div className="flex min-w-0 flex-1 flex-col items-start">
+ {headerFields.get("title")?.content}
+ {headerFields.get("publisher")?.content}
+ </div>
+
+ <div className="flex min-w-0 shrink-0 flex-col items-end text-end">{headerFields.get("date")?.content}</div>
</div>
</div>
diff --git a/src/components/resume/shared/items/references-item.tsx b/src/components/resume/shared/items/references-item.tsx
index ef3ba47f0..20dd97e2a 100644
--- a/src/components/resume/shared/items/references-item.tsx
+++ b/src/components/resume/shared/items/references-item.tsx
@@ -40,12 +40,12 @@ export function ReferencesItem({ className, ...item }: ReferencesItemProps) {
<div className={cn("references-item", className)}>
{/* Header */}
<div className="section-item-header references-item-header">
- <div className="flex flex-wrap items-start justify-between gap-x-2">
- {headerFields.map((field, index) => (
- <div key={field.key} className={cn(index === 0 && "basis-full")}>
- {field.content}
- </div>
- ))}
+ <div className="flex items-start justify-between gap-x-2">
+ <div className="flex min-w-0 flex-1 flex-col items-start">{headerFields.get("name")?.content}</div>
+
+ <div className="flex min-w-0 shrink-0 flex-col items-end text-end">
+ {headerFields.get("position")?.content}
+ </div>
</div>
</div>
diff --git a/src/components/resume/shared/items/volunteer-item.tsx b/src/components/resume/shared/items/volunteer-item.tsx
index 894eeacc3..d9177caca 100644
--- a/src/components/resume/shared/items/volunteer-item.tsx
+++ b/src/components/resume/shared/items/volunteer-item.tsx
@@ -45,12 +45,13 @@ export function VolunteerItem({ className, ...item }: VolunteerItemProps) {
<div className={cn("volunteer-item", className)}>
{/* Header */}
<div className="section-item-header volunteer-item-header">
- <div className="flex flex-wrap items-start justify-between gap-x-2">
- {headerFields.map((field, index) => (
- <div key={field.key} className={cn(index === 0 && "basis-full")}>
- {field.content}
- </div>
- ))}
+ <div className="flex items-start justify-between gap-x-2">
+ <div className="flex min-w-0 flex-1 flex-col items-start">
+ {headerFields.get("organization")?.content}
+ {headerFields.get("location")?.content}
+ </div>
+
+ <div className="flex min-w-0 shrink-0 flex-col items-end text-end">{headerFields.get("period")?.content}</div>
</div>
</div>
diff --git a/src/components/resume/shared/linked-title.tsx b/src/components/resume/shared/linked-title.tsx
index fa485baa7..c6d09e30e 100644
--- a/src/components/resume/shared/linked-title.tsx
+++ b/src/components/resume/shared/linked-title.tsx
@@ -10,7 +10,7 @@ type LinkedTitleProps = {
export function LinkedTitle({ title, website, showLinkInTitle, className }: LinkedTitleProps) {
if (showLinkInTitle && website?.url) {
return (
- <a href={website.url} target="_blank" rel="noopener" className={cn("inline-block", className)}>
+ <a href={website.url} target="_blank" rel="noopener" className={cn("inline", className)}>
<strong>{title}</strong>
</a>
);
diff --git a/src/utils/field.ts b/src/utils/field.ts
index 6bec275da..350ad9a7a 100644
--- a/src/utils/field.ts
+++ b/src/utils/field.ts
@@ -19,5 +19,6 @@ export function filterFieldValues<TKey extends string, TField extends KeyedField
values: KeyValueMap<TKey>,
...fields: TField[]
) {
- return fields.filter((field) => Boolean(values[field.key]?.trim()));
+ const filteredFields = fields.filter((field) => Boolean(values[field.key]?.trim()));
+ return new Map(filteredFields.map((field) => [field.key, field] as const));
}