From 6db8d3e1910579e6e671f41852170eb29eb80297 Mon Sep 17 00:00:00 2001 From: medievalshell Date: Sat, 30 May 2026 02:34:25 +0200 Subject: [PATCH] feat(catalog): layout info BC (logo 70% + box testo nero) via info_duckets --- .../page/layout/CatalogLayoutBcInfoView.tsx | 32 +++++++++++++++++++ .../views/page/layout/GetCatalogLayout.tsx | 3 ++ 2 files changed, 35 insertions(+) create mode 100644 src/components/catalog/views/page/layout/CatalogLayoutBcInfoView.tsx 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':