mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-14 06:47:00 +10:00
fix(pdf): preserve rich list item line height
This commit is contained in:
@@ -210,7 +210,6 @@ const useAzurillTemplate = (): AzurillTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
@@ -206,7 +206,6 @@ const useBronzorTemplate = (): BronzorTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
@@ -220,7 +220,6 @@ const useChikoritaTemplate = (): ChikoritaTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
@@ -248,7 +248,6 @@ const useDitgarTemplate = (): DitgarTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
@@ -216,7 +216,6 @@ const useDittoTemplate = (): DittoTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
@@ -245,7 +245,6 @@ const useGengarTemplate = (): GengarTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
@@ -225,7 +225,6 @@ const useGlalieTemplate = (): GlalieTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { readFileSync } from "node:fs";
|
||||
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
@@ -9,4 +9,22 @@ describe("templatePages", () => {
|
||||
expect(registry).toContain('import { ScizorPage } from "./scizor/ScizorPage";');
|
||||
expect(registry).toContain("scizor: ScizorPage");
|
||||
});
|
||||
|
||||
it("keeps rich-text list content at the body line height", () => {
|
||||
const templatesDir = fileURLToPath(new URL(".", import.meta.url));
|
||||
const pageFiles = readdirSync(templatesDir, { withFileTypes: true })
|
||||
.filter((entry) => entry.isDirectory())
|
||||
.map(
|
||||
(entry) =>
|
||||
new URL(`./${entry.name}/${entry.name[0]?.toUpperCase()}${entry.name.slice(1)}Page.tsx`, import.meta.url),
|
||||
)
|
||||
.map((url) => fileURLToPath(url))
|
||||
.filter((path) => existsSync(path));
|
||||
|
||||
for (const pageFile of pageFiles) {
|
||||
const template = readFileSync(pageFile, "utf8");
|
||||
|
||||
expect(template).not.toContain("lineHeight: metadata.typography.body.lineHeight * 0.5");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -188,7 +188,6 @@ const useKakunaTemplate = (): KakunaTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
@@ -190,7 +190,6 @@ const useLaprasTemplate = (): LaprasTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
@@ -216,7 +216,6 @@ const useLeafishTemplate = (): LeafishTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
@@ -191,7 +191,6 @@ const useMeowthTemplate = (): MeowthTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
@@ -186,7 +186,6 @@ const useOnyxTemplate = (): OnyxTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
@@ -223,7 +223,6 @@ const usePikachuTemplate = (): PikachuTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
@@ -236,7 +236,6 @@ const useRhyhornTemplate = (): RhyhornTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
@@ -183,7 +183,6 @@ const useScizorTemplate = (): ScizorTemplate => {
|
||||
richListItemContent: {
|
||||
...bodyText,
|
||||
flex: 1,
|
||||
lineHeight: metadata.typography.body.lineHeight * 0.5,
|
||||
},
|
||||
splitRow: {
|
||||
flexDirection: r.row,
|
||||
|
||||
Reference in New Issue
Block a user