diff --git a/components/Current/Aside/Puff/index.tsx b/components/Current/Aside/Puff/index.tsx new file mode 100644 index 000000000..a33e9f0fe --- /dev/null +++ b/components/Current/Aside/Puff/index.tsx @@ -0,0 +1,42 @@ +import { renderOptions } from "./renderOptions" + +import Image from "@/components/Image" +import JsonToHtml from "@/components/JsonToHtml" + +import styles from "./puff.module.css" + +import type { PuffProps } from "@/types/components/current/asides/puff" + +export default function Puff({ + imageConnection, + link, + text, + title, +}: PuffProps) { + return ( + +
+ {imageConnection.edges.map((image) => ( + {image.node.title} + ))} +
+
+

{title}

+
+ +
+
+
+ ) +} diff --git a/components/Current/Aside/Puffs/Puff/puff.module.css b/components/Current/Aside/Puff/puff.module.css similarity index 100% rename from components/Current/Aside/Puffs/Puff/puff.module.css rename to components/Current/Aside/Puff/puff.module.css diff --git a/components/Current/Aside/Puffs/Puff/renderOptions.tsx b/components/Current/Aside/Puff/renderOptions.tsx similarity index 100% rename from components/Current/Aside/Puffs/Puff/renderOptions.tsx rename to components/Current/Aside/Puff/renderOptions.tsx diff --git a/components/Current/Aside/Puffs/Puff/index.tsx b/components/Current/Aside/Puffs/Puff/index.tsx deleted file mode 100644 index 9a9d4b852..000000000 --- a/components/Current/Aside/Puffs/Puff/index.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import { renderOptions } from "./renderOptions" - -import Image from "@/components/Image" -import JsonToHtml from "@/components/JsonToHtml" -import Link from "next/link" - -import styles from "./puff.module.css" - -import type { PuffProps } from "@/types/components/current/asides/puff" - -export default function Puff({ - imageConnection, - is_internal, - link, - pageConnection, - text, - title, -}: PuffProps) { - if (is_internal) { - const page = pageConnection.edges[0] - if (!page?.node?.url) { - return null - } - return ( - - - - ) - } - return ( - - - - ) -} - -function PuffContent({ - imageConnection, - text, - title, -}: Pick) { - return ( -
- {imageConnection.edges.map((image) => ( - {image.node.title} - ))} -
-
-

{title}

-
- -
-
- ) -} diff --git a/components/Current/Aside/Puffs/index.tsx b/components/Current/Aside/Puffs/index.tsx deleted file mode 100644 index 457e327d4..000000000 --- a/components/Current/Aside/Puffs/index.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import Puff from "./Puff" - -import type { PuffsProps } from "@/types/components/current/asides/puffs" - -export default function Puffs({ puffs }: PuffsProps) { - if (!puffs.length) { - return null - } - return ( - <> - {puffs.map((puff) => ( - - ))} - - ) -} diff --git a/components/Current/Aside/index.tsx b/components/Current/Aside/index.tsx index d4100d2ff..cb25a501d 100644 --- a/components/Current/Aside/index.tsx +++ b/components/Current/Aside/index.tsx @@ -1,4 +1,4 @@ -import Puffs from "./Puffs" +import Puff from "./Puff" import Contacts from "./Contacts" import { AsideTypenameEnum } from "@/types/requests/utils/typename" @@ -25,9 +25,9 @@ export default function Aside({ blocks }: AsideProps) { ) case AsideTypenameEnum.CurrentBlocksPageAsidePuff: return ( - ) default: diff --git a/components/Current/Blocks/List/ListItem.tsx b/components/Current/Blocks/List/ListItem.tsx index 4c5256841..375c4d2b4 100644 --- a/components/Current/Blocks/List/ListItem.tsx +++ b/components/Current/Blocks/List/ListItem.tsx @@ -1,4 +1,3 @@ -import Link from "next/link" import { cva } from "class-variance-authority" import { BlockListItemsEnum } from "@/types/requests/blocks/list" @@ -63,27 +62,6 @@ export default function ListItem({ listItem }: { listItem: ListItem }) { )} ) - case BlockListItemsEnum.CurrentBlocksPageBlocksListBlockListItemsListItemInternalLink: - const link = listItem.list_item_internal_link.pageConnection.edges[0] - const linkUrlWithLocale = `/${link.node.system.locale}${link.node.url}` - return ( -
  • - - {listItem.list_item_internal_link.link_text} - - {listItem.list_item_internal_link.subtitle && ( - -
    - {listItem.list_item_internal_link.subtitle} -
    - )} -
  • - ) default: return null diff --git a/components/Current/Blocks/List/index.tsx b/components/Current/Blocks/List/index.tsx index 11e6589ec..e8f4ff4cb 100644 --- a/components/Current/Blocks/List/index.tsx +++ b/components/Current/Blocks/List/index.tsx @@ -1,17 +1,18 @@ -import type { ListProps } from "@/types/requests/blocks/list" +import ListItem from "./ListItem" import styles from "./list.module.css" -import ListItem from "./ListItem" + +import type { ListProps } from "@/types/requests/blocks/list" export default function List({ list }: ListProps) { return ( -
    + <> {list.title ?

    {list.title}

    : null}
      {list.list_items.map((item, i) => ( ))}
    -
    + ) } diff --git a/components/Current/Blocks/List/list.module.css b/components/Current/Blocks/List/list.module.css index 924bae6dd..dde5491b0 100644 --- a/components/Current/Blocks/List/list.module.css +++ b/components/Current/Blocks/List/list.module.css @@ -1,11 +1,16 @@ .title { + color: #483729; font-family: BrandonText-Bold, Arial, Helvetica, sans-serif; font-size: 1.375rem; - line-height: 1.1em; - text-transform: uppercase; font-weight: 400; - color: #483729; + line-height: 1.1em; margin-bottom: 1rem; + margin-top: 2rem; + text-transform: uppercase; +} + +.title:first-child { + margin-top: 0; } .ul { @@ -64,4 +69,4 @@ .title { font-size: 1.625rem; } -} +} \ No newline at end of file diff --git a/components/Current/ContentPage/index.tsx b/components/Current/ContentPage/index.tsx index fea966ad3..346b32f0d 100644 --- a/components/Current/ContentPage/index.tsx +++ b/components/Current/ContentPage/index.tsx @@ -12,8 +12,8 @@ import type { ContentPageProps } from "@/types/components/current/contentPage" export default function ContentPage({ data }: ContentPageProps) { const page = data.all_current_blocks_page.items[0] const images = page.hero?.imagesConnection - const breadcrumbs = page.breadcrumbs.parentsConnection - const parent = breadcrumbs.edges.at(-1) + const breadcrumbs = page.breadcrumbs.parents + const parent = breadcrumbs.at(-1) return ( <> diff --git a/components/Current/Header/MainMenu/index.tsx b/components/Current/Header/MainMenu/index.tsx index 7044f0ea1..b1b09835b 100644 --- a/components/Current/Header/MainMenu/index.tsx +++ b/components/Current/Header/MainMenu/index.tsx @@ -2,7 +2,6 @@ import { useState } from "react" import Image from "@/components/Image" -import Link from "next/link" // import Mobile from "../LanguageSwitcher/Mobile" import styles from "./mainMenu.module.css" @@ -40,7 +39,7 @@ export default function MainMenu({ frontpageLinkText, homeHref, links, logo, top Menu - - +