diff --git a/docs/src/containers/Banner/index.js b/docs/src/containers/Banner/index.js
index 07622c63d..00d75467e 100644
--- a/docs/src/containers/Banner/index.js
+++ b/docs/src/containers/Banner/index.js
@@ -1,32 +1,38 @@
-import React from "react";
+import React from 'react'
-import { useAppStars } from "@site/src/hooks/useAppStars";
-import { useAppRelease } from "@site/src/hooks/useAppRelease";
+import { useAppStars } from '@site/src/hooks/useAppStars'
+import { useAppRelease } from '@site/src/hooks/useAppRelease'
-import { AiOutlineGithub, AiOutlineTwitter } from "react-icons/ai";
-import { BiLogoDiscordAlt } from "react-icons/bi";
+import { AiOutlineGithub, AiOutlineTwitter } from 'react-icons/ai'
+import { BiLogoDiscordAlt } from 'react-icons/bi'
const socials = [
{
icon: ,
- href: "https://twitter.com/janframework",
+ href: 'https://twitter.com/janframework',
},
{
icon: ,
- href: "https://discord.com/invite/FTk2MvZwJH",
+ href: 'https://discord.com/invite/FTk2MvZwJH',
},
{
icon: ,
- href: "https://github.com/janhq/jan",
+ href: 'https://github.com/janhq/jan',
},
-];
+]
export default function AnnoncementBanner() {
- const { stargazers } = useAppStars();
- const { release } = useAppRelease();
+ const { stargazers } = useAppStars()
+ const { release } = useAppRelease()
return (
-
+
- );
+ )
}
diff --git a/docs/src/containers/Elements/dropdown.js b/docs/src/containers/Elements/dropdown.js
index 91115c811..00176fdf2 100644
--- a/docs/src/containers/Elements/dropdown.js
+++ b/docs/src/containers/Elements/dropdown.js
@@ -1,134 +1,134 @@
-import React, { useState, useEffect } from "react";
-import { Fragment } from "react";
-import { Menu, Transition } from "@headlessui/react";
-import { ChevronDownIcon } from "@heroicons/react/20/solid";
-import axios from "axios";
-import { FaWindows, FaApple, FaLinux } from "react-icons/fa";
+import React, { useState, useEffect } from 'react'
+import { Fragment } from 'react'
+import { Menu, Transition } from '@headlessui/react'
+import { ChevronDownIcon } from '@heroicons/react/20/solid'
+import axios from 'axios'
+import { FaWindows, FaApple, FaLinux } from 'react-icons/fa'
const systemsTemplate = [
{
- name: "Download for Mac (M1/M2/M3)",
+ name: 'Download for Mac (M1/M2/M3)',
logo: FaApple,
- fileFormat: "{appname}-mac-arm64-{tag}.dmg",
+ fileFormat: '{appname}-mac-arm64-{tag}.dmg',
},
{
- name: "Download for Mac (Intel)",
+ name: 'Download for Mac (Intel)',
logo: FaApple,
- fileFormat: "{appname}-mac-x64-{tag}.dmg",
+ fileFormat: '{appname}-mac-x64-{tag}.dmg',
},
{
- name: "Download for Windows",
+ name: 'Download for Windows',
logo: FaWindows,
- fileFormat: "{appname}-win-x64-{tag}.exe",
+ fileFormat: '{appname}-win-x64-{tag}.exe',
},
{
- name: "Download for Linux (AppImage)",
+ name: 'Download for Linux (AppImage)',
logo: FaLinux,
- fileFormat: "{appname}-linux-x86_64-{tag}.AppImage",
+ fileFormat: '{appname}-linux-x86_64-{tag}.AppImage',
},
{
- name: "Download for Linux (deb)",
+ name: 'Download for Linux (deb)',
logo: FaLinux,
- fileFormat: "{appname}-linux-amd64-{tag}.deb",
- }
-];
+ fileFormat: '{appname}-linux-amd64-{tag}.deb',
+ },
+]
function classNames(...classes) {
- return classes.filter(Boolean).join(" ");
+ return classes.filter(Boolean).join(' ')
}
export default function Dropdown() {
- const [systems, setSystems] = useState(systemsTemplate);
- const [defaultSystem, setDefaultSystem] = useState(systems[0]);
+ const [systems, setSystems] = useState(systemsTemplate)
+ const [defaultSystem, setDefaultSystem] = useState(systems[0])
const getLatestReleaseInfo = async (repoOwner, repoName) => {
- const url = `https://api.github.com/repos/${repoOwner}/${repoName}/releases/latest`;
+ const url = `https://api.github.com/repos/${repoOwner}/${repoName}/releases/latest`
try {
- const response = await axios.get(url);
- return response.data;
+ const response = await axios.get(url)
+ return response.data
} catch (error) {
- console.error(error);
- return null;
+ 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|x86_64|amd64)-.*$/;
- const match = fileName.match(regex);
- return match ? match[1] : null;
- };
+ const regex = /^(.*?)-(?:mac|win|linux)-(?:arm64|x64|x86_64|amd64)-.*$/
+ const match = fileName.match(regex)
+ return match ? match[1] : null
+ }
const changeDefaultSystem = async (systems) => {
- const userAgent = navigator.userAgent;
+ const userAgent = navigator.userAgent
- if (userAgent.includes("Windows")) {
+ if (userAgent.includes('Windows')) {
// windows user
- setDefaultSystem(systems[2]);
- } else if (userAgent.includes("Linux")) {
+ setDefaultSystem(systems[2])
+ } else if (userAgent.includes('Linux')) {
// linux user
- setDefaultSystem(systems[3]);
- } else if (userAgent.includes("Mac OS")) {
- setDefaultSystem(systems[0]);
+ setDefaultSystem(systems[3])
+ } else if (userAgent.includes('Mac OS')) {
+ setDefaultSystem(systems[0])
} else {
- setDefaultSystem(systems[1]);
+ setDefaultSystem(systems[1])
}
- };
+ }
useEffect(() => {
const updateDownloadLinks = async () => {
try {
- const releaseInfo = await getLatestReleaseInfo("janhq", "jan");
+ const releaseInfo = await getLatestReleaseInfo('janhq', 'jan')
// Extract appname from the first asset name
- const firstAssetName = releaseInfo.assets[0].name;
- const appname = extractAppName(firstAssetName);
+ const firstAssetName = releaseInfo.assets[0].name
+ const appname = extractAppName(firstAssetName)
if (!appname) {
console.error(
- "Failed to extract appname from file name:",
+ 'Failed to extract appname from file name:',
firstAssetName
- );
- changeDefaultSystem(systems);
- return;
+ )
+ changeDefaultSystem(systems)
+ return
}
// Remove 'v' at the start of the tag_name
- const tag = releaseInfo.tag_name.startsWith("v")
+ const tag = releaseInfo.tag_name.startsWith('v')
? releaseInfo.tag_name.substring(1)
- : releaseInfo.tag_name;
+ : releaseInfo.tag_name
const updatedSystems = systems.map((system) => {
const downloadUrl = system.fileFormat
- .replace("{appname}", appname)
- .replace("{tag}", tag);
+ .replace('{appname}', appname)
+ .replace('{tag}', tag)
return {
...system,
href: `https://github.com/janhq/jan/releases/download/${releaseInfo.tag_name}/${downloadUrl}`,
- };
- });
+ }
+ })
- setSystems(updatedSystems);
- changeDefaultSystem(updatedSystems);
+ setSystems(updatedSystems)
+ changeDefaultSystem(updatedSystems)
} catch (error) {
- console.error("Failed to update download links:", error);
+ console.error('Failed to update download links:', error)
}
- };
+ }
- updateDownloadLinks();
- }, []);
+ updateDownloadLinks()
+ }, [])
return (
{defaultSystem.name}
*/}
-
+ {/*
@@ -210,7 +169,7 @@ export default function Home() {
- Take your AI assistants on the go.{" "}
+ Take your AI assistants on the go.{' '}
Seamless integration
into your
@@ -226,10 +185,10 @@ export default function Home() {
alt="App screenshots"
sources={{
light: useBaseUrl(
- "/img/homepage/mobile-app-light.webp"
+ '/img/homepage/mobile-app-light.webp'
),
dark: useBaseUrl(
- "/img/homepage/mobile-app-dark.webp"
+ '/img/homepage/mobile-app-dark.webp'
),
}}
/>
@@ -238,9 +197,9 @@ export default function Home() {
-
+
*/}
-
@@ -42,20 +54,19 @@ export default function Layout(props) {
-
+
- {isAllowedPath ? : ""}
+ {isAllowedPath ? : ''}
{/* {console.log("Is allowed path?", location.pathname)} */}
-
}>
@@ -65,5 +76,5 @@ export default function Layout(props) {
{!noFooter && }
- );
+ )
}
diff --git a/docs/tailwind.config.js b/docs/tailwind.config.js
index a79121d56..ecbf00b6a 100644
--- a/docs/tailwind.config.js
+++ b/docs/tailwind.config.js
@@ -1,67 +1,68 @@
// tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
- content: ["./src/**/*.{js,jsx,ts,tsx}"],
- darkMode: ["class", '[data-theme="dark"]'],
+ content: ['./src/**/*.{js,jsx,ts,tsx}'],
+ darkMode: ['class', '[data-theme="dark"]'],
theme: {
animation: {
- wave: "wave 2.5s linear infinite",
- enter: "enter 200ms ease-out",
- "slide-in": "slide-in 1.2s cubic-bezier(.41,.73,.51,1.02)",
- leave: "leave 150ms ease-in forwards",
- "bounce-down": "bounce-down 3s infinite",
+ 'wave': 'wave 2.5s linear infinite',
+ 'enter': 'enter 200ms ease-out',
+ 'slide-in': 'slide-in 1.2s cubic-bezier(.41,.73,.51,1.02)',
+ 'leave': 'leave 150ms ease-in forwards',
+ 'bounce-down': 'bounce-down 3s infinite',
},
keyframes: {
- wave: {
- "0%": { transform: "rotate( 0.0deg)" },
- "10%": { transform: "rotate(14.0deg)" },
- "20%": { transform: "rotate(-8.0deg)" },
- "30%": { transform: "rotate(14.0deg)" },
- "40%": { transform: "rotate(-4.0deg)" },
- "50%": { transform: "rotate(10.0deg)" },
- "60%": { transform: "rotate( 0.0deg)" },
- "100%": { transform: "rotate( 0.0deg)" },
+ 'wave': {
+ '0%': { transform: 'rotate( 0.0deg)' },
+ '10%': { transform: 'rotate(14.0deg)' },
+ '20%': { transform: 'rotate(-8.0deg)' },
+ '30%': { transform: 'rotate(14.0deg)' },
+ '40%': { transform: 'rotate(-4.0deg)' },
+ '50%': { transform: 'rotate(10.0deg)' },
+ '60%': { transform: 'rotate( 0.0deg)' },
+ '100%': { transform: 'rotate( 0.0deg)' },
},
- enter: {
- "0%": { transform: "scale(0.8)", opacity: "0" },
- "100%": { transform: "scale(1)", opacity: "1" },
+ 'enter': {
+ '0%': { transform: 'scale(0.8)', opacity: '0' },
+ '100%': { transform: 'scale(1)', opacity: '1' },
},
- leave: {
- "0%": { transform: "scale(1)", opacity: "1" },
- "100%": { transform: "scale(0.8)", opacity: "0" },
+ 'leave': {
+ '0%': { transform: 'scale(1)', opacity: '1' },
+ '100%': { transform: 'scale(0.8)', opacity: '0' },
},
- "slide-in": {
- "0%": { transform: "translateY(-100%)" },
- "100%": { transform: "translateY(0)" },
+ 'slide-in': {
+ '0%': { transform: 'translateY(-100%)' },
+ '100%': { transform: 'translateY(0)' },
},
- "bounce-down": {
- "0%,20%, 50%,80%,100%": { transform: "translateY(0)" },
- "40%": { transform: "translateY(-8px)" },
- "60%": { transform: "translateY(-4px)" },
+ 'bounce-down': {
+ '0%,20%, 50%,80%,100%': { transform: 'translateY(0)' },
+ '40%': { transform: 'translateY(-8px)' },
+ '60%': { transform: 'translateY(-4px)' },
},
},
container: {
center: true,
- padding: "16px",
+ padding: '16px',
},
fontFamily: {
sans: [
- "Inter",
- "-apple-system",
- "BlinkMacSystemFont",
- "Segoe UI",
- "Roboto",
- "Oxygen-Sans",
- "Ubuntu,Cantarell",
- "Helvetica",
- "sans-serif",
+ 'Inter',
+ '-apple-system',
+ 'BlinkMacSystemFont',
+ 'Segoe UI',
+ 'Roboto',
+ 'Oxygen-Sans',
+ 'Ubuntu,Cantarell',
+ 'Helvetica',
+ 'sans-serif',
],
+ serif: ['Arapey'],
},
extend: {
backgroundImage: {
'custom-img': "url('/img/homepage-new/bg.png')",
- }
+ },
},
},
- plugins: [require("tailwindcss-animate")],
-};
+ plugins: [require('tailwindcss-animate')],
+}