From 8159b66a52bf4fd644b5ed8fe81d51c623a23af1 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 9 Jul 2020 13:20:50 +0200 Subject: [PATCH] global layout and menu refactor --- src/components/Layout.module.css | 5 +- src/components/Layout.tsx | 11 ++- src/components/atoms/Container.module.css | 12 +++ src/components/atoms/Container.tsx | 22 +++++ src/components/molecules/Menu.module.css | 95 +++++++++++++++++-- src/components/molecules/Menu.tsx | 29 ++++-- .../molecules/Wallet/Account.module.css | 2 +- src/components/organisms/AssetList.module.css | 2 +- src/components/organisms/Header.module.css | 52 ---------- src/components/organisms/Header.tsx | 14 +-- src/global/styles.css | 6 ++ 11 files changed, 159 insertions(+), 91 deletions(-) create mode 100644 src/components/atoms/Container.module.css create mode 100644 src/components/atoms/Container.tsx diff --git a/src/components/Layout.module.css b/src/components/Layout.module.css index e91512d78..609f8ad4d 100644 --- a/src/components/Layout.module.css +++ b/src/components/Layout.module.css @@ -12,10 +12,7 @@ } .main { - padding: calc(var(--spacer) * 2) calc(var(--spacer) / 1.5); - margin-left: auto; - margin-right: auto; - max-width: var(--layout-max-width); + padding: calc(var(--spacer) * 2) 0; /* sticky footer technique */ flex: 1; diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 3066cafc1..b7b54e29c 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -5,6 +5,7 @@ import Footer from './organisms/Footer' import PageHeader from './molecules/PageHeader' import styles from './Layout.module.css' import Seo from './atoms/Seo' +import Container from './atoms/Container' export interface LayoutProps { children: ReactNode @@ -33,10 +34,12 @@ export default function Layout({
- {title && !noPageHeader && ( - - )} - {children} + + {title && !noPageHeader && ( + + )} + {children} +