diff --git a/src/components/catalog/views/page/layout/CatalogLayoutBcInfoView.tsx b/src/components/catalog/views/page/layout/CatalogLayoutBcInfoView.tsx new file mode 100644 index 0000000..13c5aca --- /dev/null +++ b/src/components/catalog/views/page/layout/CatalogLayoutBcInfoView.tsx @@ -0,0 +1,32 @@ +import { FC } from 'react'; +import { SanitizeHtml } from '../../../../../api'; +import { CatalogLayoutProps } from './CatalogLayout.types'; + +// Info/landing layout: a big logo box (70% of the page height) on top and a +// smaller box below holding the page text in black. Logo = page headline +// image (getImage(0)), text = page text 1 (getText(0)). Set both from +// catalog admin (Gestione -> Modifica pagina). +export const CatalogLayoutBcInfoView: FC = props => +{ + const { page = null } = props; + + const logo = page?.localization?.getImage(0) || ''; + const text = page?.localization?.getText(0) || ''; + + return ( +
+
+ { logo + ? + : Logo — imposta l'immagine headline da Gestione } +
+
+
+
+
+ ); +}; diff --git a/src/components/catalog/views/page/layout/GetCatalogLayout.tsx b/src/components/catalog/views/page/layout/GetCatalogLayout.tsx index 6ccf2a1..ce68f37 100644 --- a/src/components/catalog/views/page/layout/GetCatalogLayout.tsx +++ b/src/components/catalog/views/page/layout/GetCatalogLayout.tsx @@ -1,6 +1,7 @@ import { ICatalogPage } from '../../../../../api'; import { CatalogLayoutProps } from './CatalogLayout.types'; import { CatalogLayoutBadgeDisplayView } from './CatalogLayoutBadgeDisplayView'; +import { CatalogLayoutBcInfoView } from './CatalogLayoutBcInfoView'; import { CatalogLayoutBuildersClubBuyView } from './CatalogLayoutBuildersClubBuyView'; import { CatalogLayoutColorGroupingView } from './CatalogLayoutColorGroupingView'; import { CatalogLayoutCustomPrefixView } from './CatalogLayoutCustomPrefixView'; @@ -34,6 +35,8 @@ export const GetCatalogLayout = (page: ICatalogPage, hideNavigation: () => void) { case 'frontpage_featured': return null; + case 'info_duckets': + return ; case 'frontpage4': return ; case 'pets':