diff --git a/docs/src/css/style.module.css b/docs/src/css/style.module.css index e59a8a20..f0e12180 100644 --- a/docs/src/css/style.module.css +++ b/docs/src/css/style.module.css @@ -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; diff --git a/docs/src/css/styles.css b/docs/src/css/styles.css deleted file mode 100644 index 36272b9c..00000000 --- a/docs/src/css/styles.css +++ /dev/null @@ -1,33 +0,0 @@ -.remove-default-components nav.navbar.navbar--fixed-top { - display: none !important; -} - -.remove-default-components .footer.footer--dark { - display: none !important; -} - -.landing-page-container { - margin: 0; - padding: 0; - color: #ffffff; - background-color: #121212; - font-family: "Chivo", sans-serif; - line-height: 1.5; -} - -.custom-a a { - color: inherit; - display: inline-block; -} - -.custom-head h1, -.custom-head h2, -.custom-head h3 { - line-height: 1.25; - font-weight: 500; -} - -/* .custom-img img { - vertical-align: middle; - width: 100%; -} */ diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx index 1e5585c9..b4d08374 100644 --- a/docs/src/pages/index.tsx +++ b/docs/src/pages/index.tsx @@ -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); @@ -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
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 @@ -79,10 +51,7 @@ print(image_query)`; const codeLines = code.split("\n"); return ( -