From 0be74aa860c3da996293c1edfd9f9d4be7ed9dd2 Mon Sep 17 00:00:00 2001 From: aelassas Date: Fri, 13 Dec 2024 20:59:18 +0100 Subject: [PATCH] Update frontend layout --- frontend/src/assets/css/checkout.css | 2 +- frontend/src/assets/css/contact.css | 1 + frontend/src/assets/css/footer.css | 13 +- frontend/src/assets/css/settings.css | 2 + frontend/src/components/Footer.tsx | 4 +- frontend/src/pages/Settings.tsx | 197 ++++++++++++++------------- 6 files changed, 113 insertions(+), 106 deletions(-) diff --git a/frontend/src/assets/css/checkout.css b/frontend/src/assets/css/checkout.css index 62b98ff9e..bf3710096 100644 --- a/frontend/src/assets/css/checkout.css +++ b/frontend/src/assets/css/checkout.css @@ -3,9 +3,9 @@ div.checkout { flex: 1 0 auto; flex-direction: row; justify-content: center; - margin: 80px 0 200px 0; transform: translate3d(0, 0, 0); min-height: 100vh; + margin: 80px 0 200px 0; } @media only screen and (width <=960px) { diff --git a/frontend/src/assets/css/contact.css b/frontend/src/assets/css/contact.css index 544c1dadb..75827a973 100644 --- a/frontend/src/assets/css/contact.css +++ b/frontend/src/assets/css/contact.css @@ -4,6 +4,7 @@ div.contact { flex: 1 0 auto; align-items: center; transform: translate3d(0, 0, 0); + min-height: 100vh; } div.contact .form { diff --git a/frontend/src/assets/css/footer.css b/frontend/src/assets/css/footer.css index 439c68892..c9144dd95 100644 --- a/frontend/src/assets/css/footer.css +++ b/frontend/src/assets/css/footer.css @@ -54,35 +54,34 @@ div.footer ul.links li:hover { text-decoration: underline; } -div.footer div.contact { +div.footer div.footer-contact { display: flex; flex-direction: row; align-items: center; margin: 10px 0; } -div.footer div.contact .icon { +div.footer div.footer-contact .icon { color: #525252; margin-right: 5px; } -div.footer div.contact a { +div.footer div.footer-contact a { text-decoration: none; color: #1a1a1a; } -div.footer div.contact a:hover { +div.footer div.footer-contact a:hover { /* opacity: 0.85; */ text-decoration: underline; - } -div.footer div.contact .social-icon { +div.footer div.footer-contact .social-icon { color: #525252; margin-right: 12px; } -div.footer div.contact .social-icon:hover{ +div.footer div.footer-contact .social-icon:hover{ color: #1a1a1a; } diff --git a/frontend/src/assets/css/settings.css b/frontend/src/assets/css/settings.css index 7307b128d..b1601f6ec 100644 --- a/frontend/src/assets/css/settings.css +++ b/frontend/src/assets/css/settings.css @@ -7,6 +7,8 @@ div.settings { align-items: center; margin: 45px 0; transform: translate3d(0, 0, 0); + margin: 80px 0 200px 0; + min-height: 100vh; } div.settings .settings-form-wrapper { diff --git a/frontend/src/components/Footer.tsx b/frontend/src/components/Footer.tsx index 81d49afed..0edd1db5b 100644 --- a/frontend/src/components/Footer.tsx +++ b/frontend/src/components/Footer.tsx @@ -42,11 +42,11 @@ const Footer = () => {
  • navigate('/contact')}>{strings.CONTACT}
  • navigate('/faq')}>{strings.FAQ}
  • -
    +
    info@bookcars.ma
    -
    +
    diff --git a/frontend/src/pages/Settings.tsx b/frontend/src/pages/Settings.tsx index 0b07d2710..18127de75 100644 --- a/frontend/src/pages/Settings.tsx +++ b/frontend/src/pages/Settings.tsx @@ -23,9 +23,10 @@ import Backdrop from '@/components/SimpleBackdrop' import DatePicker from '@/components/DatePicker' import Avatar from '@/components/Avatar' import * as helper from '@/common/helper' +import DriverLicense from '@/components/DriverLicense' +import Footer from '@/components/Footer' import '@/assets/css/settings.css' -import DriverLicense from '@/components/DriverLicense' const Settings = () => { const navigate = useNavigate() @@ -178,103 +179,107 @@ const Settings = () => { return ( {visible && user && ( -
    - - -
    - - - {commonStrings.FULL_NAME} - - - - {commonStrings.EMAIL} - - - - {commonStrings.PHONE} - - {(!phoneValid && commonStrings.PHONE_NOT_VALID) || ''} - - - { - if (_birthDate) { - const _birthDateValid = validateBirthDate(_birthDate) - - setBirthDate(_birthDate) - setBirthDateValid(_birthDateValid) - } - }} - language={user.language} + <> +
    + + + + - {(!birthDateValid && commonStrings.BIRTH_DATE_NOT_VALID) || ''} + + {commonStrings.FULL_NAME} + + + + {commonStrings.EMAIL} + + + + {commonStrings.PHONE} + + {(!phoneValid && commonStrings.PHONE_NOT_VALID) || ''} + + + { + if (_birthDate) { + const _birthDateValid = validateBirthDate(_birthDate) + + setBirthDate(_birthDate) + setBirthDateValid(_birthDateValid) + } + }} + language={user.language} + /> + {(!birthDateValid && commonStrings.BIRTH_DATE_NOT_VALID) || ''} + + + {commonStrings.LOCATION} + + + + {commonStrings.BIO} + + +
    + + + +
    + +
    + + +

    {commonStrings.DRIVER_LICENSE}

    + +
    + + +

    {strings.NETWORK_SETTINGS}

    + + } label={strings.SETTINGS_EMAIL_NOTIFICATIONS} /> - - {commonStrings.LOCATION} - - - - {commonStrings.BIO} - - -
    - - - -
    - -
    - - -

    {commonStrings.DRIVER_LICENSE}

    - -
    - - -

    {strings.NETWORK_SETTINGS}

    - - } label={strings.SETTINGS_EMAIL_NOTIFICATIONS} /> - -
    - -
    +
    + +
    + +