diff --git a/public/assets/tailwind-base.css b/public/assets/tailwind-base.css index efe482a..05560fe 100644 --- a/public/assets/tailwind-base.css +++ b/public/assets/tailwind-base.css @@ -1,4 +1,3 @@ - /** * HEY HO */ @@ -14,15 +13,15 @@ *, ::before, ::after { - box-sizing: border-box; /* 1 */ - border-width: 0; /* 2 */ - border-style: solid; /* 2 */ - border-color: #EEEEEE; /* 2 */ + box-sizing: border-box; /* 1 */ + border-width: 0; /* 2 */ + border-style: solid; /* 2 */ + border-color: #eeeeee; /* 2 */ } ::before, ::after { - --tw-content: ''; + --tw-content: ''; } /* @@ -33,10 +32,12 @@ */ html { - line-height: 1.5; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ /* 3 */ - tab-size: 4; /* 3 */ - font-family: Inter var, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */ + line-height: 1.5; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ /* 3 */ + tab-size: 4; /* 3 */ + font-family: Inter var, Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, + 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', + 'Segoe UI Symbol', 'Noto Color Emoji'; /* 4 */ } /* @@ -45,8 +46,8 @@ html { */ body { - margin: 0; /* 1 */ - line-height: inherit; /* 2 */ + margin: 0; /* 1 */ + line-height: inherit; /* 2 */ } /* @@ -56,9 +57,9 @@ body { */ hr { - height: 0; /* 1 */ - color: inherit; /* 2 */ - border-top-width: 1px; /* 3 */ + height: 0; /* 1 */ + color: inherit; /* 2 */ + border-top-width: 1px; /* 3 */ } /* @@ -66,7 +67,7 @@ Add the correct text decoration in Chrome, Edge, and Safari. */ abbr:where([title]) { - text-decoration: underline dotted; + text-decoration: underline dotted; } /* @@ -79,8 +80,8 @@ h3, h4, h5, h6 { - font-size: inherit; - font-weight: inherit; + font-size: inherit; + font-weight: inherit; } /* @@ -88,8 +89,8 @@ Reset links to optimize for opt-in styling instead of opt-out. */ a { - color: inherit; - text-decoration: inherit; + color: inherit; + text-decoration: inherit; } /* @@ -98,7 +99,7 @@ Add the correct font weight in Edge and Safari. b, strong { - font-weight: bolder; + font-weight: bolder; } /* @@ -110,8 +111,9 @@ code, kbd, samp, pre { - font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */ - font-size: 1em; /* 2 */ + font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', + 'Courier New', monospace; /* 1 */ + font-size: 1em; /* 2 */ } /* @@ -119,7 +121,7 @@ Add the correct font size in all browsers. */ small { - font-size: 80%; + font-size: 80%; } /* @@ -128,18 +130,18 @@ Prevent `sub` and `sup` elements from affecting the line height in all browsers. sub, sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } sub { - bottom: -0.25em; + bottom: -0.25em; } sup { - top: -0.5em; + top: -0.5em; } /* @@ -149,9 +151,9 @@ sup { */ table { - text-indent: 0; /* 1 */ - border-color: inherit; /* 2 */ - border-collapse: collapse; /* 3 */ + text-indent: 0; /* 1 */ + border-color: inherit; /* 2 */ + border-collapse: collapse; /* 3 */ } /* @@ -165,12 +167,12 @@ input, optgroup, select, textarea { - font-family: inherit; /* 1 */ - font-size: 100%; /* 1 */ - line-height: inherit; /* 1 */ - color: inherit; /* 1 */ - margin: 0; /* 2 */ - padding: 0; /* 3 */ + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: inherit; /* 1 */ + color: inherit; /* 1 */ + margin: 0; /* 2 */ + padding: 0; /* 3 */ } /* @@ -179,7 +181,7 @@ Remove the inheritance of text transform in Edge and Firefox. button, select { - text-transform: none; + text-transform: none; } /* @@ -191,9 +193,9 @@ button, [type='button'], [type='reset'], [type='submit'] { - -webkit-appearance: button; /* 1 */ - background-color: transparent; /* 2 */ - background-image: none; /* 2 */ + -webkit-appearance: button; /* 1 */ + background-color: transparent; /* 2 */ + background-image: none; /* 2 */ } /* @@ -201,7 +203,7 @@ Use the modern Firefox focus style for all focusable elements. */ :-moz-focusring { - outline: auto; + outline: auto; } /* @@ -209,7 +211,7 @@ Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/ */ :-moz-ui-invalid { - box-shadow: none; + box-shadow: none; } /* @@ -217,7 +219,7 @@ Add the correct vertical alignment in Chrome and Firefox. */ progress { - vertical-align: baseline; + vertical-align: baseline; } /* @@ -226,7 +228,7 @@ Correct the cursor style of increment and decrement buttons in Safari. ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { - height: auto; + height: auto; } /* @@ -235,8 +237,8 @@ Correct the cursor style of increment and decrement buttons in Safari. */ [type='search'] { - -webkit-appearance: textfield; /* 1 */ - outline-offset: -2px; /* 2 */ + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ } /* @@ -244,7 +246,7 @@ Remove the inner padding in Chrome and Safari on macOS. */ ::-webkit-search-decoration { - -webkit-appearance: none; + -webkit-appearance: none; } /* @@ -253,8 +255,8 @@ Remove the inner padding in Chrome and Safari on macOS. */ ::-webkit-file-upload-button { - -webkit-appearance: button; /* 1 */ - font: inherit; /* 2 */ + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ } /* @@ -262,7 +264,7 @@ Add the correct display in Chrome and Safari. */ summary { - display: list-item; + display: list-item; } /* @@ -282,24 +284,24 @@ hr, figure, p, pre { - margin: 0; + margin: 0; } fieldset { - margin: 0; - padding: 0; + margin: 0; + padding: 0; } legend { - padding: 0; + padding: 0; } ol, ul, menu { - list-style: none; - margin: 0; - padding: 0; + list-style: none; + margin: 0; + padding: 0; } /* @@ -307,7 +309,7 @@ Prevent resizing textareas horizontally by default. */ textarea { - resize: vertical; + resize: vertical; } /* @@ -317,8 +319,8 @@ textarea { input::placeholder, textarea::placeholder { - opacity: 1; /* 1 */ - color: #BDBDBD; /* 2 */ + opacity: 1; /* 1 */ + color: #bdbdbd; /* 2 */ } /* @@ -326,8 +328,8 @@ Set the default cursor for buttons. */ button, -[role="button"] { - cursor: pointer; +[role='button'] { + cursor: pointer; } /* @@ -335,7 +337,7 @@ Make sure disabled buttons don't get the pointer cursor. */ :disabled { - cursor: default; + cursor: default; } /* @@ -352,8 +354,8 @@ audio, iframe, embed, object { - display: block; /* 1 */ - vertical-align: middle; /* 2 */ + display: block; /* 1 */ + vertical-align: middle; /* 2 */ } /* @@ -362,8 +364,8 @@ Constrain images and videos to the parent width and preserve their intrinsic asp img, video { - max-width: 100%; - height: auto; + max-width: 100%; + height: auto; } /* @@ -371,50 +373,52 @@ Ensure the default browser behavior of the `hidden` attribute. */ [hidden] { - display: none; + display: none; } -*, ::before, ::after { - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ''; - --tw-pan-y: ''; - --tw-pinch-zoom: ''; - --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ''; - --tw-slashed-zero: ''; - --tw-numeric-figure: ''; - --tw-numeric-spacing: ''; - --tw-numeric-fraction: ''; - --tw-ring-inset: ''; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(33 150 243 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ''; - --tw-brightness: ''; - --tw-contrast: ''; - --tw-grayscale: ''; - --tw-hue-rotate: ''; - --tw-invert: ''; - --tw-saturate: ''; - --tw-sepia: ''; - --tw-drop-shadow: ''; - --tw-backdrop-blur: ''; - --tw-backdrop-brightness: ''; - --tw-backdrop-contrast: ''; - --tw-backdrop-grayscale: ''; - --tw-backdrop-hue-rotate: ''; - --tw-backdrop-invert: ''; - --tw-backdrop-opacity: ''; - --tw-backdrop-saturate: ''; - --tw-backdrop-sepia: ''; +*, +::before, +::after { + --tw-translate-x: 0; + --tw-translate-y: 0; + --tw-rotate: 0; + --tw-skew-x: 0; + --tw-skew-y: 0; + --tw-scale-x: 1; + --tw-scale-y: 1; + --tw-pan-x: ''; + --tw-pan-y: ''; + --tw-pinch-zoom: ''; + --tw-scroll-snap-strictness: proximity; + --tw-ordinal: ''; + --tw-slashed-zero: ''; + --tw-numeric-figure: ''; + --tw-numeric-spacing: ''; + --tw-numeric-fraction: ''; + --tw-ring-inset: ''; + --tw-ring-offset-width: 0px; + --tw-ring-offset-color: #fff; + --tw-ring-color: rgb(33 150 243 / 0.5); + --tw-ring-offset-shadow: 0 0 #0000; + --tw-ring-shadow: 0 0 #0000; + --tw-shadow: 0 0 #0000; + --tw-shadow-colored: 0 0 #0000; + --tw-blur: ''; + --tw-brightness: ''; + --tw-contrast: ''; + --tw-grayscale: ''; + --tw-hue-rotate: ''; + --tw-invert: ''; + --tw-saturate: ''; + --tw-sepia: ''; + --tw-drop-shadow: ''; + --tw-backdrop-blur: ''; + --tw-backdrop-brightness: ''; + --tw-backdrop-contrast: ''; + --tw-backdrop-grayscale: ''; + --tw-backdrop-hue-rotate: ''; + --tw-backdrop-invert: ''; + --tw-backdrop-opacity: ''; + --tw-backdrop-saturate: ''; + --tw-backdrop-sepia: ''; } diff --git a/src/@fuse/core/FuseLayout/FuseLayout.js b/src/@fuse/core/FuseLayout/FuseLayout.js index ad418c7..7cf9842 100644 --- a/src/@fuse/core/FuseLayout/FuseLayout.js +++ b/src/@fuse/core/FuseLayout/FuseLayout.js @@ -52,15 +52,15 @@ const inputGlobalStyles = ( // textDecoration: 'none', // }, // }, - '[class*="MuiOutlinedInput-root"]': { - borderRadius: `${theme.spacing('10px')}!important`, - }, - '[class^="border"]': { - borderColor: theme.palette.divider, - }, - '[class*="border"]': { - borderColor: theme.palette.divider, - }, + // '[class*="MuiOutlinedInput-root"]': { + // borderRadius: `${theme.spacing('10px')}`, + // }, + // '[class^="border"]': { + // borderColor: theme.palette.divider, + // }, + // '[class*="border"]': { + // borderColor: theme.palette.divider, + // }, '[class*="divide-"] > :not([hidden]) ~ :not([hidden])': { borderColor: theme.palette.divider, }, diff --git a/src/app/hooks/index.js b/src/app/hooks/index.js new file mode 100644 index 0000000..68e6a53 --- /dev/null +++ b/src/app/hooks/index.js @@ -0,0 +1,20 @@ +import { useState, useEffect } from 'react'; + +export function useWindowDimensions() { + const getWindowDimensions = () => { + const { innerWidth: width, innerHeight: height } = window; + + return { width, height }; + }; + const [windowDimensions, setWindowDimensions] = useState(getWindowDimensions()); + + useEffect(() => { + const onRecize = () => setWindowDimensions(getWindowDimensions()); + + window.addEventListener('resize', onRecize); + + return () => window.removeEventListener('resize', onRecize); + }, []); + + return windowDimensions; +} diff --git a/src/app/main/authPages/forgot-password/ForgotPasswordPage.js b/src/app/main/authPages/forgot-password/ForgotPasswordPage.js index c9d626c..42ca7a9 100644 --- a/src/app/main/authPages/forgot-password/ForgotPasswordPage.js +++ b/src/app/main/authPages/forgot-password/ForgotPasswordPage.js @@ -4,6 +4,7 @@ import Button from '@mui/material/Button'; import Paper from '@mui/material/Paper'; import TextField from '@mui/material/TextField'; import Typography from '@mui/material/Typography'; +import { forwardRef } from 'react'; import { Controller, useForm } from 'react-hook-form'; import { withTranslation } from 'react-i18next'; import { Link } from 'react-router-dom'; @@ -15,6 +16,19 @@ const defaultValues = { email: '', }; +const StyledTextField = forwardRef((props, ref) => ( + theme.palette.background.paper, + borderRadius: '10px', + }, + }} + {...props} + ref={ref} + /> +)); + function ForgotPasswordPage({ t }) { const schema = yup.object().shape({ email: yup.string().email(t('email_error')).required(t('email_error')), @@ -63,7 +77,7 @@ function ForgotPasswordPage({ t }) { name="email" control={control} render={({ field }) => ( - theme.palette.background.paper, - }, - }} /> )} /> diff --git a/src/app/main/authPages/sign-in/SignInPage.js b/src/app/main/authPages/sign-in/SignInPage.js index a08ad3d..592b0ff 100644 --- a/src/app/main/authPages/sign-in/SignInPage.js +++ b/src/app/main/authPages/sign-in/SignInPage.js @@ -7,6 +7,7 @@ import FormControlLabel from '@mui/material/FormControlLabel'; import Paper from '@mui/material/Paper'; import TextField from '@mui/material/TextField'; import Typography from '@mui/material/Typography'; +import { forwardRef } from 'react'; import { Controller, useForm } from 'react-hook-form'; import { withTranslation } from 'react-i18next'; import { Link } from 'react-router-dom'; @@ -20,6 +21,19 @@ const defaultValues = { remember: false, }; +const StyledTextField = forwardRef((props, ref) => ( + theme.palette.background.paper, + borderRadius: '10px', + }, + }} + {...props} + ref={ref} + /> +)); + function SignInPage({ t }) { const schema = yup.object().shape({ email: yup.string().email(t('email_error')).required(t('email_error')), @@ -72,7 +86,7 @@ function SignInPage({ t }) { name="email" control={control} render={({ field }) => ( - theme.palette.background.paper, - }, - }} /> )} /> @@ -96,7 +105,7 @@ function SignInPage({ t }) { name="password" control={control} render={({ field }) => ( - theme.palette.background.paper, - }, - }} /> )} /> @@ -146,7 +150,7 @@ function SignInPage({ t }) { variant="contained" color="secondary" className="w-[220px] mt-32 text-base uppercase rounded-xl" - aria-label="Sign in" + aria-label={t('sign_in_btn')} disabled={_.isEmpty(dirtyFields) || !isValid} type="submit" size="large" diff --git a/src/app/main/authPages/sign-up/SignUpPage.js b/src/app/main/authPages/sign-up/SignUpPage.js index 0ee1f36..8517d4d 100644 --- a/src/app/main/authPages/sign-up/SignUpPage.js +++ b/src/app/main/authPages/sign-up/SignUpPage.js @@ -4,6 +4,7 @@ import Button from '@mui/material/Button'; import Paper from '@mui/material/Paper'; import TextField from '@mui/material/TextField'; import Typography from '@mui/material/Typography'; +import { forwardRef } from 'react'; import { Controller, useForm } from 'react-hook-form'; import { withTranslation } from 'react-i18next'; import { Link } from 'react-router-dom'; @@ -18,6 +19,19 @@ const defaultValues = { passwordConfirm: '', }; +const StyledTextField = forwardRef((props, ref) => ( + theme.palette.background.paper, + borderRadius: '10px', + }, + }} + {...props} + ref={ref} + /> +)); + function SignUpPage({ t }) { const schema = yup.object().shape({ name: yup.string().required(t('name_error')), @@ -78,7 +92,7 @@ function SignUpPage({ t }) { name="name" control={control} render={({ field }) => ( - theme.palette.background.paper, - }, - }} /> )} /> @@ -102,7 +111,7 @@ function SignUpPage({ t }) { name="email" control={control} render={({ field }) => ( - theme.palette.background.paper, - }, - }} /> )} /> @@ -125,7 +129,7 @@ function SignUpPage({ t }) { name="password" control={control} render={({ field }) => ( - theme.palette.background.paper, - }, - }} /> )} /> @@ -148,7 +147,7 @@ function SignUpPage({ t }) { name="passwordConfirm" control={control} render={({ field }) => ( - theme.palette.background.paper, - }, - }} /> )} /> diff --git a/src/app/main/home/Home.js b/src/app/main/home/Home.js index 07f9284..f497304 100644 --- a/src/app/main/home/Home.js +++ b/src/app/main/home/Home.js @@ -1,7 +1,67 @@ -import { memo } from 'react'; +import { useEffect, useState } from 'react'; +import { withTranslation } from 'react-i18next'; +import AboutUs from './components/AboutUs'; +import ArticleCardsList from './components/ArticleCardsList'; +import FeedbackForm from './components/FeedbackForm'; +import Statistics from './components/Statistics'; +import Welcome from './components/Welcome'; -function Home(props) { - return
Heeeeelloooooo!
; +const articleCardsMock = [ + { + id: '123', + title: 'Lorem ipsum dolor sit amet ornare amet consequat ultricies auctor.', + description: + 'Lorem ipsum dolor sit amet consectetur. Quam molestie non eget rhoncus ut sed. Egestas scelerisque fames lorem id luctus viverra ligula placerat mus. Lorem ipsum dolor sit amet consectetur. Quam molestie non eget rhoncus ut sed. Egestas scelerisque fames lorem id luctus viverra ligula placmeget rhoncus ut settrnhg ips...', + image: + 'https://images.unsplash.com/photo-1664575602276-acd073f104c1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80', + updated: '12.12.2022', + }, + { + id: '234', + title: 'Lorem ipsum dolor sit amet ornare amet consequat us auctoit amet orare ametr...', + description: + 'Lorem ipsum dolor sit amet consectetur. Quam molestie non eget rhoncusnon eget rhoncus ut sed. Egestas scelerisque fames lorem id luctus viverra ligula placerat mus.', + image: + 'https://images.unsplash.com/photo-1664575602276-acd073f104c1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80', + updated: '12.12.2022', + }, + { + id: '345', + title: 'Lorem ipsum dolor sit amet ornare amet consequat ultricies auctor.', + description: + 'Lorem ipsum dolor sit amet consectetur. Quam molestie non eget rhoncus ut sed. Egestas scelerisque fames lorem id luctus viverra ligula placerat mus. Lorem ipsum dolor sit amet consectetur. Quames lorem id luctus viverra ligula placerat mus.', + image: + 'https://images.unsplash.com/photo-1664575602276-acd073f104c1?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1170&q=80', + updated: '12.12.2022', + }, +]; + +function Home({ t }) { + const [servicesCards, setServicesCards] = useState([]); + const [blogCards, setBlogCards] = useState([]); + + useEffect(() => { + setServicesCards(articleCardsMock); + setBlogCards(articleCardsMock); + }, []); + + return ( +
+ +
+ + + + + +
+
+ ); } -export default memo(Home); +export default withTranslation('homePage')(Home); diff --git a/src/app/main/home/components/AboutUs.js b/src/app/main/home/components/AboutUs.js new file mode 100644 index 0000000..89bf520 --- /dev/null +++ b/src/app/main/home/components/AboutUs.js @@ -0,0 +1,37 @@ +import { memo } from 'react'; +import { withTranslation } from 'react-i18next'; +import { Link } from 'react-router-dom'; + +function AboutUs({ t }) { + return ( +
+

{t('about_us_title')}

+
+
+