diff --git a/docs/src/components/Elements/dropdown.js b/docs/src/components/Elements/dropdown.js index 6d9bd0697..285741c36 100644 --- a/docs/src/components/Elements/dropdown.js +++ b/docs/src/components/Elements/dropdown.js @@ -3,7 +3,7 @@ import { Fragment } from "react"; import { Menu, Transition } from "@headlessui/react"; import { ChevronDownIcon } from "@heroicons/react/20/solid"; -const items = [ +const systems = [ { name: "Download for Mac (M1/M2)", href: "https://github.com/janhq/jan/releases/download/v0.1.2/Jan-0.1.2-arm64.dmg", @@ -31,19 +31,32 @@ function classNames(...classes) { } export default function Dropdown() { + const uAgent = window.navigator.userAgent; + let defaultSystem; + + if (uAgent.indexOf("Win") !== -1) { + defaultSystem = systems[2]; + } else if (uAgent.indexOf("Mac") !== -1) { + // Note: There's no way to detect ARM architecture from browser. Hardcoding to M1/M2 for now. + defaultSystem = systems[0]; + } else if (uAgent.indexOf("Linux") !== -1) { + defaultSystem = systems[3]; + } else { + defaultSystem = systems[0]; + } + return (
- {/* TODO dynamically detect users OS through browser */} Logo - Download for Mac (Silicon) + {defaultSystem.name} @@ -61,11 +74,11 @@ export default function Dropdown() { >
- {items.map((item) => ( - + {systems.map((system) => ( + {({ active }) => ( Logo - {item.name} + {system.name} )} diff --git a/docs/src/components/Homepage/downloads.js b/docs/src/components/Homepage/downloads.js index 01dd6665a..f14ebf8f6 100644 --- a/docs/src/components/Homepage/downloads.js +++ b/docs/src/components/Homepage/downloads.js @@ -5,7 +5,7 @@ import { LockClosedIcon, } from "@heroicons/react/20/solid"; -const features = [ +const systems = [ { name: "Mac", description: @@ -47,20 +47,20 @@ export default function HomepageDownloads() {
- {features.map((feature) => ( -
+ {systems.map((system) => ( +
-
-

{feature.description}

+

{system.description}

Learn more diff --git a/docs/src/components/Homepage/hero.js b/docs/src/components/Homepage/hero.js index f6cdf58e3..a9a56f6fe 100644 --- a/docs/src/components/Homepage/hero.js +++ b/docs/src/components/Homepage/hero.js @@ -8,7 +8,7 @@ export default function HomepageHero() { return (

-
+
{/* Background top gradient styling */} {colorMode === "dark" ? (
+
{/* Hero text and buttons */}
@@ -47,7 +47,7 @@ export default function HomepageHero() { Run your own AI

- Jan lets you run AI on your own hardware. 1-click to install the + Jan lets you run AI on your own hardware. 1-click to install the latest open-source models. Monitor and manage software-hardware performance.

@@ -79,14 +79,15 @@ export default function HomepageHero() { src={ colorMode === "dark" ? // TODO replace with darkmode image - require("@site/static/img/desktop-llm-chat-dark.png").default - : require("@site/static/img/desktop-llm-chat-light.png").default + require("@site/static/img/desktop-llm-chat-dark.png") + .default + : require("@site/static/img/desktop-llm-chat-light.png") + .default } alt="App screenshot" width={2432} className="mt-16 rounded-lg md:rounded-2xl lg:rounded-3xl bg-white/5 shadow-2xl ring-1 ring-white/10 sm:mt-24" /> -

{/* Background top gradient styling */}