From 33f2fd8e0a9178b9d44aeb11e22cecaaa517d415 Mon Sep 17 00:00:00 2001 From: Santhoshkumar <117272529+Santhosh-testsigma@users.noreply.github.com> Date: Mon, 11 Sep 2023 14:35:43 +0530 Subject: [PATCH 1/4] feat: Added CTA's on Tutorials site --- src/components/Footer.jsx | 8 ++- src/components/Footer.scss | 21 +++++-- src/components/LeftNav.scss | 2 +- src/components/header.jsx | 60 ++++++++++++++++++++ src/components/navcards.jsx | 4 +- src/pages/tutorials/index.jsx | 42 +------------- src/templates/page.jsx | 100 +++++++++++----------------------- src/templates/page.scss | 8 ++- 8 files changed, 127 insertions(+), 118 deletions(-) create mode 100644 src/components/header.jsx diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index 2670890..f0bacb3 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -10,7 +10,13 @@ const Footer = ()=> { return ( <> - + {/* */} +
+
+

Learn how to execute low code tests across 3000+ device / browser environments.

+ Schedule a free demo +
+
{ + + + const isHomepage = window.location.pathname == '/tutorials/'; + + return ( +
+
+ + + + + + + + + +
+ + ); +}; + +export default Header; \ No newline at end of file diff --git a/src/components/navcards.jsx b/src/components/navcards.jsx index 0809028..e5dcdc4 100644 --- a/src/components/navcards.jsx +++ b/src/components/navcards.jsx @@ -50,7 +50,7 @@ const data = [ const Card = ({ title, description, path }) => { return ( - +
{title}
{description} @@ -68,7 +68,7 @@ const Card = ({ title, description, path }) => { const CardList = () => { return ( -
+
{data.map((item) => ( ))} diff --git a/src/pages/tutorials/index.jsx b/src/pages/tutorials/index.jsx index 0c5d3e4..737db6a 100644 --- a/src/pages/tutorials/index.jsx +++ b/src/pages/tutorials/index.jsx @@ -10,6 +10,7 @@ import SearchInputBox from "../../components/SearchInputBox"; import MobileView from "../../components/MobileView"; import CardList from "../../components/navcards"; +import Header from '../../components/header'; const IndexContent = () => { return ( @@ -62,46 +63,7 @@ const Index = () => { social_share_desc={`Learn more about testsigma products and full guide to test automation journey from this Testsigma learning tutorials.`} social_share_image={`http://localhost/testsigma-docs/src/components/images/bg-banner.svg`} /> -
- -
+

{/**/}
diff --git a/src/templates/page.jsx b/src/templates/page.jsx index 8bb6012..d7a0dbf 100644 --- a/src/templates/page.jsx +++ b/src/templates/page.jsx @@ -1,5 +1,5 @@ /* eslint-disable react/no-danger */ -import React from 'react'; +import React from 'react'; import { graphql } from 'gatsby'; import Layout from '../components/layout'; import LeftNav from "../components/LeftNav"; @@ -8,11 +8,12 @@ import './page.scss'; import SideBar from "../components/SideBar"; import EditDoc from "../components/EditButton"; import SEO from "../components/seo"; -import {Link} from "../../.cache/gatsby-browser-entry"; +import { Link } from "../../.cache/gatsby-browser-entry"; import SearchInputBox from "../components/SearchInputBox"; import MobileView from "../components/MobileView"; import Footer from "../components/Footer" -import {environment} from "../environment"; +import { environment } from "../environment"; +import Header from '../components/header'; export default ({ data, pageContext }) => { @@ -36,7 +37,7 @@ export default ({ data, pageContext }) => { contextualLinks = ; } - if(environment.isStaging()) { + if (environment.isStaging()) { post.frontmatter.noindex = true; } @@ -53,47 +54,8 @@ export default ({ data, pageContext }) => { social_share_image={post.frontmatter.social_share_image} noindex={post.frontmatter.noindex} /> -
- -
-
+
+
{/**/}
@@ -112,7 +74,7 @@ export default ({ data, pageContext }) => {
diff --git a/src/templates/page.scss b/src/templates/page.scss index a3b6f5e..2aaf599 100644 --- a/src/templates/page.scss +++ b/src/templates/page.scss @@ -567,7 +567,7 @@ code[class*="language-"] { .homepage_footer{ flex-basis: 100%; justify-content: space-between; - margin-bottom: 4rem; + margin: 2rem 0 4rem; .pagination_buttons{ @media (min-width: $screen_768) { margin: 0; @@ -592,4 +592,24 @@ code[class*="language-"] { background-size: cover; background-position: center; } +} +.float-cta{ + @apply px-4 py-8 flex justify-center flex-col; + background-color: #EFEFEF; + width: 95%; + margin: 3rem 0 0; + .cta-title{ + margin: 0 !important; + font-size: 24px !important; + line-height: 36px !important; + text-align: center; + } + .signup-btn{ + margin: 1rem 0 0; + @apply flex justify-center; + } +} + +.fixed{ + display: none; } \ No newline at end of file From aa2d8a08ffb7da5f920515c816538cd74819e85c Mon Sep 17 00:00:00 2001 From: Santhoshkumar <117272529+Santhosh-testsigma@users.noreply.github.com> Date: Mon, 11 Sep 2023 14:52:51 +0530 Subject: [PATCH 3/4] fix; build error --- src/components/header.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/header.jsx b/src/components/header.jsx index 80e0bda..57c4334 100644 --- a/src/components/header.jsx +++ b/src/components/header.jsx @@ -3,7 +3,7 @@ import SearchInputBox from './SearchInputBox'; const Header = () => { - + var window; const isHomepage = window.location.pathname == '/tutorials/'; return ( From 8a93748451d6a10583ede70c5b3e1944b7255157 Mon Sep 17 00:00:00 2001 From: Santhoshkumar <117272529+Santhosh-testsigma@users.noreply.github.com> Date: Mon, 11 Sep 2023 15:02:53 +0530 Subject: [PATCH 4/4] build error fix --- src/components/header.jsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/header.jsx b/src/components/header.jsx index 57c4334..6edaa79 100644 --- a/src/components/header.jsx +++ b/src/components/header.jsx @@ -1,11 +1,13 @@ -import React, { useEffect } from 'react'; +import React, { useEffect, useState } from 'react'; import SearchInputBox from './SearchInputBox'; const Header = () => { - var window; - const isHomepage = window.location.pathname == '/tutorials/'; + const [isHomepage, setIsHomepage] = useState(false); + useEffect(() => { + setIsHomepage(window.location.pathname === '/tutorials/'); + }, []); return (