From 2be922a2924dae3566a3572ad04c85ffd6a263ab Mon Sep 17 00:00:00 2001 From: 64J0 Date: Sat, 8 May 2021 16:58:33 -0300 Subject: [PATCH] feat: update Layout component, enhance the Layout component to use some more semantic CSS styles, see also: #12 --- components/Layout/index.tsx | 54 ++++++++++++++-------------- components/Layout/styles.module.scss | 38 +++++--------------- 2 files changed, 35 insertions(+), 57 deletions(-) diff --git a/components/Layout/index.tsx b/components/Layout/index.tsx index 577aad0..c33b96b 100644 --- a/components/Layout/index.tsx +++ b/components/Layout/index.tsx @@ -1,4 +1,4 @@ -import React, { useCallback } from "react"; +import React from "react"; import { FaTwitter, FaGithub, FaLinkedin } from "react-icons/fa"; import HeaderHome from "../HeaderHome"; @@ -14,34 +14,32 @@ interface LayoutProps { const Layout: React.FC = ({ children, home }) => { return ( - <> -
-
- {home ? () : ()} -
- -
- {children} -
- - +
); } diff --git a/components/Layout/styles.module.scss b/components/Layout/styles.module.scss index a0d83e9..79b2509 100644 --- a/components/Layout/styles.module.scss +++ b/components/Layout/styles.module.scss @@ -1,14 +1,11 @@ -$max-width: 72rem; - -.layout-container { - height: 100%; +.layout { width: 100%; - + height: 100%; margin: 0 auto; padding: 0; } -.header { +.layout__head { display: flex; flex-direction: column; align-items: center; @@ -16,43 +13,26 @@ $max-width: 72rem; margin: 0; border-radius: 5rem 5rem 0 0; - - .headerImage { - width: 7rem; - height: 7rem; - margin: 0 auto; - } - - .headerHomeImage { - width: 11rem; - height: 11rem; - margin: 0 auto; - border: 4px solid rgba(255, 255, 255, 0.5); - } - - .backToHome { - margin: 3rem 0 0; - } } -.main { +.layout__body { padding: 0.6rem 1.2rem; margin: 0 auto; - max-width: $max-width; + max-width: var(--maxWidth); } -.footer { +.layout__footer { display: flex; flex-direction: row; justify-content: space-between; margin: 5rem auto 3rem; - max-width: $max-width; + max-width: var(--maxWidth); color: var(--white); - .icon-container { + .social__container { max-width: 130px; - .item { + .social__item { margin: 0 8px; cursor: pointer; transition: 0.4s;