Skip to content
Merged
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
21 changes: 21 additions & 0 deletions docs/src/css/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,33 @@
box-sizing: border-box;
}

a {
color: inherit;
display: inline-block;
}

h1,
h2,
h3 {
line-height: 1.25;
font-weight: 500;
}

.container {
width: 100%;
margin-inline: auto;
padding-inline: 12px;
}

.landing-page-container {
margin: 0;
padding: 0;
color: #ffffff;
background-color: #121212;
font-family: "Chivo", sans-serif;
line-height: 1.5;
}

@media (min-width: 576px) {
.container {
max-width: 540px;
Expand Down
33 changes: 0 additions & 33 deletions docs/src/css/styles.css

This file was deleted.

41 changes: 5 additions & 36 deletions docs/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import Layout from "@theme/Layout";
import { useLocation } from "react-router-dom";
// There should be a line here that says
// import React from "react";
// VSCode might try to delete it, but that will break the site.
import { useEffect, useState } from "react";
import { useState } from "react";
import baseStyles from '../css/style.module.css';
import "../css/styles.css";

function HomepageHeader() {
const { siteConfig } = useDocusaurusContext();
const [isActive, setIsActive] = useState(false);
const toggleMenu = () => {
setIsActive((prevState) => !prevState);
Expand Down Expand Up @@ -40,26 +32,6 @@ function HomepageHeader() {
}

export default function Home(): JSX.Element {
const { siteConfig } = useDocusaurusContext();

const location = useLocation();
const isBasePath = location.pathname === "/python-sdk/";

useEffect(() => {
// Add or remove the class on the <body> tag
const mainWrapper = document.querySelector('#__docusaurus')

if (isBasePath) {
mainWrapper.classList.add("remove-default-components", "landing-page-container", "custom-head", "custom-a", "custom-img");
} else {
mainWrapper.classList.remove("remove-default-components", "landing-page-container", "custom-head", "custom-a", "custom-img");
}

// Cleanup on component unmount
return () => {
mainWrapper.classList.remove("remove-default-components", "landing-page-container", "custom-head", "custom-a", "custom-img");
};
}, [isBasePath]);

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

return (
<Layout
title={`${siteConfig.title}`}
description="Computer Vision powered by Natural Language"
>
<div className={baseStyles["landing-page-container"]}>
<HomepageHeader />
<main>
<section className={baseStyles.bannersection}>
Expand All @@ -94,7 +63,7 @@ print(image_query)`;
computer vision application. Groundlight’s fully managed computer vision solution takes care of the ML so
you can focus on building.</p>
<div className={baseStyles.buttonwrapper}>
<a href="https://dashboard.groundlight.ai" className={baseStyles.cmnButton}>Start building</a>
<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>
<a href="/python-sdk/docs/getting-started" className={`${baseStyles.cmnButton} ${baseStyles.outline}`}>See the docs</a>
</div>
</div>
Expand Down Expand Up @@ -286,10 +255,10 @@ print(image_query)`;
</ul>
</div>
</div>
<div className={baseStyles.copyright}>Copyright © {new Date().getFullYear()} Groundlight AI.</div>
<div className={baseStyles.copyright}>Copyright © {new Date().getFullYear()} Groundlight AI.</div>
</div>
</footer>
</main>
</Layout>
</div>
);
}
Loading