From 21d0f12bb46bac75b296010f5ae20c09f4d12c7a Mon Sep 17 00:00:00 2001 From: LordMathis Date: Fri, 2 Oct 2020 18:54:53 +0200 Subject: [PATCH] Vertically center index page --- src/components/layout.js | 10 ++++++---- src/pages/index.js | 5 +++-- src/styles/layout.module.scss | 7 +++++++ src/styles/social.module.scss | 5 +---- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/components/layout.js b/src/components/layout.js index c413d3f..637190e 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -7,7 +7,7 @@ import Footer from "./footer" import { Helmet } from "react-helmet" import styles from "../styles/layout.module.scss" -const Layout = ({ children, title, author}) => { +const Layout = ({ children, title, author, vertical}) => { const data = useStaticQuery(graphql` query SiteTitleQuery { @@ -17,8 +17,9 @@ const Layout = ({ children, title, author}) => { hostname } } - } -`) + }`) + + const classes = vertical ? `${styles.content} ${styles.vertical}` : styles.content return (
@@ -30,7 +31,7 @@ const Layout = ({ children, title, author}) => {
-
+
{children}