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!

fix: allow award title unbold via custom styles (#3250) (#3257)

EMRAN08d859010c80
diff --git a/packages/docx/src/section-renderers.ts b/packages/docx/src/section-renderers.ts
index 65856e52f..5bc298911 100644
--- a/packages/docx/src/section-renderers.ts
+++ b/packages/docx/src/section-renderers.ts
@@ -78,9 +78,9 @@ function sectionHeading(title: string, colorHex: string): Paragraph {
});
}
-function titleAndSubtitle(primary: string, secondary: string, rightText?: string): Paragraph {
+function titleAndSubtitle(primary: string, secondary: string, rightText?: string, bold = true): Paragraph {
const baseRun = getBaseRun();
- const children: (TextRun | ExternalHyperlink)[] = [new TextRun({ text: primary, bold: true, ...baseRun })];
+ const children: (TextRun | ExternalHyperlink)[] = [new TextRun({ text: primary, bold, ...baseRun })];
if (secondary) {
children.push(new TextRun({ text: ` — ${secondary}`, ...baseRun }));
@@ -321,7 +321,7 @@ function renderAwards(section: Sections["awards"], colorHex: string): Paragraph[
const paragraphs: Paragraph[] = [sectionHeading(section.title, colorHex)];
for (const item of items) {
- paragraphs.push(titleAndSubtitle(item.title, item.awarder, item.date));
+ paragraphs.push(titleAndSubtitle(item.title, item.awarder, item.date, false));
if (item.description) {
paragraphs.push(...htmlToParagraphs(item.description, getHtmlStyle()));
diff --git a/packages/pdf/src/templates/shared/sections.tsx b/packages/pdf/src/templates/shared/sections.tsx
index 7d3811393..abe1a0127 100644
--- a/packages/pdf/src/templates/shared/sections.tsx
+++ b/packages/pdf/src/templates/shared/sections.tsx
@@ -749,7 +749,7 @@ const AwardsSection = ({ sectionId = "awards", sectionData }: ItemSectionProps<A
<SectionItem key={item.id}>
<SectionItemHeader>
<View style={composeStyles(splitRowStyle, awardTitleDateRowStyle)}>
- <ItemTitle website={item.website}>{item.title}</ItemTitle>
+ <ItemTitle website={item.website} bold={false}>{item.title}</ItemTitle>
<Text style={composeStyles(alignEndStyle)}>{item.date}</Text>
</View>
<Text>{item.awarder}</Text>