diff --git a/server/sanity.ts b/server/sanity.ts index c1a1dd3..71d1816 100644 --- a/server/sanity.ts +++ b/server/sanity.ts @@ -106,6 +106,7 @@ const navQuery = ` } } } + inTwoColumns }, rightSide { search { diff --git a/src/components/DropdownMenu/DropdownMenuItem.tsx b/src/components/DropdownMenu/DropdownMenuItem.tsx index 349bd32..c4d8563 100644 --- a/src/components/DropdownMenu/DropdownMenuItem.tsx +++ b/src/components/DropdownMenu/DropdownMenuItem.tsx @@ -3,7 +3,7 @@ import { clsx } from "clsx"; import Link from "../Link"; import styles from "./DropdownMenuItem.module.css"; - +import cn from "classnames"; export interface MenuItemProps { itemType: string | "normal" | "image"; icon?: string | null; @@ -59,7 +59,7 @@ const DropdownMenuItem = ({ alt="" /> -
{customImage?.itemTitle}
{customImage?.imageDate && ({customImage?.imageDate}
diff --git a/src/components/DropdownMenu/DropdownSection.module.css b/src/components/DropdownMenu/DropdownSection.module.css index 64b1376..ab4a150 100644 --- a/src/components/DropdownMenu/DropdownSection.module.css +++ b/src/components/DropdownMenu/DropdownSection.module.css @@ -61,3 +61,12 @@ } } } + +.inTwoColumns { + display: grid; + grid-template-columns: 1fr; + column-gap: 4px; + @media (--nav) { + grid-template-columns: 1fr 1fr; + } +} diff --git a/src/components/DropdownMenu/DropdownSection.tsx b/src/components/DropdownMenu/DropdownSection.tsx index d16bbff..8d89e8f 100644 --- a/src/components/DropdownMenu/DropdownSection.tsx +++ b/src/components/DropdownMenu/DropdownSection.tsx @@ -1,6 +1,5 @@ -import { clsx } from "clsx"; - import styles from "./DropdownSection.module.css"; +import cn from "classnames"; export interface DropdownMenuProps { title?: string; @@ -11,6 +10,7 @@ export interface DropdownMenuProps { isImageLink?: boolean; childLength?: number; isFirst: boolean; + inTwoColumns?: boolean; } const DropdownSection = ({ @@ -23,12 +23,13 @@ const DropdownSection = ({ childLength = 3, isFirst, className, + inTwoColumns = false, ...props }: DropdownMenuProps & React.HTMLAttributes