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(#2976): update header name line height across multiple templates

Amruth Pillai1b0bb067b66d
diff --git a/packages/pdf/src/templates/azurill/AzurillPage.tsx b/packages/pdf/src/templates/azurill/AzurillPage.tsx
index 964feaca3..aed71fec5 100644
--- a/packages/pdf/src/templates/azurill/AzurillPage.tsx
+++ b/packages/pdf/src/templates/azurill/AzurillPage.tsx
@@ -19,7 +19,7 @@ import { getTemplatePageSize } from "../shared/page-size";
import { hasTemplatePicture } from "../shared/picture";
import { Heading, Icon, Link, Text } from "../shared/primitives";
import { Section } from "../shared/sections";
-import { composeStyles, resolvePlacementColor } from "../shared/styles";
+import { composeStyles, headerNameLineHeight, resolvePlacementColor } from "../shared/styles";
type AzurillStyles = Omit<TemplateStyleSlots, "page"> & {
page: Style;
@@ -263,7 +263,7 @@ const useAzurillTemplate = (): AzurillTemplate => {
},
headerName: {
fontSize: metadata.typography.heading.fontSize * 1.5,
- lineHeight: 1,
+ lineHeight: headerNameLineHeight,
},
headerContactRow: {
justifyContent: "center",
diff --git a/packages/pdf/src/templates/bronzor/BronzorPage.tsx b/packages/pdf/src/templates/bronzor/BronzorPage.tsx
index 87d9f9494..de8ecf7bd 100644
--- a/packages/pdf/src/templates/bronzor/BronzorPage.tsx
+++ b/packages/pdf/src/templates/bronzor/BronzorPage.tsx
@@ -13,7 +13,7 @@ import { getTemplatePageSize } from "../shared/page-size";
import { hasTemplatePicture } from "../shared/picture";
import { Heading, Icon, Link, Text } from "../shared/primitives";
import { Section } from "../shared/sections";
-import { composeStyles } from "../shared/styles";
+import { composeStyles, headerNameLineHeight } from "../shared/styles";
type BronzorStyles = Omit<TemplateStyleSlots, "page"> & {
page: Style;
@@ -259,7 +259,7 @@ const useBronzorTemplate = (): BronzorTemplate => {
},
headerName: {
fontSize: metadata.typography.heading.fontSize * 1.5,
- lineHeight: 1,
+ lineHeight: headerNameLineHeight,
},
headerContactRow: {
justifyContent: "center",
diff --git a/packages/pdf/src/templates/chikorita/ChikoritaPage.tsx b/packages/pdf/src/templates/chikorita/ChikoritaPage.tsx
index 013ef897a..636f97625 100644
--- a/packages/pdf/src/templates/chikorita/ChikoritaPage.tsx
+++ b/packages/pdf/src/templates/chikorita/ChikoritaPage.tsx
@@ -13,7 +13,7 @@ import { getTemplatePageSize } from "../shared/page-size";
import { hasTemplatePicture } from "../shared/picture";
import { Heading, Icon, Link, Text } from "../shared/primitives";
import { Section } from "../shared/sections";
-import { composeStyles, resolvePlacementColor } from "../shared/styles";
+import { composeStyles, headerNameLineHeight, resolvePlacementColor } from "../shared/styles";
type ChikoritaStyles = Omit<TemplateStyleSlots, "page"> & {
page: Style;
@@ -290,7 +290,7 @@ const useChikoritaTemplate = (): ChikoritaTemplate => {
},
headerName: {
fontSize: metadata.typography.heading.fontSize * 1.5,
- lineHeight: 1,
+ lineHeight: headerNameLineHeight,
},
headerContactList: {
rowGap: metrics.gapY(0.125),
diff --git a/packages/pdf/src/templates/ditgar/DitgarPage.tsx b/packages/pdf/src/templates/ditgar/DitgarPage.tsx
index a778f4ecb..01453b97f 100644
--- a/packages/pdf/src/templates/ditgar/DitgarPage.tsx
+++ b/packages/pdf/src/templates/ditgar/DitgarPage.tsx
@@ -13,7 +13,7 @@ import { getTemplatePageSize } from "../shared/page-size";
import { hasTemplatePicture } from "../shared/picture";
import { Heading, Icon, Link, Text } from "../shared/primitives";
import { Section } from "../shared/sections";
-import { composeStyles, resolvePlacementColor } from "../shared/styles";
+import { composeStyles, headerNameLineHeight, resolvePlacementColor } from "../shared/styles";
type DitgarStyles = Omit<TemplateStyleSlots, "page"> & {
page: Style;
@@ -273,7 +273,7 @@ const useDitgarTemplate = (): DitgarTemplate => {
},
headerName: {
fontSize: metadata.typography.heading.fontSize * 1.5,
- lineHeight: 1,
+ lineHeight: headerNameLineHeight,
color: background,
},
headerText: { color: background },
diff --git a/packages/pdf/src/templates/ditto/DittoPage.tsx b/packages/pdf/src/templates/ditto/DittoPage.tsx
index fa32812bc..902c0de55 100644
--- a/packages/pdf/src/templates/ditto/DittoPage.tsx
+++ b/packages/pdf/src/templates/ditto/DittoPage.tsx
@@ -13,7 +13,7 @@ import { getTemplatePageSize } from "../shared/page-size";
import { hasTemplatePicture } from "../shared/picture";
import { Heading, Icon, Link, Text } from "../shared/primitives";
import { Section } from "../shared/sections";
-import { composeStyles } from "../shared/styles";
+import { composeStyles, headerNameLineHeight } from "../shared/styles";
type DittoStyles = Omit<TemplateStyleSlots, "page"> & {
page: Style;
@@ -299,7 +299,7 @@ const useDittoTemplate = (): DittoTemplate => {
headerName: {
fontSize: metadata.typography.heading.fontSize * 1.5,
color: background,
- lineHeight: 1,
+ lineHeight: headerNameLineHeight,
},
headerHeadline: {
color: background,
diff --git a/packages/pdf/src/templates/gengar/GengarPage.tsx b/packages/pdf/src/templates/gengar/GengarPage.tsx
index b836d042d..4871112b3 100644
--- a/packages/pdf/src/templates/gengar/GengarPage.tsx
+++ b/packages/pdf/src/templates/gengar/GengarPage.tsx
@@ -13,7 +13,7 @@ import { getTemplatePageSize } from "../shared/page-size";
import { hasTemplatePicture } from "../shared/picture";
import { Heading, Icon, Link, Text } from "../shared/primitives";
import { Section } from "../shared/sections";
-import { composeStyles, resolvePlacementColor } from "../shared/styles";
+import { composeStyles, headerNameLineHeight, resolvePlacementColor } from "../shared/styles";
type GengarStyles = Omit<TemplateStyleSlots, "page"> & {
page: Style;
@@ -318,7 +318,7 @@ const useGengarTemplate = (): GengarTemplate => {
headerName: {
fontSize: metadata.typography.heading.fontSize * 1.5,
color: background,
- lineHeight: 1,
+ lineHeight: headerNameLineHeight,
},
headerText: {
color: background,
diff --git a/packages/pdf/src/templates/glalie/GlaliePage.tsx b/packages/pdf/src/templates/glalie/GlaliePage.tsx
index a0bea336d..138692809 100644
--- a/packages/pdf/src/templates/glalie/GlaliePage.tsx
+++ b/packages/pdf/src/templates/glalie/GlaliePage.tsx
@@ -13,7 +13,7 @@ import { getTemplatePageSize } from "../shared/page-size";
import { hasTemplatePicture } from "../shared/picture";
import { Heading, Icon, Link, Text } from "../shared/primitives";
import { Section } from "../shared/sections";
-import { composeStyles, resolvePlacementColor } from "../shared/styles";
+import { composeStyles, headerNameLineHeight, resolvePlacementColor } from "../shared/styles";
type GlalieStyles = Omit<TemplateStyleSlots, "page"> & {
page: Style;
@@ -254,7 +254,7 @@ const useGlalieTemplate = (): GlalieTemplate => {
},
headerTitle: { alignItems: "center", textAlign: "center" },
headerIdentity: { alignItems: "center", textAlign: "center", rowGap: metrics.gapY(0.35) },
- headerName: { fontSize: metadata.typography.heading.fontSize * 1.5, lineHeight: 1 },
+ headerName: { fontSize: metadata.typography.heading.fontSize * 1.5, lineHeight: headerNameLineHeight },
contactList: {
width: "100%",
borderWidth: 1,
diff --git a/packages/pdf/src/templates/kakuna/KakunaPage.tsx b/packages/pdf/src/templates/kakuna/KakunaPage.tsx
index ad711edd3..bb7195b5e 100644
--- a/packages/pdf/src/templates/kakuna/KakunaPage.tsx
+++ b/packages/pdf/src/templates/kakuna/KakunaPage.tsx
@@ -13,7 +13,7 @@ import { getTemplatePageSize } from "../shared/page-size";
import { hasTemplatePicture } from "../shared/picture";
import { Heading, Icon, Link, Text } from "../shared/primitives";
import { Section } from "../shared/sections";
-import { composeStyles } from "../shared/styles";
+import { composeStyles, headerNameLineHeight } from "../shared/styles";
type KakunaStyles = Omit<TemplateStyleSlots, "page"> & {
page: Style;
@@ -259,7 +259,7 @@ const useKakunaTemplate = (): KakunaTemplate => {
headerName: {
width: "100%",
fontSize: metadata.typography.heading.fontSize * 1.5,
- lineHeight: 1,
+ lineHeight: headerNameLineHeight,
textAlign: "center",
},
headerText: {
diff --git a/packages/pdf/src/templates/lapras/LaprasPage.tsx b/packages/pdf/src/templates/lapras/LaprasPage.tsx
index 51df3c674..bc191840a 100644
--- a/packages/pdf/src/templates/lapras/LaprasPage.tsx
+++ b/packages/pdf/src/templates/lapras/LaprasPage.tsx
@@ -13,7 +13,7 @@ import { getTemplatePageSize } from "../shared/page-size";
import { hasTemplatePicture } from "../shared/picture";
import { Heading, Icon, Link, Text } from "../shared/primitives";
import { Section } from "../shared/sections";
-import { composeStyles } from "../shared/styles";
+import { composeStyles, headerNameLineHeight } from "../shared/styles";
type LaprasStyles = Omit<TemplateStyleSlots, "page"> & {
page: Style;
@@ -224,7 +224,7 @@ const useLaprasTemplate = (): LaprasTemplate => {
},
headerTitle: { rowGap: metrics.gapY(0.5) },
headerIdentity: { textAlign: "left", alignItems: "flex-start", rowGap: metrics.gapY(0.35) },
- headerName: { fontSize: metadata.typography.heading.fontSize * 1.5, lineHeight: 1 },
+ headerName: { fontSize: metadata.typography.heading.fontSize * 1.5, lineHeight: headerNameLineHeight },
contactList: {
flexDirection: "row",
flexWrap: "wrap",
diff --git a/packages/pdf/src/templates/leafish/LeafishPage.tsx b/packages/pdf/src/templates/leafish/LeafishPage.tsx
index 49053e8de..c3da2b4e2 100644
--- a/packages/pdf/src/templates/leafish/LeafishPage.tsx
+++ b/packages/pdf/src/templates/leafish/LeafishPage.tsx
@@ -13,7 +13,7 @@ import { getTemplatePageSize } from "../shared/page-size";
import { hasTemplatePicture } from "../shared/picture";
import { Heading, Icon, Link, Text } from "../shared/primitives";
import { Section } from "../shared/sections";
-import { composeStyles } from "../shared/styles";
+import { composeStyles, headerNameLineHeight } from "../shared/styles";
type LeafishStyles = Omit<TemplateStyleSlots, "page"> & {
page: Style;
@@ -221,7 +221,7 @@ const useLeafishTemplate = (): LeafishTemplate => {
rowGap: metrics.gapY(0.5),
},
headerIdentity: { textAlign: "left", alignItems: "flex-start", rowGap: metrics.gapY(0.35) },
- headerName: { fontSize: metadata.typography.heading.fontSize * 1.5, lineHeight: 1 },
+ headerName: { fontSize: metadata.typography.heading.fontSize * 1.5, lineHeight: headerNameLineHeight },
headerContactBand: {
backgroundColor: primaryTintDark,
paddingHorizontal: metrics.page.paddingHorizontal,
diff --git a/packages/pdf/src/templates/meowth/MeowthPage.tsx b/packages/pdf/src/templates/meowth/MeowthPage.tsx
index eacd56267..967d85544 100644
--- a/packages/pdf/src/templates/meowth/MeowthPage.tsx
+++ b/packages/pdf/src/templates/meowth/MeowthPage.tsx
@@ -13,7 +13,7 @@ import { getTemplatePageSize } from "../shared/page-size";
import { hasTemplatePicture } from "../shared/picture";
import { Heading, Icon, Link, Text } from "../shared/primitives";
import { Section } from "../shared/sections";
-import { composeStyles } from "../shared/styles";
+import { composeStyles, headerNameLineHeight } from "../shared/styles";
type MeowthStyles = Omit<TemplateStyleSlots, "page"> & {
page: Style;
@@ -194,7 +194,7 @@ const useMeowthTemplate = (): MeowthTemplate => {
header: { flexDirection: "row", alignItems: "flex-start", columnGap: metrics.gapX(1) },
headerTitle: { flex: 1, rowGap: metrics.gapY(0.5) },
headerIdentity: { textAlign: "left", alignItems: "flex-start", rowGap: metrics.gapY(0.35) },
- headerName: { fontSize: metadata.typography.heading.fontSize * 1.5, lineHeight: 1 },
+ headerName: { fontSize: metadata.typography.heading.fontSize * 1.5, lineHeight: headerNameLineHeight },
headerHeadline: { opacity: 0.8 },
contactList: {
flexDirection: "row",
diff --git a/packages/pdf/src/templates/onyx/OnyxPage.tsx b/packages/pdf/src/templates/onyx/OnyxPage.tsx
index c77277154..d7cae5691 100644
--- a/packages/pdf/src/templates/onyx/OnyxPage.tsx
+++ b/packages/pdf/src/templates/onyx/OnyxPage.tsx
@@ -13,7 +13,7 @@ import { getTemplatePageSize } from "../shared/page-size";
import { hasTemplatePicture } from "../shared/picture";
import { Heading, Icon, Link, Text } from "../shared/primitives";
import { Section } from "../shared/sections";
-import { composeStyles } from "../shared/styles";
+import { composeStyles, headerNameLineHeight } from "../shared/styles";
type OnyxStyles = Omit<TemplateStyleSlots, "page"> & {
page: Style;
@@ -196,7 +196,7 @@ const useOnyxTemplate = (): OnyxTemplate => {
},
headerTitle: { rowGap: metrics.gapY(0.5) },
headerIdentity: { textAlign: "left", alignItems: "flex-start", rowGap: metrics.gapY(0.35) },
- headerName: { fontSize: metadata.typography.heading.fontSize * 1.5, lineHeight: 1 },
+ headerName: { fontSize: metadata.typography.heading.fontSize * 1.5, lineHeight: headerNameLineHeight },
contactList: {
flexDirection: "row",
flexWrap: "wrap",
diff --git a/packages/pdf/src/templates/pikachu/PikachuPage.tsx b/packages/pdf/src/templates/pikachu/PikachuPage.tsx
index 65edb027e..eca3c0f92 100644
--- a/packages/pdf/src/templates/pikachu/PikachuPage.tsx
+++ b/packages/pdf/src/templates/pikachu/PikachuPage.tsx
@@ -13,7 +13,7 @@ import { getTemplatePageSize } from "../shared/page-size";
import { hasTemplatePicture } from "../shared/picture";
import { Heading, Icon, Link, Text } from "../shared/primitives";
import { Section } from "../shared/sections";
-import { composeStyles, resolvePlacementColor } from "../shared/styles";
+import { composeStyles, headerNameLineHeight, resolvePlacementColor } from "../shared/styles";
type PikachuStyles = Omit<TemplateStyleSlots, "page"> & {
page: Style;
@@ -240,7 +240,7 @@ const usePikachuTemplate = (): PikachuTemplate => {
headerName: {
color: background,
fontSize: metadata.typography.heading.fontSize * 1.5,
- lineHeight: 1,
+ lineHeight: headerNameLineHeight,
},
headerText: { color: background },
contactList: {
diff --git a/packages/pdf/src/templates/rhyhorn/RhyhornPage.tsx b/packages/pdf/src/templates/rhyhorn/RhyhornPage.tsx
index 77d8cc075..d7d0b8b43 100644
--- a/packages/pdf/src/templates/rhyhorn/RhyhornPage.tsx
+++ b/packages/pdf/src/templates/rhyhorn/RhyhornPage.tsx
@@ -13,7 +13,7 @@ import { getTemplatePageSize } from "../shared/page-size";
import { hasTemplatePicture } from "../shared/picture";
import { Heading, Icon, Link, Text } from "../shared/primitives";
import { Section } from "../shared/sections";
-import { composeStyles } from "../shared/styles";
+import { composeStyles, headerNameLineHeight } from "../shared/styles";
type RhyhornStyles = Omit<TemplateStyleSlots, "page"> & {
page: Style;
@@ -194,7 +194,7 @@ const useRhyhornTemplate = (): RhyhornTemplate => {
header: { flexDirection: "row", alignItems: "center", columnGap: metrics.gapX(0.5) },
headerTitle: { flex: 1, rowGap: metrics.gapY(0.5) },
headerIdentity: { textAlign: "left", alignItems: "flex-start", rowGap: metrics.gapY(0.35) },
- headerName: { fontSize: metadata.typography.heading.fontSize * 1.5, lineHeight: 1 },
+ headerName: { fontSize: metadata.typography.heading.fontSize * 1.5, lineHeight: headerNameLineHeight },
contactList: { flexDirection: "row", flexWrap: "wrap", rowGap: metrics.gapY(0.125) },
contactItem: {
flexDirection: "row",
diff --git a/packages/pdf/src/templates/shared/styles.ts b/packages/pdf/src/templates/shared/styles.ts
index aa973bafa..e69aad133 100644
--- a/packages/pdf/src/templates/shared/styles.ts
+++ b/packages/pdf/src/templates/shared/styles.ts
@@ -21,6 +21,8 @@ export const mergeStyles = (...styles: StyleInput[]): Style => Object.assign({},
export const mergeLinkStyles = (...styles: StyleInput[]): Style => mergeStyles(...styles, linkUnderlineStyle);
+export const headerNameLineHeight = 1.2;
+
export type ResolvePlacementColorOptions = {
placement: TemplatePlacement;
defaultForeground: string;