diff --git a/pages/_error.tsx b/pages/_error.tsx index f2a37e0e..f2aef519 100644 --- a/pages/_error.tsx +++ b/pages/_error.tsx @@ -1,25 +1,28 @@ import 'src/style/style.scss' + import { NextPage } from 'next' +import { Wrapper } from 'src/components/Wrapper' const Page: NextPage = () => ( -
-
-
-
-

Страница не найдена.

- + +
+ © 2012—2019 Шлиссельбургская детская художественная школа
- - -
-
- - + )} + > +
+
+

Страница не найдена.

+
- -
+ +
На главную
+ + ) export default Page diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx index 7a3d3fc5..6f755e94 100644 --- a/src/components/App/index.tsx +++ b/src/components/App/index.tsx @@ -1,17 +1,16 @@ -import * as React from 'react' +import 'src/style/style.scss' + import dynamic from 'next/dynamic' import cx from 'classnames' - import { Footer } from '../Footer' import Comments from '../Comments' -import { useReducedMotion } from '../../hooks/useReducedMotion' +import { useReducedMotion } from 'src/hooks/useReducedMotion' +import { Wrapper } from '../Wrapper' const Header = dynamic(() => import('./Header'), { ssr: false, }) -import '../../style/style.scss' - export interface IAppProps { menu: any showAuthor: boolean @@ -21,36 +20,37 @@ export interface IAppProps { export const App: React.FC = props => { const motionDisabled = useReducedMotion() - + return ( -
-
-
-
-
+ +
+
+
+
-
-
+ + )} + footer={( +
+ )} + > +
+ {props.children} +
-
-
- {props.children} -
- - -
- -
-
+ + ) -} \ No newline at end of file +} diff --git a/src/components/Wrapper/index.tsx b/src/components/Wrapper/index.tsx new file mode 100644 index 00000000..96c643e5 --- /dev/null +++ b/src/components/Wrapper/index.tsx @@ -0,0 +1,34 @@ +import cx from 'classnames' + +export type WrapperProps = { + header: React.ReactNode + footer: React.ReactNode +} + +export const Wrapper: React.FC = props => ( +
+ + + {props.header} + +
+ {props.children} +
+ + {props.footer} +
+) diff --git a/src/style/body-wrapper.scss b/src/style/body-wrapper.scss deleted file mode 100644 index c26ced47..00000000 --- a/src/style/body-wrapper.scss +++ /dev/null @@ -1,13 +0,0 @@ -.body-wrapper { - display: flex; - flex-direction: column; - min-height: 100vh; - background-color: white; - - font-family: var(--text-font); - font-size: var(--font-size-default); -} - -.body-wrapper__content { - flex: 1; -} diff --git a/src/style/style.scss b/src/style/style.scss index 0b1235c1..7c24d109 100644 --- a/src/style/style.scss +++ b/src/style/style.scss @@ -17,7 +17,6 @@ @import "components/ArticleTags"; -@import "body-wrapper"; @import "content"; @import "page-animation"; @import "main-image";