Merged in fix/BOOK-317-campaign-ui-fixes (pull request #3397)
fix(BOOK-317): small campaign ui fixes * fix(BOOK-317): campaign ui fixes Approved-by: Erik Tiekstra
This commit is contained in:
@@ -8,7 +8,7 @@ import {
|
|||||||
CarouselNext,
|
CarouselNext,
|
||||||
CarouselPrevious,
|
CarouselPrevious,
|
||||||
} from "@/components/Carousel/CarouselNavigation"
|
} from "@/components/Carousel/CarouselNavigation"
|
||||||
import ContentCard from "@/components/ContentCard"
|
import { ContentCard } from "@/components/ContentCard"
|
||||||
|
|
||||||
import styles from "./allCampaigns.module.css"
|
import styles from "./allCampaigns.module.css"
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import { useState } from "react"
|
import { useState } from "react"
|
||||||
|
|
||||||
import { Carousel } from "@/components/Carousel"
|
import { Carousel } from "@/components/Carousel"
|
||||||
import ContentCard from "@/components/ContentCard"
|
import { ContentCard } from "@/components/ContentCard"
|
||||||
import { Section } from "@/components/Section"
|
import { Section } from "@/components/Section"
|
||||||
import SectionHeader from "@/components/Section/Header/Deprecated"
|
import SectionHeader from "@/components/Section/Header/Deprecated"
|
||||||
import SectionLink from "@/components/Section/Link"
|
import SectionLink from "@/components/Section/Link"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
import { useState } from "react"
|
import { useState } from "react"
|
||||||
|
|
||||||
import { Carousel } from "@/components/Carousel"
|
import { Carousel } from "@/components/Carousel"
|
||||||
import ContentCard from "@/components/ContentCard"
|
import { ContentCard } from "@/components/ContentCard"
|
||||||
import { Section } from "@/components/Section"
|
import { Section } from "@/components/Section"
|
||||||
import { SectionHeader } from "@/components/Section/Header"
|
import { SectionHeader } from "@/components/Section/Header"
|
||||||
import SectionLink from "@/components/Section/Link"
|
import SectionLink from "@/components/Section/Link"
|
||||||
@@ -16,8 +16,10 @@ import type { VariantProps } from "class-variance-authority"
|
|||||||
|
|
||||||
import type { headingVariants } from "@/components/Section/Header/headingVariants"
|
import type { headingVariants } from "@/components/Section/Header/headingVariants"
|
||||||
|
|
||||||
interface CarouselCardsProps
|
interface CarouselCardsProps extends Pick<
|
||||||
extends Pick<CarouselCardsBlock, "carousel_cards"> {
|
CarouselCardsBlock,
|
||||||
|
"carousel_cards"
|
||||||
|
> {
|
||||||
headingLevel?: "h1" | "h2"
|
headingLevel?: "h1" | "h2"
|
||||||
headingTypography?: VariantProps<typeof headingVariants>["typography"]
|
headingTypography?: VariantProps<typeof headingVariants>["typography"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
@media screen and (max-width: 949px) {
|
@media screen and (max-width: 949px) {
|
||||||
.list {
|
.list {
|
||||||
grid-template-columns: repeat(2, 1fr);
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
row-gap: var(--Space-x2);
|
||||||
|
|
||||||
.listItem:nth-child(2n)::after {
|
.listItem:nth-child(2n)::after {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
@media screen and (min-width: 950px) and (max-width: 1366px) {
|
@media screen and (min-width: 950px) and (max-width: 1366px) {
|
||||||
.list {
|
.list {
|
||||||
grid-template-columns: repeat(4, 1fr);
|
grid-template-columns: repeat(4, 1fr);
|
||||||
|
row-gap: var(--Space-x3);
|
||||||
|
|
||||||
&:not(.count3, .count5, .count6) .listItem:nth-child(4n)::after {
|
&:not(.count3, .count5, .count6) .listItem:nth-child(4n)::after {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -39,20 +39,14 @@
|
|||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: var(--Space-x15);
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: var(--Space-x15);
|
gap: var(--Space-x15);
|
||||||
align-self: stretch;
|
align-self: stretch;
|
||||||
|
padding: var(--Space-x2) var(--Space-x2) var(--Space-x2) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link {
|
.link {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
.content {
|
|
||||||
padding: var(--Space-x2) var(--Space-x2) var(--Space-x2) 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
|
import { cx } from "class-variance-authority"
|
||||||
import NextLink from "next/link"
|
import NextLink from "next/link"
|
||||||
import { useIntl } from "react-intl"
|
import { useIntl } from "react-intl"
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ interface ContentCardProps {
|
|||||||
className?: string
|
className?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ContentCard({
|
export function ContentCard({
|
||||||
heading,
|
heading,
|
||||||
image,
|
image,
|
||||||
bodyText,
|
bodyText,
|
||||||
@@ -34,7 +35,7 @@ export default function ContentCard({
|
|||||||
}: ContentCardProps) {
|
}: ContentCardProps) {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
const card = (
|
const card = (
|
||||||
<article className={`${styles.card} ${className}`}>
|
<article className={cx(styles.card, className)}>
|
||||||
<div className={styles.imageContainer}>
|
<div className={styles.imageContainer}>
|
||||||
<Image
|
<Image
|
||||||
src={image.url}
|
src={image.url}
|
||||||
|
|||||||
@@ -30,11 +30,11 @@ export default async function CampaignPage() {
|
|||||||
<CampaignHero {...hero} />
|
<CampaignHero {...hero} />
|
||||||
<div className={styles.intro}>
|
<div className={styles.intro}>
|
||||||
<div className={styles.headingWrapper}>
|
<div className={styles.headingWrapper}>
|
||||||
<Typography variant="Title/lg">
|
<Typography variant="Title/md">
|
||||||
<h1 className={styles.heading}>{heading}</h1>
|
<h1 className={styles.heading}>{heading}</h1>
|
||||||
</Typography>
|
</Typography>
|
||||||
{subheading ? (
|
{subheading ? (
|
||||||
<Typography variant="Title/Subtitle/lg">
|
<Typography variant="Title/sm">
|
||||||
<p>{subheading}</p>
|
<p>{subheading}</p>
|
||||||
</Typography>
|
</Typography>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { cx } from "class-variance-authority"
|
import { cx } from "class-variance-authority"
|
||||||
|
|
||||||
import ContentCard from "@/components/ContentCard"
|
import { ContentCard } from "@/components/ContentCard"
|
||||||
|
|
||||||
import styles from "./campaignCardList.module.css"
|
import styles from "./campaignCardList.module.css"
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 767px) {
|
@media screen and (max-width: 767px) {
|
||||||
.cardList {
|
ul.cardList {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
CarouselNext,
|
CarouselNext,
|
||||||
CarouselPrevious,
|
CarouselPrevious,
|
||||||
} from "@/components/Carousel/CarouselNavigation"
|
} from "@/components/Carousel/CarouselNavigation"
|
||||||
import ContentCard from "@/components/ContentCard"
|
import { ContentCard } from "@/components/ContentCard"
|
||||||
import CampaignHero from "@/components/ContentType/CampaignPage/Hero"
|
import CampaignHero from "@/components/ContentType/CampaignPage/Hero"
|
||||||
import CampaignCardList from "@/components/ContentType/HotelPage/Campaigns/CampaignCardList"
|
import CampaignCardList from "@/components/ContentType/HotelPage/Campaigns/CampaignCardList"
|
||||||
import { getIntl } from "@/i18n"
|
import { getIntl } from "@/i18n"
|
||||||
|
|||||||
Reference in New Issue
Block a user