From 0e11a772f1c211a941bb3ebefc2fc7b1136c616b Mon Sep 17 00:00:00 2001 From: Erik Tiekstra Date: Wed, 5 Nov 2025 10:29:24 +0000 Subject: [PATCH] feat(BOOK-450): Adjust Scandic logo in header when on a themed hotel page Approved-by: Chuma Mcphoy (We Ahead) --- .../(contentTypes)/hotel_page/[uid]/page.tsx | 29 +++++++++++++++---- .../Header/MainMenu/LogoLink/index.tsx | 6 +++- .../MainMenu/LogoLink/logoLink.module.css | 4 +++ .../components/Icons/Logos/ScandicLogo.tsx | 19 +++++++----- .../components/Icons/Logos/logo.module.css | 3 ++ 5 files changed, 46 insertions(+), 15 deletions(-) create mode 100644 packages/design-system/lib/components/Icons/Logos/logo.module.css diff --git a/apps/scandic-web/app/[lang]/(live)/(public)/(contentTypes)/hotel_page/[uid]/page.tsx b/apps/scandic-web/app/[lang]/(live)/(public)/(contentTypes)/hotel_page/[uid]/page.tsx index 0d5c46319..ca629df46 100644 --- a/apps/scandic-web/app/[lang]/(live)/(public)/(contentTypes)/hotel_page/[uid]/page.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(public)/(contentTypes)/hotel_page/[uid]/page.tsx @@ -4,6 +4,7 @@ import { notFound } from "next/navigation" import { DEFAULT_THEME, getThemeByHotel, + type Theme, } from "@scandic-hotels/common/utils/theme" import { setTheme } from "@scandic-hotels/common/utils/theme/serverContext" @@ -49,21 +50,37 @@ export default async function HotelPagePage( if (searchParams.subpage) { return ( -
+ -
+ ) } else if (searchParams.view === "map") { return ( -
+ -
+ ) } else { return ( -
+ -
+ ) } } + +function HotelPageWrapper({ + className, + hotelTheme, + children, +}: React.PropsWithChildren<{ className?: string; hotelTheme: Theme }>) { + return ( +
+ {children} +
+ ) +} diff --git a/apps/scandic-web/components/Header/MainMenu/LogoLink/index.tsx b/apps/scandic-web/components/Header/MainMenu/LogoLink/index.tsx index 19bf9cf9e..01d7b3f98 100644 --- a/apps/scandic-web/components/Header/MainMenu/LogoLink/index.tsx +++ b/apps/scandic-web/components/Header/MainMenu/LogoLink/index.tsx @@ -33,7 +33,11 @@ export function LogoLink() { defaultMessage: "Back to scandichotels.com", })} > - + ) } diff --git a/apps/scandic-web/components/Header/MainMenu/LogoLink/logoLink.module.css b/apps/scandic-web/components/Header/MainMenu/LogoLink/logoLink.module.css index 3fc119de3..667377e80 100644 --- a/apps/scandic-web/components/Header/MainMenu/LogoLink/logoLink.module.css +++ b/apps/scandic-web/components/Header/MainMenu/LogoLink/logoLink.module.css @@ -2,3 +2,7 @@ display: inline-flex; width: auto; } + +:global(body:has(.themed-hotel-page)) .logoIcon { + color: var(--Surface-UI-Fill-Intense); +} diff --git a/packages/design-system/lib/components/Icons/Logos/ScandicLogo.tsx b/packages/design-system/lib/components/Icons/Logos/ScandicLogo.tsx index 0112369c1..57e25a519 100644 --- a/packages/design-system/lib/components/Icons/Logos/ScandicLogo.tsx +++ b/packages/design-system/lib/components/Icons/Logos/ScandicLogo.tsx @@ -1,5 +1,8 @@ +import { cx } from 'class-variance-authority' import type { LogoProps } from '../icon' +import styles from './logo.module.css' + export default function ScandicLogoIcon({ className = '', height = 14, @@ -8,7 +11,7 @@ export default function ScandicLogoIcon({ }: LogoProps) { return ( ) diff --git a/packages/design-system/lib/components/Icons/Logos/logo.module.css b/packages/design-system/lib/components/Icons/Logos/logo.module.css new file mode 100644 index 000000000..3805126a8 --- /dev/null +++ b/packages/design-system/lib/components/Icons/Logos/logo.module.css @@ -0,0 +1,3 @@ +.scandicLogo { + color: var(--Surface-Brand-Primary-2-Default); +}