From eb0b88f8ea9741ceb93d80fae5772d3a3ef13c93 Mon Sep 17 00:00:00 2001 From: Erik Tiekstra Date: Mon, 10 Feb 2025 09:28:32 +0000 Subject: [PATCH] Merged in feat/SW-1584-destination-content-blocks (pull request #1278) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Feat/SW-1584 destination content blocks * feat(SW-1584): Added accordion and content blocks to destination city pages * feat(SW-1584): Added accordion and content blocks to destination country pages Approved-by: Matilda Landström --- .../destinationCityPage.module.css | 14 +- .../DestinationCityPage/index.tsx | 6 +- .../destinationCountryPage.module.css | 16 +- .../DestinationCountryPage/index.tsx | 5 +- .../Fragments/Blocks/Accordion.graphql | 216 +++++++++++++++++- lib/graphql/Fragments/Blocks/Content.graphql | 94 ++++++++ .../DestinationCityPage.graphql | 13 ++ .../DestinationCountryPage.graphql | 13 ++ .../destinationCityPage/output.ts | 48 ++++ .../contentstack/destinationCityPage/utils.ts | 28 ++- .../destinationCountryPage/output.ts | 51 +++++ .../destinationCountryPage/utils.ts | 29 ++- .../contentstack/schemas/blocks/accordion.ts | 22 +- types/components/blocks/index.ts | 4 + types/enums/destinationCityPage.ts | 8 + types/enums/destinationCountryPage.ts | 8 + .../contentstack/destinationCityPage.ts | 2 + .../contentstack/destinationCountryPage.ts | 2 + 18 files changed, 546 insertions(+), 33 deletions(-) create mode 100644 types/enums/destinationCityPage.ts create mode 100644 types/enums/destinationCountryPage.ts diff --git a/components/ContentType/DestinationPage/DestinationCityPage/destinationCityPage.module.css b/components/ContentType/DestinationPage/DestinationCityPage/destinationCityPage.module.css index 1032fc939..61130dcc0 100644 --- a/components/ContentType/DestinationPage/DestinationCityPage/destinationCityPage.module.css +++ b/components/ContentType/DestinationPage/DestinationCityPage/destinationCityPage.module.css @@ -4,7 +4,7 @@ grid-template-areas: "header" "sidebar" - "mainSection"; + "mainContent"; width: 100%; gap: var(--Spacing-x4); } @@ -13,8 +13,10 @@ grid-area: header; } -.mainSection { - grid-area: mainSection; +.mainContent { + grid-area: mainContent; + display: grid; + gap: var(--Spacing-x6); padding-bottom: var(--Spacing-x7); max-width: var(--max-width-page); width: 100%; @@ -47,7 +49,11 @@ .pageContainer { grid-template-areas: "header sidebar" - "mainSection sidebar"; + "mainContent sidebar"; grid-template-columns: 1fr var(--map-desktop-width); } + + .mainContent { + gap: var(--Spacing-x9); + } } diff --git a/components/ContentType/DestinationPage/DestinationCityPage/index.tsx b/components/ContentType/DestinationPage/DestinationCityPage/index.tsx index d2b51975d..7aa6fccac 100644 --- a/components/ContentType/DestinationPage/DestinationCityPage/index.tsx +++ b/components/ContentType/DestinationPage/DestinationCityPage/index.tsx @@ -2,6 +2,7 @@ import { Suspense } from "react" import { getDestinationCityPage } from "@/lib/trpc/memoizedRequests" +import Blocks from "@/components/Blocks" import Breadcrumbs from "@/components/Breadcrumbs" import BreadcrumbsSkeleton from "@/components/TempDesignSystem/Breadcrumbs/BreadcrumbsSkeleton" import Body from "@/components/TempDesignSystem/Text/Body" @@ -28,6 +29,7 @@ export default async function DestinationCityPage() { const { tracking, destinationCityPage, hotels } = pageData const { + blocks, images, heading, preamble, @@ -51,8 +53,10 @@ export default async function DestinationCityPage() { destinationName={destination_settings.city} /> -
+
+ + {blocks && }