Skip to content

Commit 49639d4

Browse files
waldron258Tyler Romero
andauthored
[COM-1208] Update the code.groundlight.ai landing page (#292)
This PR contains the following changes: - Landing page first render bugfix - Code cleanup - Button text "Start building" -> "Try It Free" - "Try It Free" button now links to the signup page - API "Learn more" button now links to https://code.groundlight.ai/python-sdk/api-reference-docs/ - The "contact us" button under Support now links to mailto:support@groundlight.ai --------- Co-authored-by: Tyler Romero <tyler@groundlight.ai>
1 parent 302edad commit 49639d4

File tree

3 files changed

+26
-69
lines changed

3 files changed

+26
-69
lines changed

docs/src/css/style.module.css

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,33 @@
33
box-sizing: border-box;
44
}
55

6+
a {
7+
color: inherit;
8+
display: inline-block;
9+
}
10+
11+
h1,
12+
h2,
13+
h3 {
14+
line-height: 1.25;
15+
font-weight: 500;
16+
}
17+
618
.container {
719
width: 100%;
820
margin-inline: auto;
921
padding-inline: 12px;
1022
}
1123

24+
.landing-page-container {
25+
margin: 0;
26+
padding: 0;
27+
color: #ffffff;
28+
background-color: #121212;
29+
font-family: "Chivo", sans-serif;
30+
line-height: 1.5;
31+
}
32+
1233
@media (min-width: 576px) {
1334
.container {
1435
max-width: 540px;

docs/src/css/styles.css

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/src/pages/index.tsx

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
1-
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
2-
import Layout from "@theme/Layout";
3-
import { useLocation } from "react-router-dom";
4-
// There should be a line here that says
5-
// import React from "react";
6-
// VSCode might try to delete it, but that will break the site.
7-
import { useEffect, useState } from "react";
1+
import { useState } from "react";
82
import baseStyles from '../css/style.module.css';
9-
import "../css/styles.css";
103

114
function HomepageHeader() {
12-
const { siteConfig } = useDocusaurusContext();
135
const [isActive, setIsActive] = useState(false);
146
const toggleMenu = () => {
157
setIsActive((prevState) => !prevState);
@@ -40,26 +32,6 @@ function HomepageHeader() {
4032
}
4133

4234
export default function Home(): JSX.Element {
43-
const { siteConfig } = useDocusaurusContext();
44-
45-
const location = useLocation();
46-
const isBasePath = location.pathname === "/python-sdk/";
47-
48-
useEffect(() => {
49-
// Add or remove the class on the <body> tag
50-
const mainWrapper = document.querySelector('#__docusaurus')
51-
52-
if (isBasePath) {
53-
mainWrapper.classList.add("remove-default-components", "landing-page-container", "custom-head", "custom-a", "custom-img");
54-
} else {
55-
mainWrapper.classList.remove("remove-default-components", "landing-page-container", "custom-head", "custom-a", "custom-img");
56-
}
57-
58-
// Cleanup on component unmount
59-
return () => {
60-
mainWrapper.classList.remove("remove-default-components", "landing-page-container", "custom-head", "custom-a", "custom-img");
61-
};
62-
}, [isBasePath]);
6335

6436
const code = `import groundlight
6537
from framegrab import FrameGrabber
@@ -79,10 +51,7 @@ print(image_query)`;
7951
const codeLines = code.split("\n");
8052

8153
return (
82-
<Layout
83-
title={`${siteConfig.title}`}
84-
description="Computer Vision powered by Natural Language"
85-
>
54+
<div className={baseStyles["landing-page-container"]}>
8655
<HomepageHeader />
8756
<main>
8857
<section className={baseStyles.bannersection}>
@@ -94,7 +63,7 @@ print(image_query)`;
9463
computer vision application. Groundlight’s fully managed computer vision solution takes care of the ML so
9564
you can focus on building.</p>
9665
<div className={baseStyles.buttonwrapper}>
97-
<a href="https://dashboard.groundlight.ai" className={baseStyles.cmnButton}>Start building</a>
66+
<a href="https://login.groundlight.ai/oauth2/register?tenantId=aad3d06b-ef57-454e-b952-91e9d3d347b1&client_id=ac8aac5d-c278-4c14-a549-e039f5ac54bb&nonce=&redirect_uri=https%3A%2F%2Fdashboard.groundlight.ai%2Fdevice-api%2Fauthz%2Fcallback&response_type=code&scope=openid%20profile%20email%20offline_access" className={baseStyles.cmnButton}>Start building</a>
9867
<a href="/python-sdk/docs/getting-started" className={`${baseStyles.cmnButton} ${baseStyles.outline}`}>See the docs</a>
9968
</div>
10069
</div>
@@ -286,10 +255,10 @@ print(image_query)`;
286255
</ul>
287256
</div>
288257
</div>
289-
<div className={baseStyles.copyright}>Copyright © {new Date().getFullYear()} Groundlight AI.</div>
258+
<div className={baseStyles.copyright}>Copyright © {new Date().getFullYear()} Groundlight AI.</div>
290259
</div>
291260
</footer>
292261
</main>
293-
</Layout>
262+
</div>
294263
);
295264
}

0 commit comments

Comments
 (0)