From 5475f9852addb8b9980ce255ef50516fc7181fa3 Mon Sep 17 00:00:00 2001 From: Yuliya Sharapa Date: Wed, 1 Sep 2021 15:52:40 -0300 Subject: [PATCH] add seo to homepage --- src/components/BitwayPage/BitwayContainer.scss | 3 --- .../BitwayPage/Paragraph/Paragraph.scss | 14 ++++++++------ src/components/ContactPage/ContactContainer.js | 1 - .../HomePage/HomeContainer/HomeContainer.js | 10 +++++++++- src/hooks/useHomePage.js | 5 +++++ src/schema/schema.js | 15 +++++++++++++++ 6 files changed, 37 insertions(+), 11 deletions(-) diff --git a/src/components/BitwayPage/BitwayContainer.scss b/src/components/BitwayPage/BitwayContainer.scss index 74459bc0..8fdc7da0 100644 --- a/src/components/BitwayPage/BitwayContainer.scss +++ b/src/components/BitwayPage/BitwayContainer.scss @@ -19,9 +19,6 @@ grid-area: bitway-even; } -.bitway-desktop { - display: grid; -} .bitway-mobile { display: none; } diff --git a/src/components/BitwayPage/Paragraph/Paragraph.scss b/src/components/BitwayPage/Paragraph/Paragraph.scss index 9346f662..4cb8161f 100644 --- a/src/components/BitwayPage/Paragraph/Paragraph.scss +++ b/src/components/BitwayPage/Paragraph/Paragraph.scss @@ -1,25 +1,26 @@ @import "../../../styles/global.scss"; .bitway-paragraph { + margin-bottom: 20px; & p { font-family: $primary-font; - font-size: 25px; + font-size: 20px; font-style: normal; font-weight: 400; - line-height: 36px; + line-height: 30px; letter-spacing: 0em; text-align: left; } & > div > p { font-family: $primary-font; - font-size: 25px; + font-size: 20px; font-style: normal; font-weight: 400; - line-height: 36px; + line-height: 30px; letter-spacing: 0em; text-align: left; padding: 0 80px 20px; & * { - font-size: 25px; + font-size: 20px; } & a { color: $blue; @@ -70,6 +71,7 @@ line-height: 26px; letter-spacing: 0em; text-align: left; + } & > div > p { font-family: $primary-font; @@ -79,7 +81,7 @@ line-height: 26px; letter-spacing: 0em; text-align: left; - padding: 0 20px 0px; + padding: 0 20px 0px 0px; & * { font-size: 15px; } diff --git a/src/components/ContactPage/ContactContainer.js b/src/components/ContactPage/ContactContainer.js index 0ed7cc31..0e747664 100644 --- a/src/components/ContactPage/ContactContainer.js +++ b/src/components/ContactPage/ContactContainer.js @@ -11,7 +11,6 @@ const Contact = () => { const contactData = useContactPage() - const { image, nameImage, title } = contactData.allStrapiContactPage.nodes[0] const { formId, portalId } = contactData.allStrapiContactPage.nodes[0].contactForm const { pageTitle, pageDescription, pageKeywords } = contactData.allStrapiContactPage.nodes[0].pageMetadata diff --git a/src/components/HomePage/HomeContainer/HomeContainer.js b/src/components/HomePage/HomeContainer/HomeContainer.js index 62d7fdc1..ce5cc943 100644 --- a/src/components/HomePage/HomeContainer/HomeContainer.js +++ b/src/components/HomePage/HomeContainer/HomeContainer.js @@ -6,12 +6,20 @@ import { Seo, CustomSection } from "../../index" import "./HomeContainer.scss" const Home = () => { + const data = useHomePage() + const homeSections = data?.allStrapiHome?.nodes[0]?.sections + const { pageTitle, pageDescription, pageKeywords } = data?.allStrapiHome?.nodes[0].pageMetadata + return ( - + ) diff --git a/src/hooks/useHomePage.js b/src/hooks/useHomePage.js index ee3fd822..f56c67a0 100644 --- a/src/hooks/useHomePage.js +++ b/src/hooks/useHomePage.js @@ -5,6 +5,11 @@ const useHomePage = () => { { allStrapiHome { nodes { + pageMetadata { + pageDescription + pageKeywords + pageTitle + } sections { title type diff --git a/src/schema/schema.js b/src/schema/schema.js index df2a701a..e24dfe11 100644 --- a/src/schema/schema.js +++ b/src/schema/schema.js @@ -90,9 +90,17 @@ type StrapiHome implements Node { locale: String ): Date sections: [StrapiHomeSections] + pageMetadata: StrapiHomePageMetadata strapiId: Int } +type StrapiHomePageMetadata { + id: Int + pageTitle: String + pageDescription: String + pageKeywords: String +} + type StrapiHomeSections { id: Int banner: StrapiHomeSectionsBanner @@ -755,10 +763,17 @@ type StrapiContactPage implements Node { locale: String ): Date pageMetadata: StrapiContactPagePageMetadata + contactForm: StrapiContactPageContactForm image: File @link(from: "image___NODE") strapiId: Int } +type StrapiContactPageContactForm { + id: Int + portalId: String + formId: String +} + type StrapiContactPagePageMetadata { id: Int pageTitle: String