diff --git a/apps/web/components/Dashboard/Pages/Org/OrgEditLanding/OrgEditLanding.tsx b/apps/web/components/Dashboard/Pages/Org/OrgEditLanding/OrgEditLanding.tsx index 24bb806c..a2dc2026 100644 --- a/apps/web/components/Dashboard/Pages/Org/OrgEditLanding/OrgEditLanding.tsx +++ b/apps/web/components/Dashboard/Pages/Org/OrgEditLanding/OrgEditLanding.tsx @@ -174,7 +174,9 @@ const OrgEditLanding = () => { color: '#666666', size: 'medium' }, - buttons: [] + buttons: [], + illustration: undefined, + contentAlign: 'center' } case 'text-and-image': return { @@ -950,6 +952,135 @@ const HeroSectionEditor: React.FC<{ )} + + {/* Illustration */} +
+ +
+
+ + { + if (e.target.value) { + onChange({ + ...section, + illustration: { + image: { url: e.target.value, alt: section.illustration?.image.alt || '' }, + position: 'left', + verticalAlign: 'center', + size: 'medium' + } + }) + } + }} + placeholder="Illustration URL" + /> + { + if (section.illustration?.image.url) { + onChange({ + ...section, + illustration: { + ...section.illustration, + image: { ...section.illustration.image, alt: e.target.value } + } + }) + } + }} + placeholder="Alt text" + /> + onChange({ + ...section, + illustration: { + image: { url, alt: section.illustration?.image.alt || '' }, + position: 'left', + verticalAlign: 'center', + size: 'medium' + } + })} + buttonText="Upload Illustration" + /> + {section.illustration?.image.url && ( + {section.illustration?.image.alt} + )} +
+ +
+
+ + +
+ +
+ + +
+
+ + {section.illustration?.image.url && ( + + )} +
+
) diff --git a/apps/web/components/Dashboard/Pages/Org/OrgEditLanding/landing_types.ts b/apps/web/components/Dashboard/Pages/Org/OrgEditLanding/landing_types.ts index 7b1930ea..8a8f6c29 100644 --- a/apps/web/components/Dashboard/Pages/Org/OrgEditLanding/landing_types.ts +++ b/apps/web/components/Dashboard/Pages/Org/OrgEditLanding/landing_types.ts @@ -74,6 +74,13 @@ export interface LandingHeroSection { heading: LandingHeading; subheading: LandingHeading; buttons: LandingButton[]; + illustration?: { + image: LandingImage; + position: 'left' | 'right'; + verticalAlign: 'top' | 'center' | 'bottom'; + size: 'small' | 'medium' | 'large'; + }; + contentAlign?: 'left' | 'center' | 'right'; } export type LandingSection = LandingTextAndImageSection | LandingHeroSection | LandingLogos | LandingPeople | LandingFeaturedCourses; diff --git a/apps/web/components/Landings/LandingCustom.tsx b/apps/web/components/Landings/LandingCustom.tsx index 84bcdc37..5544fa7b 100644 --- a/apps/web/components/Landings/LandingCustom.tsx +++ b/apps/web/components/Landings/LandingCustom.tsx @@ -41,33 +41,63 @@ function LandingCustom({ landing, orgslug }: LandingCustomProps) { : `url(${section.background.image}) center/cover` }} > -
-

- {section.heading.text} -

-

- {section.subheading.text} -

-
- {section.buttons.map((button, index) => ( - + {/* Logo */} + {section.illustration?.image.url && ( +
+ {section.illustration.image.alt} +
+ )} + + {/* Content */} +
+
+

- {button.text} - - ))} + {section.heading.text} +

+

+ {section.subheading.text} +

+
+ {section.buttons.map((button, index) => ( + + {button.text} + + ))} +
+