diff --git a/app/components/icons/Logo.tsx b/app/components/icons/Logo.tsx index dde8433..e932010 100644 --- a/app/components/icons/Logo.tsx +++ b/app/components/icons/Logo.tsx @@ -5,17 +5,10 @@ import { getAssetPath, ASSETS } from "../../../lib/assetUtils"; interface LogoProps { size?: | "default" - | "homeHeaderXsmall" - | "homeHeaderSm" - | "homeHeaderMd" - | "homeHeaderLg" - | "homeHeaderXl" - | "header" - | "headerMd" - | "headerLg" - | "headerXl" | "footer" - | "footerLg"; + | "createFlow" + | "topNavFolderTop" + | "topNavHeader"; showText?: boolean; } @@ -37,109 +30,37 @@ const Logo = memo(({ size = "default", showText = true }) => { lineHeight: "leading-[27.05px]", iconSize: "w-[27.05px] h-[27.05px]", }, - homeHeaderXsmall: { - containerHeight: "h-[14.11px]", - gap: "gap-[4.21px]", - textSize: "text-[11.57px]", - lineHeight: "leading-[14.24px]", - iconSize: "w-[14.11px] h-[14.11px]", - }, - homeHeaderSm: { - containerHeight: "h-[21.06px]", - gap: "gap-[3.19px]", - textSize: "text-[11.69px]", - lineHeight: "leading-[14.39px]", - iconSize: "w-[14.39px] h-[14.39px]", - }, - homeHeaderMd: { - containerHeight: "h-[32.24px]", - gap: "gap-[4.89px]", - textSize: "text-[17.89px]", - lineHeight: "leading-[22.02px]", - iconSize: "w-[22.02px] h-[22.02px]", - }, - homeHeaderLg: { - containerHeight: "h-[28px]", - gap: "gap-[6.55px]", - textSize: "text-[21.97px]", - lineHeight: "leading-[27.05px]", - iconSize: "w-[27.05px] h-[27.05px]", - }, - homeHeaderXl: { - containerHeight: "h-[36px]", - gap: "gap-[8.64px]", - textSize: "text-[29.01px]", - lineHeight: "leading-[35.7px]", - iconSize: "w-[35.7px] h-[35.7px]", - }, - header: { - containerHeight: "h-[20.85px]", - gap: "gap-[4.21px]", - textSize: "text-[11.57px]", - lineHeight: "leading-[14.24px]", - iconSize: "w-[14.24px] h-[14.24px]", - }, - headerMd: { - containerHeight: "h-[17.91px]", - gap: "gap-[6.51px]", - textSize: "text-[17.89px]", - lineHeight: "leading-[22.02px]", - iconSize: "w-[22.02px] h-[22.02px]", - }, - headerLg: { - containerHeight: "h-[28px]", - gap: "gap-[6.55px]", - textSize: "text-[21.97px]", - lineHeight: "leading-[27.05px]", - iconSize: "w-[27.05px] h-[27.05px]", - }, - headerXl: { - containerHeight: "h-[34px]", - gap: "gap-[8.19px]", - textSize: "text-[27.47px]", - lineHeight: "leading-[33.81px]", - iconSize: "w-[33.81px] h-[33.81px]", - }, footer: { - containerHeight: "h-[calc(40px*1.37)]", - gap: "gap-[calc(8px*1.37)]", - textSize: "text-[calc(21.97px*1.37)]", - lineHeight: "leading-[calc(27.05px*1.37)]", - iconSize: "w-[calc(27.05px*1.37)] h-[calc(27.05px*1.37)]", + containerHeight: "h-[41px] sm:h-[calc(40px*1.37)] lg:h-[calc(40px*2.05)]", + gap: "gap-[8.28px] sm:gap-[calc(8px*1.37)] lg:gap-[calc(8px*2.05)]", + textSize: "text-[21.97px] sm:text-[calc(21.97px*1.37)] lg:text-[calc(21.97px*2.05)]", + lineHeight: "leading-[27.05px] sm:leading-[calc(27.05px*1.37)] lg:leading-[calc(27.05px*2.05)]", + iconSize: "w-[27.05px] h-[27.05px] sm:w-[calc(27.05px*1.37)] sm:h-[calc(27.05px*1.37)] lg:w-[calc(27.05px*2.05)] lg:h-[calc(27.05px*2.05)]", }, - footerLg: { - containerHeight: "h-[calc(40px*2.05)]", - gap: "gap-[calc(8px*2.05)]", - textSize: "text-[calc(21.97px*2.05)]", - lineHeight: "leading-[calc(27.05px*2.05)]", - iconSize: "w-[calc(27.05px*2.05)] h-[calc(27.05px*2.05)]", + createFlow: { + containerHeight: "h-[30px] md:h-[41px]", + gap: "gap-[6px] md:gap-[8.28px]", + textSize: "text-[16.48px] md:text-[21.97px]", + lineHeight: "leading-[20.28px] md:leading-[27.05px]", + iconSize: "w-[20.28px] h-[20.28px] md:w-[27.05px] md:h-[27.05px]", + }, + topNavFolderTop: { + containerHeight: "h-[14.11px] sm:h-[21.06px] md:h-[32.24px] lg:h-[28px] xl:h-[36px]", + gap: "gap-0 sm:gap-[3.19px] md:gap-[4.89px] lg:gap-[6.55px] xl:gap-[8.64px]", + textSize: "text-[11.57px] sm:text-[11.69px] md:text-[17.89px] lg:text-[21.97px] xl:text-[29.01px]", + lineHeight: "leading-[14.24px] sm:leading-[14.39px] md:leading-[22.02px] lg:leading-[27.05px] xl:leading-[35.7px]", + iconSize: "w-[14.11px] h-[14.11px] sm:w-[14.39px] sm:h-[14.39px] md:w-[22.02px] md:h-[22.02px] lg:w-[27.05px] lg:h-[27.05px] xl:w-[35.7px] xl:h-[35.7px]", + }, + topNavHeader: { + containerHeight: "h-[20.85px] sm:h-[20.85px] md:h-[17.91px] lg:h-[28px] xl:h-[34px]", + gap: "gap-0 sm:gap-[4.21px] md:gap-[6.51px] lg:gap-[6.55px] xl:gap-[8.19px]", + textSize: "text-[11.57px] sm:text-[11.57px] md:text-[17.89px] lg:text-[21.97px] xl:text-[27.47px]", + lineHeight: "leading-[14.24px] sm:leading-[14.24px] md:leading-[22.02px] lg:leading-[27.05px] xl:leading-[33.81px]", + iconSize: "w-[14.24px] h-[14.24px] sm:w-[14.24px] sm:h-[14.24px] md:w-[22.02px] md:h-[22.02px] lg:w-[27.05px] lg:h-[27.05px] xl:w-[33.81px] xl:h-[33.81px]", }, }; - const config = - size === "homeHeaderXsmall" - ? sizes.homeHeaderXsmall - : size === "homeHeaderSm" - ? sizes.homeHeaderSm - : size === "homeHeaderMd" - ? sizes.homeHeaderMd - : size === "homeHeaderLg" - ? sizes.homeHeaderLg - : size === "homeHeaderXl" - ? sizes.homeHeaderXl - : size === "header" - ? sizes.header - : size === "headerMd" - ? sizes.headerMd - : size === "headerLg" - ? sizes.headerLg - : size === "headerXl" - ? sizes.headerXl - : size === "footer" - ? sizes.footer - : size === "footerLg" - ? sizes.footerLg - : sizes.default; + const config = sizes[size || "default"] || sizes.default; return ( @@ -148,25 +69,27 @@ const Logo = memo(({ size = "default", showText = true }) => { showText ? config.gap : "" } transition-all duration-200 ease-in-out hover:scale-[1.02] cursor-pointer`} > - {/* Logo Text - only show if showText is true */} - {showText && ( -
- CommunityRule -
- )} + {/* Logo Text - responsive visibility for topNav sizes */} +
+ CommunityRule +
{/* Vector Icon */} {/* eslint-disable-next-line @next/next/no-img-element */} @@ -178,13 +101,7 @@ const Logo = memo(({ size = "default", showText = true }) => { className={`flex-shrink-0 ${ config.iconSize } transition-all duration-200 ${ - size === "homeHeaderXsmall" || - size === "homeHeaderSm" || - size === "homeHeaderMd" || - size === "homeHeaderLg" || - size === "homeHeaderXl" - ? "filter brightness-0" - : "" + size === "topNavFolderTop" ? "filter brightness-0" : "" }`} aria-hidden="true" /> diff --git a/app/components/navigation/ConditionalFooter.tsx b/app/components/navigation/ConditionalFooter.tsx new file mode 100644 index 0000000..48461d5 --- /dev/null +++ b/app/components/navigation/ConditionalFooter.tsx @@ -0,0 +1,32 @@ +"use client"; + +import { memo } from "react"; +import { usePathname } from "next/navigation"; +import dynamic from "next/dynamic"; + +// Code split Footer - below the fold, can be lazy loaded +const Footer = dynamic(() => import("./Footer"), { + loading: () => ( +