Skip to content
Merged

Dev #21

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ module.exports = {
author: `Bitlogic.io`,
},
plugins: [
{
resolve: `gatsby-plugin-google-gtag`,
options: {
// You can add multiple tracking ids and a pageview event will be fired for all of them.
trackingIds: [
"G-BKGQR6SJWV", // Google Analytics / G
],
// This object is used for configuration specific to this plugin
pluginConfig: {
// Puts tracking script in the head instead of the body
head: true,
},
},
},
"gatsby-plugin-react-helmet",

{
Expand Down Expand Up @@ -37,6 +51,7 @@ module.exports = {
`blog-page`,
`bitway-page`,
`contact-page`,
`global-config`,
],
},
},
Expand All @@ -47,12 +62,12 @@ module.exports = {
options: {
defaults: {
formats: [`auto`, `webp`],
placeholder: `blurred`,
// placeholder: `blurred`,
quality: 100,
breakpoints: [750, 1080, 1366, 1920],
backgroundColor: `transparent`,
},
},
},
},
{
resolve: `gatsby-plugin-manifest`,
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"gatsby-image": "^3.11.0",
"gatsby-plugin-gatsby-cloud": "^3.0.0",
"gatsby-plugin-google-analytics": "^3.12.0",
"gatsby-plugin-google-gtag": "^3.13.0",
"gatsby-plugin-google-marketing-platform": "^0.2.0",
"gatsby-plugin-hubspot": "^1.3.5",
"gatsby-plugin-image": "^1.12.0",
Expand All @@ -34,6 +35,7 @@
"react-hubspot-form": "^1.3.7",
"react-icons": "^4.2.0",
"react-markdown": "^6.0.2",
"react-script-tag": "^1.1.2",
"react-showdown": "^2.3.1",
"sass": "^1.35.1"
},
Expand Down
2 changes: 1 addition & 1 deletion public/page-data/index/page-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"componentChunkName": "component---src-pages-index-js",
"path": "/",
"result": {"pageContext":{}},
"staticQueryHashes": ["1687125271","176670904","2751633039","2900147843","3549188850","3658105631","4179863467","882490824"]}
"staticQueryHashes": ["1128713364","1687125271","176670904","2751633039","2900147843","3549188850","4109181808","4179863467","882490824"]}
2 changes: 1 addition & 1 deletion public/render-page.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/BitwayPage/Gallery/Gallery.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react"
import "./Gallery.scss"
import { getImage, GatsbyImage } from "gatsby-plugin-image"
import { getImage } from "gatsby-plugin-image"
import { BgImage } from "gbimage-bridge"

