diff --git a/components/footer/ColorClasses.tsx b/components/footer/ColorClasses.tsx deleted file mode 100644 index 1d640781..00000000 --- a/components/footer/ColorClasses.tsx +++ /dev/null @@ -1,42 +0,0 @@ -export interface Layout { - backgroundColor?: - | "Primary" - | "Secondary" - | "Accent" - | "Base 100" - | "Base 100 inverted"; - variation?: - | "Variation 1" - | "Variation 2" - | "Variation 3" - | "Variation 4" - | "Variation 5"; - hide?: { - logo?: boolean; - newsletter?: boolean; - sectionLinks?: boolean; - socialLinks?: boolean; - paymentMethods?: boolean; - mobileApps?: boolean; - regionOptions?: boolean; - extraLinks?: boolean; - backToTheTop?: boolean; - }; -} - -export default function colorClasses(layout: Layout) { - switch (layout?.backgroundColor) { - case "Primary": - return "bg-primary text-primary-content"; - case "Secondary": - return "bg-secondary text-secondary-content"; - case "Accent": - return "bg-accent text-accent-content"; - case "Base 100": - return "bg-base-100 text-base-content"; - case "Base 100 inverted": - return "bg-base-content text-base-100"; - default: - return "bg-primary text-primary-content"; - } -} diff --git a/components/footer/Footer.tsx b/components/footer/Footer.tsx index 8a9078ef..789f4679 100644 --- a/components/footer/Footer.tsx +++ b/components/footer/Footer.tsx @@ -1,5 +1,4 @@ import BackToTop from "$store/components/footer/BackToTop.tsx"; -import ColorClasses from "$store/components/footer/ColorClasses.tsx"; import Divider from "$store/components/footer/Divider.tsx"; import ExtraLinks from "$store/components/footer/ExtraLinks.tsx"; import FooterItems from "$store/components/footer/FooterItems.tsx"; @@ -9,6 +8,7 @@ import PaymentMethods from "$store/components/footer/PaymentMethods.tsx"; import RegionSelector from "$store/components/footer/RegionSelector.tsx"; import Social from "$store/components/footer/Social.tsx"; import Newsletter from "$store/islands/Newsletter.tsx"; +import { clx } from "$store/sdk/clx.ts"; import type { ImageWidget } from "apps/admin/widgets.ts"; import PoweredByDeco from "apps/website/components/PoweredByDeco.tsx"; @@ -111,6 +111,14 @@ export interface Props { layout?: Layout; } +const LAYOUT = { + "Primary": "bg-primary text-primary-content", + "Secondary": "bg-secondary text-secondary-content", + "Accent": "bg-accent text-accent-content", + "Base 100": "bg-base-100 text-base-content", + "Base 100 inverted": "bg-base-content text-base-100", +}; + function Footer({ logo, newsletter = { @@ -214,9 +222,10 @@ function Footer({ return (