diff --git a/src/components/Layouts/MainLayout.tsx b/src/components/Layouts/MainLayout.tsx index 4a0e8c49..355e5a19 100644 --- a/src/components/Layouts/MainLayout.tsx +++ b/src/components/Layouts/MainLayout.tsx @@ -7,12 +7,15 @@ import '../../styles/app.scss' type Props = { headerTitle?: string children: JSX.Element + isHeaderFixed?: boolean } export const MainLayout = (props: Props) => { + const isHeaderFixed = props.isHeaderFixed !== undefined ? props.isHeaderFixed : true + return ( <> - + {props.children} > diff --git a/src/components/Nav/Header.scss b/src/components/Nav/Header.scss index 18c9d962..b4c922a6 100644 --- a/src/components/Nav/Header.scss +++ b/src/components/Nav/Header.scss @@ -1,8 +1,6 @@ header { background: #fff; margin-bottom: 2.2rem; - position: fixed; - top: 0; width: 100%; z-index: 10; @@ -15,8 +13,10 @@ header { } } -.header--scrolled-bottom, -.header--scrolled-top { +.header--fixed { + position: fixed; + top: 0; + .main-logo { height: 56px; diff --git a/src/components/Nav/Header.tsx b/src/components/Nav/Header.tsx index 999f8096..2e4728f5 100644 --- a/src/components/Nav/Header.tsx +++ b/src/components/Nav/Header.tsx @@ -27,6 +27,7 @@ const handleEnterClick = () => { type Props = { title?: string + isHeaderFixed?: boolean } export const Header = (props: Props) => { @@ -83,7 +84,9 @@ export const Header = (props: Props) => { return ( { return ( - + ) diff --git a/src/components/Views/FourOuFour.tsx b/src/components/Views/FourOuFour.tsx index 5c3a012e..706bc38f 100644 --- a/src/components/Views/FourOuFour.tsx +++ b/src/components/Views/FourOuFour.tsx @@ -1,40 +1,41 @@ import { t } from '../../utils/intl' import { Icon } from '../Nav/Icon' -import '../../styles/FourOuFour.scss' +import styles from '../../styles/FourOuFour.module.scss' +import clsx from 'clsx' export const FourOuFourView = (_props) => { return ( - - + + - + - + - - + + {t('Error')} - 404 + 404 - - + + {t(`You've reached a non-existed page`)} {t('Try to find another way')}: - - + + {t('Search')} - + - + {t('Back to mainpage')} diff --git a/src/styles/FourOuFour.module.scss b/src/styles/FourOuFour.module.scss new file mode 100644 index 00000000..3ae39ce7 --- /dev/null +++ b/src/styles/FourOuFour.module.scss @@ -0,0 +1,96 @@ +header { + position: absolute; +} + +footer { + display: none; +} + +.main-logo { + height: 80px !important; +} + +main { + padding-bottom: 0; + padding-top: 0 !important; +} + +.errorPageWrapper { + height: 100vh; + padding-top: 100px; +} + +.errorPage { + position: relative; + top: 35%; + transform: translateY(-43%); + + .image-link:hover { + background: none; + } + + .prettyForm { + margin-top: 0.5em; + } + + .prettyFormItem input { + padding-right: 2.7em; + } + + .textCenter { + text-align: center; + } +} + +.searchSubmit { + height: 100%; + padding: 0 1em; + position: absolute; + right: 0; + top: 0; +} + +.errorImage { + display: block; + margin: auto; + width: 85%; +} + +.errorText { + font-weight: 300; + left: 52px; + margin-bottom: 1em; + position: relative; + top: -2.25em; + + @include font-size(3rem); + + @include media-breakpoint-up(sm) { + left: 80px; + position: absolute; + text-align: center; + } + + .big { + font-weight: 900; + letter-spacing: 4px; + + @include font-size(7rem); + } +} + +.errorExplain { + font-size: 16px; + position: absolute; + top: -3.4em; + left: 65px; + + p { + margin: 0 0 0.3em; + } +} + +.errorTextContainer, +.searchFormContainer { + position: relative; +} diff --git a/src/styles/FourOuFour.scss b/src/styles/FourOuFour.scss deleted file mode 100644 index e4223c79..00000000 --- a/src/styles/FourOuFour.scss +++ /dev/null @@ -1,70 +0,0 @@ -.error-page-wrapper { - height: 100vh; -} - -.error-page { - position: relative; - top: 35%; - transform: translateY(-40%); - - .error-image { - display: block; - margin: auto; - width: 85%; - } - - .error-text { - font-weight: 300; - font-size: 28px; - left: 80px; - position: absolute; - text-align: center; - top: -2.25em; - - .big { - font-weight: 900; - letter-spacing: 4px; - font-size: 60px; - } - } - - .error-explain { - font-size: 16px; - position: absolute; - top: -3.4em; - left: 65px; - - p { - margin: 0 0 0.3em; - } - } - - .image-link:hover { - background: none; - } - - .search-submit { - height: 100%; - padding: 0 1em; - position: absolute; - right: 0; - top: 0; - } - - .pretty-form { - margin-top: 0.5em; - } - - .pretty-form__item input { - padding-right: 2.7em; - } - - .text-center { - text-align: center; - } -} - -.error-text-container, -.search-form-container { - position: relative; -}
{t(`You've reached a non-existed page`)}
{t('Try to find another way')}:
+
{t('Back to mainpage')}