const layouts = {
Expand Down
24 changes: 13 additions & 11 deletions src/components/BitwayPage/Paragraph/Paragraph.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
line-height: 30px;
letter-spacing: 0em;
text-align: left;
padding: 0 80px 20px;
// padding: 0 80px 20px;
& * {
font-size: 20px;
}
Expand Down Expand Up @@ -71,7 +71,6 @@
line-height: 26px;
letter-spacing: 0em;
text-align: left;

}
& > div > p {
font-family: $primary-font;
Expand All @@ -81,7 +80,7 @@
line-height: 26px;
letter-spacing: 0em;
text-align: left;
padding: 0 20px 0px 0px;
// padding: 0 20px 0px 0px;
& * {
font-size: 15px;
}
Expand All @@ -95,19 +94,22 @@
@media (min-width: $breakpoint-desktop) {
.bitway-paragraph {
& h1,
h2,
h3,
h4,
h5,
h6 {
font-size: $extra-large;
h2,
h3,
h4,
h5,
h6 {
font-size: $extra-large;
& span {
padding:15px 10px 5px;
padding: 15px 10px 5px;
& p {
font-size: $extra-large;
}
}
}

}
& > div > p {
padding: 0 80px 20px;
}
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
import React from "react"
import { getImage, GatsbyImage } from "gatsby-plugin-image"
import { Link } from "gatsby"
import MarkdownView from "react-showdown"
import showdown from "showdown"
import "./BlogArticle.scss"


const BlogArticle = ({ title, summary, image, slug, text }) => {
let converter = new showdown.Converter()
let html = converter.makeHtml(summary)

const ReplaceHtml = () => {
return { __html: html }
}

return (
<div className="article__container">
<div className="article__image">
<GatsbyImage image={getImage(image.localFile)} alt={title} />
</div>
<GatsbyImage
image={getImage(image.localFile)}
alt={title}
className="article__image"
/>
<div className="article__description">
<h3>{title}</h3>
<div>
<MarkdownView markdown={summary} />
<p dangerouslySetInnerHTML={ReplaceHtml()} />
</div>
<div className="article__link">
<Link to={slug}>{text}</Link>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../styles/global.scss";
@import "../../../styles/global.scss";
.article {
&__container {
display: flex;
Expand All @@ -9,18 +9,16 @@
}

&__image {
width: 290px;
margin: auto 0;

img {
height: 165px;
}
width: 100%;
height: 150px;
transition: opacity 3s ease-in;
}

&__description {
display: flex;
flex-direction: column;
width: 100%;
height: 150px;
padding: 0 15px;

h3 {
Expand Down Expand Up @@ -66,11 +64,7 @@

&__image {
width: 100%;

img {
width: 500px;
height: 300px;
}
height: 300px;
}

&__description {
Expand All @@ -84,7 +78,7 @@

p,
a {
font-size: 18px;
font-size: 16px;
line-height: 30px;
}
}
Expand Down
17 changes: 8 additions & 9 deletions src/components/BlogPage/BlogContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import React from "react"
import { useBanner, useBlog } from "../../hooks"

import Layout from "../../components/layout"
import BlogGrid from '../BlogGrid/BlogGrid'
import BlogArticle from '../BlogArticle/BlogArticle'
import BlogGrid from './BlogGrid/BlogGrid'
import BlogArticle from './BlogArticle/BlogArticle'

import { Seo, BannerActionCall } from "../index"

Expand All @@ -15,7 +15,6 @@ const Blog = () => {
const bannerData = useBanner()
const blogData = useBlog()
const data = blogData?.allStrapiBlogCategory?.nodes
console.log(data)

const bannerBlog = bannerData?.allStrapiBanners?.nodes.find(
banner => banner.page === "blog" && banner.type === "bgColor"
Expand All @@ -39,9 +38,11 @@ const Blog = () => {
)}
{data.length > 0 && (
<div className="blog__container">
<div className="banner__container">
<h3 dangerouslySetInnerHTML={{ __html: bannerBlog.summary }} />
</div>
{bannerBlog && (
<div className="banner__container">
<h3 dangerouslySetInnerHTML={{ __html: bannerBlog.summary }} />
</div>
)}
{data?.map((article, idx) => (
<BlogGrid key={idx} title={article.name}>
{article?.articles?.map((item, idx) => (
Expand All @@ -58,9 +59,7 @@ const Blog = () => {
))}
</div>
)}
{bannerActionCall && (
<BannerActionCall banner={bannerActionCall} />
)}
{bannerActionCall && <BannerActionCall banner={bannerActionCall} />}
</Layout>
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react'

import './BlogGrid.scss'
import Pagination from '../Pagination/Pagination'
import Pagination from '../../Pagination/Pagination'

const BlogGrid = ({title, children}) => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "../../styles/global.scss";
@import "../../../styles/global.scss";
.grid {
&__container {
display: flex;
Expand Down
4 changes: 2 additions & 2 deletions src/components/ContactPage/ContactContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const Contact = () => {


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
const { formId, portalId } = contactData?.allStrapiContactPage?.nodes[0]?.contactForm || {}
const { pageTitle, pageDescription, pageKeywords } = contactData?.allStrapiContactPage?.nodes[0]?.pageMetadata || {}

const contactImage = getImage(image?.localFile)

Expand Down
3 changes: 1 addition & 2 deletions src/components/EdTechCards/EdtechCards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;

/* margin-right: 20px; */
padding-left: 10px;
}
&__title {
font-size: $medium;
Expand Down
18 changes: 11 additions & 7 deletions src/components/HomePage/HomeContainer/HomeContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,21 @@ const Home = () => {
const data = useHomePage()

const homeSections = data?.allStrapiHome?.nodes[0]?.sections
const { pageTitle, pageDescription, pageKeywords } = data?.allStrapiHome?.nodes[0].pageMetadata
const { pageTitle, pageDescription, pageKeywords } = data?.allStrapiHome?.nodes[0]?.pageMetadata || {}


return (
<Layout>
<Seo
title={pageTitle}
description={pageDescription}
keywords={pageKeywords}
/>
<CustomSection sections={homeSections} />
{data?.allStrapiHome?.nodes[0]?.pageMetadata && (
<Seo
title={pageTitle}
description={pageDescription}
keywords={pageKeywords}
/>
)}
{homeSections && (
<CustomSection sections={homeSections} />
)}
</Layout>
)
}
Expand Down
3 changes: 1 addition & 2 deletions src/components/Seo/Seo.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ function Seo({ description, lang, meta, title, keywords }) {
author,
robots,
siteMetadata: { siteDesc, siteKeywords, siteTitle },
siteURL,
} = data.allStrapiGlobalSeo.nodes[0]
} = data?.allStrapiGlobalSeo?.nodes[0]

const metaDescription = description ? description : siteDesc
const defaultTitle = siteTitle
Expand Down
6 changes: 5 additions & 1 deletion src/components/ServiceCards/ServiceCards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
margin-bottom: 10px;
}
&__intro {
font-size: $medium;
font-size: $small;
font-weight: $normal;
text-align: center;
}
Expand Down Expand Up @@ -93,5 +93,9 @@
font-size: $extra-large;
}
}

&__intro {
font-size: $medium;
}
}
}
19 changes: 18 additions & 1 deletion src/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,31 @@ import * as React from "react"
import Header from "./header"
import "./layout.scss"
import Footer from "./Footer/Footer"
import ScriptTag from "react-script-tag"
import useGlobalConfig from "../hooks/useGlobalConfig"

const Layout = ({ children }) => {
const config = useGlobalConfig()
const scripts = config?.allStrapiGlobalConfig?.nodes.map(item =>
item?.script?.map(script =>
script.enable === true ? (
<ScriptTag
key={script.name}
type="text/javascript"
src={script.src}
id={script.name}
async
defer
/>
) : null
)
)
return (
<>
{scripts}
<Header />

<main>{children}</main>

<Footer />
{/*© {new Date().getFullYear()}, Built with*/}
</>
Expand Down
Loading