From 0c01457484d83ead158c9812e31984751bb6e36a Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Mon, 29 Jul 2024 18:15:04 +0200 Subject: [PATCH] :sparkles: Footer working --- src/front/Assets/Icons/vertical-separator.svg | 3 +++ .../DesignSystem/Footer/classes.module.scss | 24 ++++++++++--------- .../DesignSystem/Footer/desktop.tsx | 10 ++++---- .../Components/DesignSystem/Footer/index.tsx | 9 ++----- .../Components/DesignSystem/Footer/mobile.tsx | 6 +++-- .../Components/DesignSystem/Footer/tablet.tsx | 15 ++++++------ .../DefaultDoubleSidePage/classes.module.scss | 1 + 7 files changed, 37 insertions(+), 31 deletions(-) create mode 100644 src/front/Assets/Icons/vertical-separator.svg diff --git a/src/front/Assets/Icons/vertical-separator.svg b/src/front/Assets/Icons/vertical-separator.svg new file mode 100644 index 00000000..0f2bf83f --- /dev/null +++ b/src/front/Assets/Icons/vertical-separator.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/front/Components/DesignSystem/Footer/classes.module.scss b/src/front/Components/DesignSystem/Footer/classes.module.scss index 37143abe..4155ff54 100644 --- a/src/front/Components/DesignSystem/Footer/classes.module.scss +++ b/src/front/Components/DesignSystem/Footer/classes.module.scss @@ -3,17 +3,24 @@ .root { border-top: 1px solid var(--footer-border, #d7dce0); background: var(--footer-background, #fff); - padding: var(--spacing-1-5) 0; .sub-root { display: flex; align-items: center; gap: var(--Radius-lg, 16px); white-space: nowrap; + } - @media (max-width: 1023px) { - padding: 0 12px; - } + .desktop { + padding: var(--spacing-1-5, 12px) var(--Radius-xl, 24px); + } + + .tablet { + padding: var(--spacing-1-5, 12px) var(--Radius-xl, 24px); + } + + .mobile { + padding: var(--spacing-1-5, 12px) var(--Radius-lg, 16px); } &[data-has-left-padding="true"] { @@ -22,12 +29,7 @@ } } - &[data-is-sticky="true"] { - position: sticky; - bottom: 0; - } - - @media (max-width: 660px) or (min-width: 769px) { + @media (max-width: 660px) or (min-width: 1023px) { .tablet { display: none; } @@ -39,7 +41,7 @@ } } - @media (max-width: 769px) { + @media (max-width: 1023px) { .desktop { display: none; } diff --git a/src/front/Components/DesignSystem/Footer/desktop.tsx b/src/front/Components/DesignSystem/Footer/desktop.tsx index f3937b1c..9b4e4c58 100644 --- a/src/front/Components/DesignSystem/Footer/desktop.tsx +++ b/src/front/Components/DesignSystem/Footer/desktop.tsx @@ -3,6 +3,8 @@ import classes from "./classes.module.scss"; import Link from "next/link"; import Module from "@Front/Config/Module"; import { ELegalOptions } from "@Front/Components/LayoutTemplates/DefaultLegalDashboard"; +import VerticalSeparator from "@Assets/Icons/vertical-separator.svg"; +import Image from "next/image"; type IProps = { className?: string; @@ -14,11 +16,11 @@ export default function Desktop({ className }: IProps) { return (
© Copyright lecoffre 2024 - - Conditions d'utilisation - + Separator + Juridiques + Separator Politique de confidentialité - + Separator Politique des cookies
); diff --git a/src/front/Components/DesignSystem/Footer/index.tsx b/src/front/Components/DesignSystem/Footer/index.tsx index aad7305e..084673cb 100644 --- a/src/front/Components/DesignSystem/Footer/index.tsx +++ b/src/front/Components/DesignSystem/Footer/index.tsx @@ -7,10 +7,9 @@ import Tablet from "./tablet"; type IProps = { className?: string; hasLeftPadding?: boolean; - isSticky?: boolean; }; -export default function Footer({ className, hasLeftPadding = false, isSticky = false }: IProps) { +export default function Footer({ className, hasLeftPadding = false }: IProps) { const footerRef = React.useRef(null); useEffect(() => { if (!footerRef.current) return; @@ -18,11 +17,7 @@ export default function Footer({ className, hasLeftPadding = false, isSticky = f document.documentElement.style.setProperty("--footer-height", `${footerHeight}px`); }); return ( -