diff --git a/docs/src/components/HomepagePrimaryFeatures/index.js b/docs/src/components/HomepagePrimaryFeatures/index.js index b06decfb7c..e139ae3588 100644 --- a/docs/src/components/HomepagePrimaryFeatures/index.js +++ b/docs/src/components/HomepagePrimaryFeatures/index.js @@ -1,37 +1,34 @@ -import styles from "../HomepagePrimaryFeatures/styles.module.css"; -import clsx from "clsx"; - export default function HomepagePrimaryFeatures() { return ( -
+
-
-
-
-

Installation

-

Set up Jan with our guide to install across multiple platform.

+
+
+
+

Installation

+

Set up Jan with our guide to install across multiple platforms.

-
- Get Started + -
- {"Card +
+ {"Card
-
-
-

Models

-

Explore the available pre-configured AI models.

+
+
+

Models

+

Explore the available pre-configured AI models.

-
- Support + -
- {"Card +
+ {"Card
); -} \ No newline at end of file +} diff --git a/docs/src/components/HomepagePrimaryFeatures/styles.module.css b/docs/src/components/HomepagePrimaryFeatures/styles.module.css deleted file mode 100644 index 63fb3a1e17..0000000000 --- a/docs/src/components/HomepagePrimaryFeatures/styles.module.css +++ /dev/null @@ -1,77 +0,0 @@ -.features { - display: flex; - align-items: center; - padding: 5rem 0; - width: 100%; -} - -.cards { - display: flex; - flex-wrap: wrap; - gap: 4rem; -} - -@media screen and (max-width: 768px) { - .cards { - gap: 2rem; - } -} - -.card { - min-width: 250px; - min-height: 275px; - max-height: 325px; - flex: 1; - border-radius: 15px; - padding: 2rem 1.5rem; - position: relative; - display: flex; - flex-direction: column; - justify-content: space-between; -} - -.card p { - font-size: 1.25rem; -} - -.cardImage { - position: absolute; - right: 1rem; - bottom: 1rem; -} - -.cardImage img { - height: 100px; -} - -@media screen and (max-width: 1024px) { - .cardImage { - display: none; - } -} - -.cardBluish { - background: linear-gradient(90deg, rgba(238,238,238,1) 0%, rgba(185,202,237,1) 100%); -} - -.cardPinkish { - background: linear-gradient(90deg, rgba(238,238,238,1) 0%, rgba(215,194,238,1) 100%); -} - -.card h3 { - font-size: 1.5rem; - font-weight: 600; - padding-top: 1rem; -} - -.card a { - all: unset; - color: white; - background-color: #1C1E21; - padding: 0.75rem 1.25rem; - border-radius: 6px; -} - -.card a:hover { - cursor: pointer; -} \ No newline at end of file diff --git a/docs/src/components/HomepageSecondaryFeatures/index.js b/docs/src/components/HomepageSecondaryFeatures/index.js index 3d58117afc..9c8307c3f9 100644 --- a/docs/src/components/HomepageSecondaryFeatures/index.js +++ b/docs/src/components/HomepageSecondaryFeatures/index.js @@ -1,67 +1,51 @@ -import styles from "../HomepageSecondaryFeatures/styles.module.css"; -import clsx from "clsx"; +import React from "react"; export default function HomepageSecondaryFeatures() { return ( -
+
-
-
-
-
- {"Feature -
-
-

Quickstart

-

Jump right in with our Quickstart guide, designed to get you going with simple steps and clear instructions for a smooth setup.

-
-
- -
-
-
-
- {"Feature -
-
-

Integrations

-

Discover how Jan seamlessly integrates with 9 different system, streamlining your application for maximum efficiency.

-
-
- -
-
-
-
- {"Feature -
-
-

Error Codes

-

Navigate through common error codes with explanations and solutions to resolve them quickly.

-
-
- -
+
+ + +
); -} \ No newline at end of file +} + +function FeatureCard({ imgSrc, title, description, href }) { + return ( +
+
+
+ {"Feature +
+
+

{title}

+

{description}

+
+
+
+ + Learn Here + +
+
+ ); +} diff --git a/docs/src/components/HomepageSecondaryFeatures/styles.module.css b/docs/src/components/HomepageSecondaryFeatures/styles.module.css deleted file mode 100644 index 1d0710ee73..0000000000 --- a/docs/src/components/HomepageSecondaryFeatures/styles.module.css +++ /dev/null @@ -1,87 +0,0 @@ -.features { - padding-top: 2rem; - display: flex; - align-items: center; - width: 100%; -} - -.cards { - display: flex; - flex-wrap: wrap; - justify-content: center; /* Center align the cards */ - gap: 2rem; -} - -.card { - background-color: #ECECEF; - width: calc(33.33% - 2rem); /* Adjust width for responsiveness */ - border-radius: 15px; - position: relative; - display: flex; - flex-direction: column; - justify-content: space-between; - margin-bottom: 2rem; /* Add margin between cards */ - padding: 1rem; /* Add padding to cards */ -} - -@media screen and (max-width: 768px) { - .card { - width: calc(50% - 2rem); /* Adjust width for smaller screens */ - } -} - -@media screen and (max-width: 576px) { - .card { - width: calc(100% - 2rem); /* Adjust width for mobile screens */ - } -} - -.cardContent { - margin-top: 3rem; - padding: 2rem; -} - -.cardLogo { - height: 130px; - width: 100%; -} - -.cardFooter { - padding-left: 2rem; - padding-right: 2rem; - padding-bottom: 2rem; - padding-top: 0; -} - -.cardLogo img { - object-fit: cover; -} - -.card p { - font-size: 1rem; - padding-top: 1rem; -} - -.card h3 { - font-size: 1.25rem; - font-weight: 600; -} - -.card a { - all: unset; - color: white; - background-color: #1C1E21; - padding: 0.75rem 1.25rem; - border-radius: 6px; -} - -.card a svg { - padding-top: 12px; - height: 1.5rem; - width: 1.5rem; - color: white; -} - -.card a:hover { - cursor: pointer; -} diff --git a/docs/src/components/HomepageTerinaryFeatures/index.js b/docs/src/components/HomepageTerinaryFeatures/index.js index e3003cbd9c..025bab0ca1 100644 --- a/docs/src/components/HomepageTerinaryFeatures/index.js +++ b/docs/src/components/HomepageTerinaryFeatures/index.js @@ -1,109 +1,106 @@ -import styles from "../HomepageTerinaryFeatures/styles.module.css"; -import clsx from "clsx"; - export default function HomepageTerinaryFeatures() { return ( -
+
-
-
-
+
+
+
{"Icon"} -

Get Started

+

Get Started

- -
-
+
+
{"Icon"} -

Settings

+
Settings
- -
-
+
+
{"Icon"} -

Features

+
Features
- -
-
+
+
{"Icon"} -

Troubleshooting

+
Troubleshooting
-
-

Find solutions to common issues, including error codes, and FAQs.

-
); -} \ No newline at end of file +} diff --git a/docs/src/components/HomepageTerinaryFeatures/styles.module.css b/docs/src/components/HomepageTerinaryFeatures/styles.module.css deleted file mode 100644 index be47332e0e..0000000000 --- a/docs/src/components/HomepageTerinaryFeatures/styles.module.css +++ /dev/null @@ -1,68 +0,0 @@ -.features { - padding-top: 5rem; - padding-bottom: 5rem; - display: flex; - align-items: center; - width: 100%; -} - -.cards { - display: flex; - justify-content: center; - flex-wrap: wrap; - gap: 2rem; -} - -@media screen and (max-width: 768px) { - .cards { - gap: 2rem; - } -} - -.card { - background-color: #ECECEF; - width: 275px; - border-radius: 15px; - position: relative; - display: flex; - flex-direction: column; - /* justify-content: space-between; */ - padding: 2rem; -} - -.cardContent { - margin-top: 1rem; - justify-content: start; -} - -.cardContent li { - font-weight: 600; - list-style: circle; - margin: 1rem; - padding: 0; -} - -.cardContent li::marker { - color: #2563EB; -} - -.cardHeader { - display: flex; - align-content: center; - gap: 1rem; -} - -.cardHeader img { - /*width: 40px;*/ - height: 40px; -} - -.card p { - font-size: 1rem; - margin-bottom: 1rem; -} - -.card h3 { - font-size: 1.2rem; - font-weight: 600; -} diff --git a/docs/src/pages/docs.js b/docs/src/pages/docs.js index a46f98e472..934d9471fe 100644 --- a/docs/src/pages/docs.js +++ b/docs/src/pages/docs.js @@ -1,22 +1,22 @@ -import clsx from 'clsx' -import useDocusaurusContext from '@docusaurus/useDocusaurusContext' -import Layout from '@theme/Layout' -import Heading from '@theme/Heading' +import React from 'react'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import Layout from '@theme/Layout'; +import Heading from '@theme/Heading'; +import { DocSearch } from '@docsearch/react'; +import HomepagePrimaryFeatures from '../components/HomepagePrimaryFeatures'; +import HomepageSecondaryFeatures from '../components/HomepageSecondaryFeatures'; +import HomepageTerinaryFeatures from '../components/HomepageTerinaryFeatures'; + import styles from './docs.module.css' -import HomepagePrimaryFeatures from '../components/HomepagePrimaryFeatures' -import HomepageSecondaryFeatures from '../components/HomepageSecondaryFeatures' -import HomepageTerinaryFeatures from '../components/HomepageTerinaryFeatures' -import { DocSearch } from '@docsearch/react' -import NavbarExtended from '../theme/NavbarExtension' function HomepageHeader() { - const { siteConfig } = useDocusaurusContext() + const { siteConfig } = useDocusaurusContext(); return ( -
- -
- +
+
+
+ Hello, how can we help?
@@ -28,30 +28,30 @@ function HomepageHeader() { insight={true} />
-

- Open-source ChatGPT alternative that runs 100% offline on your - computer. + +

+ Open-source ChatGPT alternative that runs 100% offline on your computer.

- ) + ); } export default function Home() { - const { siteConfig } = useDocusaurusContext() + const { siteConfig } = useDocusaurusContext(); return ( -
+
-
+
- ) + ); } diff --git a/docs/src/pages/docs.module.css b/docs/src/pages/docs.module.css index 590c5a18b6..009ff29309 100644 --- a/docs/src/pages/docs.module.css +++ b/docs/src/pages/docs.module.css @@ -1,47 +1,3 @@ -/** - * CSS files with the .module.css suffix will be treated as CSS modules - * and scoped locally. - */ - -.heroBanner { - padding: 4rem 0; - text-align: center; - position: relative; - overflow: hidden; -} - -@media screen and (max-width: 996px) { - .heroBanner { - padding: 2rem; - } -} - -@media screen and (max-width: 1400px) { - .homeBg { - background-size: auto 600px !important; - } -} - -.homeBg { - background-image: url('/img/homepage-new/bg.png') !important; - background-size: contain; - background-repeat: no-repeat; -} - -.heroTitle { - font-size: 3rem; - font-weight: 600; - color: white; - margin-top: 4rem; - margin-bottom: 3rem; -} - -@media screen and (max-width: 1024px) { - .heroTitle { - font-size: 2rem; - } -} - .searchBar { background-color: white; max-width: 580px; @@ -88,8 +44,3 @@ padding: 0px 5px; margin: 0px 10px; } - -.heroSubtitle { - font-size: 1.25rem; - color: white; -} diff --git a/docs/src/theme/Layout/index.js b/docs/src/theme/Layout/index.js index 2557d2c9f0..a0286812a4 100644 --- a/docs/src/theme/Layout/index.js +++ b/docs/src/theme/Layout/index.js @@ -14,6 +14,11 @@ import Footer from "@site/src/containers/Footer"; import LayoutProvider from "@theme/Layout/Provider"; import ErrorPageContent from "@theme/ErrorPageContent"; import styles from "./styles.module.scss"; +import NavBarExtension from "../NavbarExtension"; +import { useLocation } from "react-router-dom"; + +const allowedPaths = ["/docs/", "/developer/", "/api-reference/", "/guides/", "/guides", "/docs", "/developer", "/api-reference", "/guides/changelog"]; + export default function Layout(props) { const { children, @@ -24,6 +29,10 @@ export default function Layout(props) { description, } = props; useKeyboardNavigation(); + + const location = useLocation(); + + const isAllowedPath = allowedPaths.includes(location.pathname); return ( @@ -32,14 +41,20 @@ export default function Layout(props) { - + + + {isAllowedPath ? : ""} + + {/* {console.log("Is allowed path?", location.pathname)} */} +
}> diff --git a/docs/src/theme/NavbarExtension/NavPageContainer.jsx b/docs/src/theme/NavbarExtension/NavPageContainer.jsx deleted file mode 100644 index 0c292c5a4c..0000000000 --- a/docs/src/theme/NavbarExtension/NavPageContainer.jsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from "react"; -import Link from '@docusaurus/Link'; -import css from "./NavPageContainer.module.css"; - -export default function NavPageContainer() { - return ( -
- - Guide - - - Developer - - - API Reference - -
- ); -} \ No newline at end of file diff --git a/docs/src/theme/NavbarExtension/NavPageContainer.module.css b/docs/src/theme/NavbarExtension/NavPageContainer.module.css deleted file mode 100644 index 9a5f14a1be..0000000000 --- a/docs/src/theme/NavbarExtension/NavPageContainer.module.css +++ /dev/null @@ -1,14 +0,0 @@ -.NavPageContainer { - margin-right: auto; - display: flex; - align-items: right; - } - - .NavPageItem { - margin: 0 30px; - font-size: 16px; - font-weight: normal; - color: #262a2f; - cursor: pointer; - text-decoration: none; - } \ No newline at end of file diff --git a/docs/src/theme/NavbarExtension/index.js b/docs/src/theme/NavbarExtension/index.js index 8854828394..29e49f812b 100644 --- a/docs/src/theme/NavbarExtension/index.js +++ b/docs/src/theme/NavbarExtension/index.js @@ -1,13 +1,48 @@ import React from "react"; -import css from "./index.module.css"; -import NavPageContainer from "./NavPageContainer"; +import { NavLink, useLocation } from "react-router-dom"; +export default function NavBarExtension() { + const location = useLocation(); - -export default function NavBar() { return ( -
- -
+ ); -} \ No newline at end of file +} diff --git a/docs/src/theme/NavbarExtension/index.module.css b/docs/src/theme/NavbarExtension/index.module.css deleted file mode 100644 index 4811f0fa53..0000000000 --- a/docs/src/theme/NavbarExtension/index.module.css +++ /dev/null @@ -1,19 +0,0 @@ -.NavBar { - height: 3rem; /* Adjust height as needed */ - background-color: #fff; - padding: 0.5rem 0.8rem; /* Adjust padding as needed */ - display: flex; - align-items: center; - justify-content: space-between; /* Align items to the start and end of the container */ - position: fixed; /* Fixed position to keep it on top */ - top: 55px; /* Position it at the top */ - left: 0; /* Position it at the left */ - width: 100%; /* Occupy full width of the viewport */ - z-index: 5; /* Ensure it's above other elements */ -} - -@media screen and (max-width: 768px) { - .NavBar { - display: none; /* Hide the NavBar on mobile devices */ - } -} diff --git a/docs/tailwind.config.js b/docs/tailwind.config.js index 7ef39234d8..a79121d56d 100644 --- a/docs/tailwind.config.js +++ b/docs/tailwind.config.js @@ -57,7 +57,11 @@ module.exports = { "sans-serif", ], }, - extend: {}, + extend: { + backgroundImage: { + 'custom-img': "url('/img/homepage-new/bg.png')", + } + }, }, plugins: [require("tailwindcss-animate")], };