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'),
|
||||
hideProject('Disco Ninjas')
|
||||
);
|
||||
|
||||
const shouldRenderSection = (section: keyof typeof sections) => sections[section] && sections[section].config.visible;
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
|
@ -23,11 +25,11 @@ const { config, sections } = cv(
|
|||
<title>PDF preview</title>
|
||||
</head>
|
||||
<body class="flex flex-col bg-white p-[10mm] print:p-0">
|
||||
<MainSection {...sections.main} />
|
||||
{sections.skills && <SkillsSection {...sections.skills} />}
|
||||
{sections.experience && <ExperienceSection {...sections.experience} />}
|
||||
{sections.portfolio && <PortfolioSection {...sections.portfolio} />}
|
||||
{sections.education && <EducationSection {...sections.education} />}
|
||||
{shouldRenderSection('main') && <MainSection {...sections.main} />}
|
||||
{shouldRenderSection('skills') && <SkillsSection {...sections.skills} />}
|
||||
{shouldRenderSection('experience') && <ExperienceSection {...sections.experience} />}
|
||||
{shouldRenderSection('portfolio') && <PortfolioSection {...sections.portfolio} />}
|
||||
{shouldRenderSection('education') && <EducationSection {...sections.education} />}
|
||||
{config.pdf?.footer && <Footer>{config.pdf.footer}</Footer>}
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in a new issue