From 339543d440199259acb334f1ad74cb4da6d54af5 Mon Sep 17 00:00:00 2001 From: samgildea Date: Mon, 12 Apr 2021 17:39:50 -0400 Subject: [PATCH] #44 and #26 adding colors/styling nav and hero --- src/components/header/header-styles.js | 31 +++++++-- src/components/header/header.jsx | 17 +++-- src/components/homepage/index.js | 87 +++++++++++++------------- src/components/layout.js | 4 +- src/pages/about.js | 5 +- src/pages/index.js | 2 +- src/style/colors.js | 9 ++- 7 files changed, 95 insertions(+), 60 deletions(-) diff --git a/src/components/header/header-styles.js b/src/components/header/header-styles.js index 50dad24..1f25c03 100644 --- a/src/components/header/header-styles.js +++ b/src/components/header/header-styles.js @@ -7,13 +7,18 @@ export const NavContainer = styled.div` padding-bottom: 32px; &.colorChange { background-color: rgb(0, 0, 0, 0.55); + color: ${colors.white900}; + } position: fixed; width: 100%; transition: 0.5s all ease; - color: ${colors.white900}; + color: ${colors.black900}; + &.home-header { + color: ${colors.white900}; + } ` export const Logo = styled.div` @@ -21,6 +26,7 @@ export const Logo = styled.div` font-size: 24px; padding-top: 32px; padding-left: 80px; + color: ${colors.black900}; @media (max-width: ${dimensions.maxwidthTablet}px) { text-align: center; @@ -28,6 +34,10 @@ export const Logo = styled.div` padding-top: 24px; padding-left: 0px; } + + &.home-header { + color: ${colors.white900}; + } ` export const NavLinks = styled.div` @@ -35,21 +45,34 @@ export const NavLinks = styled.div` right: 80px; top: 40px; display: flex; + color: ${colors.black900}; + + &.home-header { + a { + color: ${colors.white900}; + } + } @media (max-width: ${dimensions.maxwidthTablet}px) { display: none; } ` -export const NavLink = styled.div` +export const NavLink = styled.a` font-weight: bold; padding-left: 100px; text-decoration: none; - color: ${colors.white900}; + + + color: ${colors.black900}; + + &.home-header { + color: ${colors.white900}; + } + ` export const MobileIcon = styled.div` - @media (min-width: ${dimensions.maxwidthTablet}px) { display: none; } diff --git a/src/components/header/header.jsx b/src/components/header/header.jsx index 27278ad..c12f0df 100644 --- a/src/components/header/header.jsx +++ b/src/components/header/header.jsx @@ -10,7 +10,7 @@ import { import { NavText } from "../../style/type-styles" -export const Header = () => { +export const Header = ({ home }) => { const [open, setOpen] = useState(false) const [colorChange, setColorchange] = useState(false) const changeNavbarColor = () => { @@ -22,15 +22,20 @@ export const Header = () => { } typeof window !== "undefined" && window.addEventListener("scroll", changeNavbarColor) - + // return ( - - PowerHouse + + PowerHouse setOpen(!open)} className={open ? "open" : ""}> - + ABOUT @@ -40,7 +45,7 @@ export const Header = () => { PRODUCTS - + SOLUTIONS diff --git a/src/components/homepage/index.js b/src/components/homepage/index.js index 0607f02..2fe969b 100644 --- a/src/components/homepage/index.js +++ b/src/components/homepage/index.js @@ -14,57 +14,58 @@ import { FutureCTA, FutureImage, HomePageContainer, - HeroImage + HeroImage, } from "./index-styles" import { Helmet } from "react-helmet" - export default function HomePage({ data }) { return ( - - + <> + - - - - - - -

{data.hero_headline}

-
- -

{data.hero_subtext}

-
- - - {data.hero_cta_text} - - -
-
+ + + + + + + +

{data.hero_headline}

+
+ +

{data.hero_subtext}

+
+ + + {data.hero_cta_text} + + +
+
- - - - -

{data.section_title}

-
- -

{data.section_description}

-
+ + + + +

{data.section_title}

+
+ +

{data.section_description}

+
- - {data.button_text} - -
- -
-
+ + {data.button_text} + + + + +
+ ) } diff --git a/src/components/layout.js b/src/components/layout.js index ee0c856..0d2e5b4 100644 --- a/src/components/layout.js +++ b/src/components/layout.js @@ -18,10 +18,10 @@ const LayoutBody = styled.div` } ` -const Layout = ({ children }) => { +const Layout = ({ children, home }) => { return ( -
+
{children}