From a03abf0fc7f08d466e5c4aa648d0e80fd8c9f452 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Mon, 11 Dec 2023 13:19:57 +0700 Subject: [PATCH] fix: cleanup unused image and convert to webp --- docs/docs/intro/introduction.md | 38 +- docs/src/containers/Banner/index.js | 7 +- docs/src/containers/DownloadApp/index.js | 2 +- docs/src/containers/Elements/downloadLink.js | 127 -- docs/src/containers/Elements/dropdown.js | 8 +- docs/src/containers/Footer/index.js | 11 +- docs/src/pages/index.js | 53 +- docs/static/img/apple-logo-white.png | Bin 2153 -> 0 bytes docs/static/img/bg-hero-dark.svg | 167 --- docs/static/img/bg-hero-light.svg | 136 --- docs/static/img/card-element.png | Bin 22255 -> 0 bytes docs/static/img/card-framework-dark.png | Bin 69905 -> 0 bytes docs/static/img/card-framework-light.png | Bin 68148 -> 0 bytes docs/static/img/card-free-dark.png | Bin 241546 -> 0 bytes docs/static/img/card-free-light.png | Bin 184949 -> 0 bytes docs/static/img/card-nitro-dark.png | Bin 74439 -> 0 bytes docs/static/img/card-nitro-light.png | Bin 84418 -> 0 bytes docs/static/img/chat.png | Bin 65848 -> 0 bytes .../img/desktop-explore-models-dark.png | Bin 444737 -> 0 bytes .../img/desktop-explore-models-light.png | Bin 445084 -> 0 bytes docs/static/img/desktop-explore-models.png | Bin 132177 -> 0 bytes docs/static/img/desktop-llm-chat-dark.png | Bin 251517 -> 0 bytes docs/static/img/desktop-llm-chat-light.png | Bin 250096 -> 0 bytes docs/static/img/desktop-llm-chat.png | Bin 634077 -> 0 bytes .../img/desktop-model-settings-dark.png | Bin 190713 -> 0 bytes .../img/desktop-model-settings-light.png | Bin 197154 -> 0 bytes docs/static/img/desktop-model-settings.png | Bin 262954 -> 0 bytes docs/static/img/discord-element-dark.png | Bin 7921 -> 0 bytes docs/static/img/discord-element-light.png | Bin 8231 -> 0 bytes docs/static/img/discord-logo.png | Bin 12450 -> 0 bytes docs/static/img/downloading.png | Bin 87754 -> 0 bytes docs/static/img/explore-model.png | Bin 23765 -> 0 bytes docs/static/img/github-element-dark.png | Bin 19348 -> 0 bytes docs/static/img/github-readme-banner.png | Bin 187861 -> 0 bytes docs/static/img/group-chat-dark.png | Bin 148578 -> 0 bytes docs/static/img/group-chat-light.png | Bin 142384 -> 0 bytes .../img/homepage/app-base-screen-dark.webp | Bin 0 -> 104804 bytes .../img/homepage/app-base-screen-light.webp | Bin 0 -> 105332 bytes docs/static/img/homepage/desktop-app-dark.png | Bin 508675 -> 55206 bytes .../static/img/homepage/desktop-app-dark.webp | Bin 0 -> 74976 bytes .../static/img/homepage/desktop-app-light.png | Bin 485248 -> 63983 bytes .../img/homepage/desktop-app-light.webp | Bin 0 -> 89782 bytes .../img/homepage/element-bg-open-source.png | Bin 312237 -> 31016 bytes .../img/homepage/element-bg-open-source.webp | Bin 0 -> 1464 bytes .../static/img/homepage/element-hero-blur.png | Bin 4219 -> 1765 bytes .../img/homepage/element-hero-blur.webp | Bin 0 -> 3058 bytes .../img/homepage/element-hero-heading.webp | Bin 0 -> 8208 bytes docs/static/img/homepage/extentions.svg | 511 -------- docs/static/img/homepage/full-control.svg | 333 ------ docs/static/img/homepage/ic-folder.png | Bin 1534 -> 541 bytes docs/static/img/homepage/ic-folder.webp | Bin 0 -> 496 bytes docs/static/img/homepage/ic-offline.png | Bin 915 -> 384 bytes docs/static/img/homepage/ic-offline.webp | Bin 0 -> 946 bytes docs/static/img/homepage/ic-private.png | Bin 1131 -> 434 bytes docs/static/img/homepage/ic-private.webp | Bin 0 -> 948 bytes docs/static/img/homepage/mobile-app-dark.png | Bin 735158 -> 114728 bytes docs/static/img/homepage/mobile-app-dark.webp | Bin 0 -> 180362 bytes docs/static/img/homepage/mobile-app-light.png | Bin 728231 -> 117387 bytes .../static/img/homepage/mobile-app-light.webp | Bin 0 -> 188860 bytes docs/static/img/homepage/open-source.svg | 349 ------ docs/static/img/homepage/roadmap.webp | Bin 0 -> 112384 bytes docs/static/img/homepage/status.png | Bin 30570 -> 13004 bytes docs/static/img/homepage/status.webp | Bin 0 -> 26466 bytes .../static/img/ic-baseline-control-camera.svg | 4 - docs/static/img/ic-park-solid-unlock.svg | 10 - docs/static/img/jan-download.png | Bin 190257 -> 0 bytes docs/static/img/linux-logo-white.png | Bin 12490 -> 0 bytes docs/static/img/logo.png | Bin 5146 -> 0 bytes docs/static/img/model-catelog.png | Bin 63554 -> 0 bytes docs/static/img/model-version.png | Bin 87191 -> 0 bytes docs/static/img/set-up.png | Bin 5780 -> 0 bytes docs/static/img/start-model.png | Bin 55040 -> 0 bytes docs/static/img/window-defender.png | Bin 19894 -> 0 bytes docs/static/img/windows-logo-white.png | Bin 2426 -> 0 bytes docs/yarn.lock | 1026 +++++++---------- 75 files changed, 516 insertions(+), 2266 deletions(-) delete mode 100644 docs/src/containers/Elements/downloadLink.js delete mode 100644 docs/static/img/apple-logo-white.png delete mode 100644 docs/static/img/bg-hero-dark.svg delete mode 100644 docs/static/img/bg-hero-light.svg delete mode 100644 docs/static/img/card-element.png delete mode 100644 docs/static/img/card-framework-dark.png delete mode 100644 docs/static/img/card-framework-light.png delete mode 100644 docs/static/img/card-free-dark.png delete mode 100644 docs/static/img/card-free-light.png delete mode 100644 docs/static/img/card-nitro-dark.png delete mode 100644 docs/static/img/card-nitro-light.png delete mode 100644 docs/static/img/chat.png delete mode 100644 docs/static/img/desktop-explore-models-dark.png delete mode 100644 docs/static/img/desktop-explore-models-light.png delete mode 100644 docs/static/img/desktop-explore-models.png delete mode 100644 docs/static/img/desktop-llm-chat-dark.png delete mode 100644 docs/static/img/desktop-llm-chat-light.png delete mode 100644 docs/static/img/desktop-llm-chat.png delete mode 100644 docs/static/img/desktop-model-settings-dark.png delete mode 100644 docs/static/img/desktop-model-settings-light.png delete mode 100644 docs/static/img/desktop-model-settings.png delete mode 100644 docs/static/img/discord-element-dark.png delete mode 100644 docs/static/img/discord-element-light.png delete mode 100644 docs/static/img/discord-logo.png delete mode 100644 docs/static/img/downloading.png delete mode 100644 docs/static/img/explore-model.png delete mode 100644 docs/static/img/github-element-dark.png delete mode 100644 docs/static/img/github-readme-banner.png delete mode 100644 docs/static/img/group-chat-dark.png delete mode 100644 docs/static/img/group-chat-light.png create mode 100644 docs/static/img/homepage/app-base-screen-dark.webp create mode 100644 docs/static/img/homepage/app-base-screen-light.webp create mode 100644 docs/static/img/homepage/desktop-app-dark.webp create mode 100644 docs/static/img/homepage/desktop-app-light.webp create mode 100644 docs/static/img/homepage/element-bg-open-source.webp create mode 100644 docs/static/img/homepage/element-hero-blur.webp create mode 100644 docs/static/img/homepage/element-hero-heading.webp delete mode 100644 docs/static/img/homepage/extentions.svg delete mode 100644 docs/static/img/homepage/full-control.svg create mode 100644 docs/static/img/homepage/ic-folder.webp create mode 100644 docs/static/img/homepage/ic-offline.webp create mode 100644 docs/static/img/homepage/ic-private.webp create mode 100644 docs/static/img/homepage/mobile-app-dark.webp create mode 100644 docs/static/img/homepage/mobile-app-light.webp delete mode 100644 docs/static/img/homepage/open-source.svg create mode 100644 docs/static/img/homepage/roadmap.webp create mode 100644 docs/static/img/homepage/status.webp delete mode 100644 docs/static/img/ic-baseline-control-camera.svg delete mode 100644 docs/static/img/ic-park-solid-unlock.svg delete mode 100644 docs/static/img/jan-download.png delete mode 100644 docs/static/img/linux-logo-white.png delete mode 100644 docs/static/img/logo.png delete mode 100644 docs/static/img/model-catelog.png delete mode 100644 docs/static/img/model-version.png delete mode 100644 docs/static/img/set-up.png delete mode 100644 docs/static/img/start-model.png delete mode 100644 docs/static/img/window-defender.png delete mode 100644 docs/static/img/windows-logo-white.png diff --git a/docs/docs/intro/introduction.md b/docs/docs/intro/introduction.md index 958c5d83e..632aeeee4 100644 --- a/docs/docs/intro/introduction.md +++ b/docs/docs/intro/introduction.md @@ -2,35 +2,49 @@ title: Introduction slug: /docs description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. -keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ] +keywords: + [ + Jan AI, + Jan, + ChatGPT alternative, + local AI, + private AI, + conversational AI, + no-subscription fee, + large language model, + ] --- -Jan is a ChatGPT-alternative that runs on your own computer, with a [local API server](/api). +Jan is a ChatGPT-alternative that runs on your own computer, with a [local API server](/api-reference/). -Jan uses [open-source AI models](/docs/models), stores data in [open file formats](/specs/data-structures), is highly customizable via [extensions](/docs/extensions). +Jan uses [open-source AI models](/docs/models), stores data in [open file formats](/specs/data-structures), is highly customizable via [extensions](/docs/extensions). -Jan believes in the need for an open source AI ecosystem. We aim to build infra and tooling to allow open source AIs to compete on a level playing field with proprietary offerings. +Jan believes in the need for an open source AI ecosystem. We aim to build infra and tooling to allow open source AIs to compete on a level playing field with proprietary offerings. ## Why Jan? #### 💻 Own your AI -Jan runs 100% on your own machine, [predictably](https://www.reddit.com/r/LocalLLaMA/comments/17mghqr/comment/k7ksti6/?utm_source=share&utm_medium=web2x&context=3), privately and even offline. No one else can see your conversations, not even us. + +Jan runs 100% on your own machine, [predictably](https://www.reddit.com/r/LocalLLaMA/comments/17mghqr/comment/k7ksti6/?utm_source=share&utm_medium=web2x&context=3), privately and even offline. No one else can see your conversations, not even us. #### 🏗️ Extensions -Jan ships with a powerful [extension framework](/docs/extensions), which allows developers to extend and customize Jan's functionality. In fact, most core modules of Jan are [built as extensions](/specs/architecture) and use the same extensions API. + +Jan ships with a powerful [extension framework](/docs/extensions), which allows developers to extend and customize Jan's functionality. In fact, most core modules of Jan are [built as extensions](/specs/architecture) and use the same extensions API. #### 🗂️ Open File Formats -Jan stores data in a [local folder of non-proprietary files](/specs/data-structures). You're never locked-in and can do what you want with your data with extensions, or even a different app. + +Jan stores data in a [local folder of non-proprietary files](/specs/data-structures). You're never locked-in and can do what you want with your data with extensions, or even a different app. #### 🌍 Open Source -Both Jan and [Nitro](https://nitro.jan.ai), our lightweight inference engine, are licensed via the open source [AGPLv3 license](https://github.com/janhq/jan/blob/main/LICENSE). + +Both Jan and [Nitro](https://nitro.jan.ai), our lightweight inference engine, are licensed via the open source [AGPLv3 license](https://github.com/janhq/jan/blob/main/LICENSE). - \ No newline at end of file +Participatory: https://www.getlago.com/blog/the-5-reasons-why-we-chose-open-source --> diff --git a/docs/src/containers/Banner/index.js b/docs/src/containers/Banner/index.js index 33061de0f..ea00cf8b1 100644 --- a/docs/src/containers/Banner/index.js +++ b/docs/src/containers/Banner/index.js @@ -66,7 +66,12 @@ export default function AnnoncementBanner() {
{socials.map((social, i) => { return ( - + {social.icon} ); diff --git a/docs/src/containers/DownloadApp/index.js b/docs/src/containers/DownloadApp/index.js index 5fe184c8f..ba9018c76 100644 --- a/docs/src/containers/DownloadApp/index.js +++ b/docs/src/containers/DownloadApp/index.js @@ -111,7 +111,7 @@ export default function DownloadApp() { {systems.map((system, i) => ( { - const url = `https://api.github.com/repos/${repoOwner}/${repoName}/releases/latest`; - try { - const response = await axios.get(url); - return response.data; - } catch (error) { - console.error(error); - return null; - } - }; - - const extractAppName = (fileName) => { - // Extract appname using a regex that matches the provided file formats - const regex = /^(.*?)-(?:mac|win|linux)-(?:arm64|x64|amd64)-.*$/; - const match = fileName.match(regex); - return match ? match[1] : null; - }; - - const changeDefaultSystem = async (systems) => { - const userAgent = navigator.userAgent; - - const arc = await navigator?.userAgentData?.getHighEntropyValues([ - "architecture", - ]); - - if (userAgent.includes("Windows")) { - // windows user - setDefaultSystem(systems[2]); - } else if (userAgent.includes("Linux")) { - // linux user - setDefaultSystem(systems[3]); - } else if ( - userAgent.includes("Mac OS") && - arc && - arc.architecture === "arm" - ) { - setDefaultSystem(systems[0]); - } else { - setDefaultSystem(systems[1]); - } - }; - - useEffect(() => { - const updateDownloadLinks = async () => { - try { - const releaseInfo = await getLatestReleaseInfo("janhq", "jan"); - - // Extract appname from the first asset name - const firstAssetName = releaseInfo.assets[0].name; - const appname = extractAppName(firstAssetName); - - if (!appname) { - console.error( - "Failed to extract appname from file name:", - firstAssetName - ); - changeDefaultSystem(systems); - return; - } - - // Remove 'v' at the start of the tag_name - const tag = releaseInfo.tag_name.startsWith("v") - ? releaseInfo.tag_name.substring(1) - : releaseInfo.tag_name; - - const updatedSystems = systems.map((system) => { - const downloadUrl = system.fileFormat - .replace("{appname}", appname) - .replace("{tag}", tag); - return { - ...system, - href: `https://github.com/janhq/jan/releases/download/${releaseInfo.tag_name}/${downloadUrl}`, - }; - }); - - setSystems(updatedSystems); - changeDefaultSystem(updatedSystems); - } catch (error) { - console.error("Failed to update download links:", error); - } - }; - - updateDownloadLinks(); - }, []); - - return ( -
- - Download Jan - -
- ); -} diff --git a/docs/src/containers/Elements/dropdown.js b/docs/src/containers/Elements/dropdown.js index 6a5304fb0..4d0781491 100644 --- a/docs/src/containers/Elements/dropdown.js +++ b/docs/src/containers/Elements/dropdown.js @@ -57,10 +57,6 @@ export default function Dropdown() { const changeDefaultSystem = async (systems) => { const userAgent = navigator.userAgent; - const arc = await navigator?.userAgentData?.getHighEntropyValues([ - "architecture", - ]); - if (userAgent.includes("Windows")) { // windows user setDefaultSystem(systems[2]); @@ -120,8 +116,8 @@ export default function Dropdown() { return (
{defaultSystem.name} @@ -149,7 +145,7 @@ export default function Dropdown() { > {({ active }) => (
Jan Logo -
Jan
+

Jan

@@ -104,7 +104,12 @@ export default function Footer() {

{socials.map((social, i) => { return ( - + {social.icon} ); @@ -116,7 +121,7 @@ export default function Footer() { {menus.map((menu, i) => { return (
-
{menu.name}
+

{menu.name}