diff --git a/app/[lang]/(preview)/preview/[contentType]/[uid]/page.tsx b/app/[lang]/(preview)/preview/[contentType]/[uid]/page.tsx index 26216140e..ff954a31d 100644 --- a/app/[lang]/(preview)/preview/[contentType]/[uid]/page.tsx +++ b/app/[lang]/(preview)/preview/[contentType]/[uid]/page.tsx @@ -1,9 +1,10 @@ import { ContentstackLivePreview } from "@contentstack/live-preview-utils" import { notFound } from "next/navigation" -import ContentPage from "@/components/ContentType/ContentPage" import HotelPage from "@/components/ContentType/HotelPage" import LoyaltyPage from "@/components/ContentType/LoyaltyPage" +import CollectionPage from "@/components/ContentType/StaticPages/CollectionPage" +import ContentPage from "@/components/ContentType/StaticPages/ContentPage" import LoadingSpinner from "@/components/LoadingSpinner" import { setLang } from "@/i18n/serverContext" @@ -32,11 +33,13 @@ export default async function PreviewPage({ return case "loyalty-page": return + case "collection-page": + return case "hotel-page": return default: console.log({ PREVIEW: params }) - const type: never = params.contentType + const type = params.contentType console.error(`Unsupported content type given: ${type}`) notFound() } diff --git a/components/Sidebar/index.tsx b/components/Sidebar/index.tsx index 02e317e54..53e88126e 100644 --- a/components/Sidebar/index.tsx +++ b/components/Sidebar/index.tsx @@ -60,7 +60,7 @@ export default function Sidebar({ blocks }: SidebarProps) { +
{image && ( -
- {image.meta?.alt -
+ {image.meta?.alt )}
diff --git a/components/TempDesignSystem/TeaserCard/teaserCard.module.css b/components/TempDesignSystem/TeaserCard/teaserCard.module.css index d1bc40165..49f084d20 100644 --- a/components/TempDesignSystem/TeaserCard/teaserCard.module.css +++ b/components/TempDesignSystem/TeaserCard/teaserCard.module.css @@ -18,24 +18,17 @@ border: 1px solid var(--Base-Border-Subtle); } -.imageContainer { +.image { width: 100%; - height: 12.58625rem; /* 201.38px / 16 = 12.58625rem */ - overflow: hidden; -} - -.backgroundImage { - width: 100%; - height: 100%; - object-fit: cover; + height: 12.5rem; /* 200px */ } .content { - display: flex; - flex-direction: column; + display: grid; gap: var(--Spacing-x-one-and-half); - align-items: flex-start; padding: var(--Spacing-x2) var(--Spacing-x3); + grid-template-rows: auto 1fr auto; + flex-grow: 1; } .description { @@ -53,17 +46,6 @@ width: 100%; } -.body { - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 3; - line-clamp: 3; - overflow: hidden; - text-overflow: ellipsis; - /* line-height variables are in %, so using the value in rem instead */ - max-height: calc(3 * 1.5rem); -} - @media (min-width: 1367px) { .card:not(.alwaysStack) .ctaContainer { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); diff --git a/components/TempDesignSystem/TeaserCard/variants.ts b/components/TempDesignSystem/TeaserCard/variants.ts index b6ca7744d..294f6d913 100644 --- a/components/TempDesignSystem/TeaserCard/variants.ts +++ b/components/TempDesignSystem/TeaserCard/variants.ts @@ -4,7 +4,7 @@ import styles from "./teaserCard.module.css" export const teaserCardVariants = cva(styles.card, { variants: { - style: { + intent: { default: styles.default, featured: styles.featured, }, @@ -14,7 +14,7 @@ export const teaserCardVariants = cva(styles.card, { }, }, defaultVariants: { - style: "default", + intent: "default", alwaysStack: false, }, })