Support visible property in pdf pages (#180)
This commit is contained in:
parent
c5c6872cc5
commit
2d09310352
1 changed files with 7 additions and 5 deletions
|
|
@ -13,6 +13,8 @@ const { config, sections } = cv(
|
||||||
renameSkillSet('I speak', 'Languages'),
|
renameSkillSet('I speak', 'Languages'),
|
||||||
hideProject('Disco Ninjas')
|
hideProject('Disco Ninjas')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const shouldRenderSection = (section: keyof typeof sections) => sections[section] && sections[section].config.visible;
|
||||||
---
|
---
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
@ -23,11 +25,11 @@ const { config, sections } = cv(
|
||||||
<title>PDF preview</title>
|
<title>PDF preview</title>
|
||||||
</head>
|
</head>
|
||||||
<body class="flex flex-col bg-white p-[10mm] print:p-0">
|
<body class="flex flex-col bg-white p-[10mm] print:p-0">
|
||||||
<MainSection {...sections.main} />
|
{shouldRenderSection('main') && <MainSection {...sections.main} />}
|
||||||
{sections.skills && <SkillsSection {...sections.skills} />}
|
{shouldRenderSection('skills') && <SkillsSection {...sections.skills} />}
|
||||||
{sections.experience && <ExperienceSection {...sections.experience} />}
|
{shouldRenderSection('experience') && <ExperienceSection {...sections.experience} />}
|
||||||
{sections.portfolio && <PortfolioSection {...sections.portfolio} />}
|
{shouldRenderSection('portfolio') && <PortfolioSection {...sections.portfolio} />}
|
||||||
{sections.education && <EducationSection {...sections.education} />}
|
{shouldRenderSection('education') && <EducationSection {...sections.education} />}
|
||||||
{config.pdf?.footer && <Footer>{config.pdf.footer}</Footer>}
|
{config.pdf?.footer && <Footer>{config.pdf.footer}</Footer>}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue