mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-23 21:21:32 +10:00
Merge pull request #2010 from busches/fix-2007
fix(Gengar): Hide Summary section unless populated
This commit is contained in:
@ -83,17 +83,19 @@ const Header = () => {
|
|||||||
|
|
||||||
const Summary = () => {
|
const Summary = () => {
|
||||||
const section = useArtboardStore((state) => state.resume.sections.summary);
|
const section = useArtboardStore((state) => state.resume.sections.summary);
|
||||||
|
const primaryColor = useArtboardStore((state) => state.resume.metadata.theme.primary);
|
||||||
if (!section.visible || isEmptyString(section.content)) return null;
|
if (!section.visible || isEmptyString(section.content)) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id={section.id}>
|
<div className="p-custom space-y-4" style={{ backgroundColor: hexToRgb(primaryColor, 0.2) }}>
|
||||||
<div
|
<section id={section.id}>
|
||||||
dangerouslySetInnerHTML={{ __html: section.content }}
|
<div
|
||||||
className="wysiwyg"
|
dangerouslySetInnerHTML={{ __html: section.content }}
|
||||||
style={{ columns: section.columns }}
|
className="wysiwyg"
|
||||||
/>
|
style={{ columns: section.columns }}
|
||||||
</section>
|
/>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -588,14 +590,7 @@ export const Gengar = ({ columns, isFirstPage = false }: TemplateProps) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={cn("main group", sidebar.length > 0 ? "col-span-2" : "col-span-3")}>
|
<div className={cn("main group", sidebar.length > 0 ? "col-span-2" : "col-span-3")}>
|
||||||
{isFirstPage && (
|
{isFirstPage && <Summary />}
|
||||||
<div
|
|
||||||
className="p-custom space-y-4"
|
|
||||||
style={{ backgroundColor: hexToRgb(primaryColor, 0.2) }}
|
|
||||||
>
|
|
||||||
<Summary />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
<div className="p-custom space-y-4">
|
<div className="p-custom space-y-4">
|
||||||
{main.map((section) => (
|
{main.map((section) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user