From ef6247c19be99cf70b5d878a42d1cd3951cbdcd6 Mon Sep 17 00:00:00 2001 From: benjacanas Date: Thu, 21 Apr 2022 14:18:42 -0300 Subject: [PATCH 1/2] navbar fix --- .../Footer/Navegation/navegation.js | 42 +++++++++---------- .../Footer/Subscription/subscription.js | 8 ---- src/components/NavBar/NavBar.scss | 5 ++- src/components/NavBar/Navbar.js | 9 ++-- src/hooks/useFooter.js | 15 +++++-- src/images/menu.svg | 1 + 6 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 src/images/menu.svg diff --git a/src/components/Footer/Navegation/navegation.js b/src/components/Footer/Navegation/navegation.js index 95e53717..ae5d58ad 100644 --- a/src/components/Footer/Navegation/navegation.js +++ b/src/components/Footer/Navegation/navegation.js @@ -1,26 +1,24 @@ -import React from 'react'; -import { useFooter } from '../../../hooks'; -import { Link } from 'gatsby'; -import './navegation.scss'; +import React from "react" +import { useFooter } from "../../../hooks" +import { Link } from "gatsby" +import "./navegation.scss" export default function Navegation() { - const data = useFooter(); - const dataFooter = data?.allStrapiLayout?.nodes[0].footer; + const data = useFooter() + const dataFooter = data?.allStrapiLayout?.nodes[0].footer + const dataNav = data?.allStrapiLayout?.nodes[0].navbar + console.log(dataNav) - const navegationItems = dataFooter?.navegation?.pageLink; - - const navegationParts = navegationItems?.map((section) => -
  • - {section.name} -
  • - ); - - return ( -
    -
    {dataFooter.navegation?.title}
    - -
    - ) + return ( +
    +
    {dataFooter.navegation?.title}
    + +
    + ) } diff --git a/src/components/Footer/Subscription/subscription.js b/src/components/Footer/Subscription/subscription.js index fb73274f..d4946497 100644 --- a/src/components/Footer/Subscription/subscription.js +++ b/src/components/Footer/Subscription/subscription.js @@ -11,14 +11,6 @@ export default function Subscription() {
    {dataSubscription?.title}
    -
    diff --git a/src/components/NavBar/NavBar.scss b/src/components/NavBar/NavBar.scss index c3eb7ad1..affc0ea4 100644 --- a/src/components/NavBar/NavBar.scss +++ b/src/components/NavBar/NavBar.scss @@ -9,10 +9,11 @@ } .NavBar__Logo { margin: 16px 28px; - width: 79px; + width: 120px; } + .navbar-toggler .navbar-toggler-icon { - background-image: url("https://strapi-s3-bitlogic.s3.sa-east-1.amazonaws.com/burger_menu_3ae79f1b8e.svg") !important; + background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMCIgaGVpZ2h0PSIzMCIgdmlld0JveD0iMCAwIDMwIDMwIj48cGF0aCBzdHJva2U9IiMzZjZiZTgiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBzdHJva2Utd2lkdGg9IjIiIGQ9Ik00IDdoMjJNNCAxNWgyMk00IDIzaDIyIi8+PC9zdmc+") !important; width: 2rem; height: 2rem; } diff --git a/src/components/NavBar/Navbar.js b/src/components/NavBar/Navbar.js index b01c964e..58028e1e 100644 --- a/src/components/NavBar/Navbar.js +++ b/src/components/NavBar/Navbar.js @@ -6,11 +6,12 @@ import AnimatedNavbar from "./AnimatedNavBar/AnimatedNavbar" import { getImage, GatsbyImage } from "gatsby-plugin-image" import { useNavbar } from "../../hooks/index" - +import menusvg from '../../images/menu.svg' import { useTheme } from "../../context/themeContext" // theme images import moon from "../../images/moon-solid.svg" import sun from "../../images/sun.svg" +console.log(menusvg) const NavBar = () => { const { theme, toggleTheme } = useTheme() const navbarData = useNavbar() @@ -27,7 +28,7 @@ const NavBar = () => { return ( <> - + { - - + return ( +
    +
    {dataSubscription?.title}
    +
    +
    +
    - ) +
    + +
    + ) } diff --git a/src/components/Footer/Subscription/subscription.scss b/src/components/Footer/Subscription/subscription.scss index 18df0120..4c71118b 100644 --- a/src/components/Footer/Subscription/subscription.scss +++ b/src/components/Footer/Subscription/subscription.scss @@ -2,9 +2,7 @@ .ContactData { &__Item { - .titleSubscription { - display: none; - } + form { margin-bottom: 0px; } @@ -28,6 +26,9 @@ } } @media screen and (min-width: $breakpoint-md) { + .contactData-mobile_button{ + display: none; + } .ContactData { &__Item { .titleSubscription { @@ -60,3 +61,30 @@ } } } + + +@media screen and (max-width: $breakpoint-md) { + .ContactData { + &__Form { + input { + width: 75%; + } + button:not(.contactData-mobile_button) { + width: 70%; + display: none; + } + } + } + .titleSubscription { + display: none; + } + .contactData-mobile_button{ + width: 70%; + @include primaryBtn; + margin-top: 3em; + } + .contactData-container{ + display: flex; + justify-content: center; + } +} diff --git a/src/hooks/useFooter.js b/src/hooks/useFooter.js index 37e1ed3f..c73e894e 100644 --- a/src/hooks/useFooter.js +++ b/src/hooks/useFooter.js @@ -6,6 +6,13 @@ const useFooter = () => { allStrapiLayout { nodes { navbar { + navButton { + landing_page { + slug + } + url + content + } navbarItem { url label