diff --git a/website/content/bot/changelog/version1_0_0.mdx b/website/content/bot/changelog/version1_0_0.mdx index da1b075b39e..b4939833b13 100644 --- a/website/content/bot/changelog/version1_0_0.mdx +++ b/website/content/bot/changelog/version1_0_0.mdx @@ -3,16 +3,17 @@ title: Version 1.0.0 version: "1.0.0" date: 2022-08-03 description: Version 1.0.0 +sidebar_position: 9 --- ## Added - Supports Discord -- Charts menu including: chart, c3m, c5m, c15m, cd, cw, cm -- Discovery menu including: contracts, senate, splits, fgindex, holidays, ipolist, fidelity, house +- Charts menu including: chart, c3m, c5m, c15m, cd, cw, cm +- Discovery menu including: contracts, senate, splits, fgindex, holidays, ipolist, fidelity, house - Due diligence menu including: ah, nexter, bio, pm, analyst, pt, est, sec, supplier, customer, instholdings, insiders, arktrades, splits, ermove, earnings - ETF menu including: tops, holdings -- Economy menu including: calendar, glbonds, indices, commodiities, usbonds, currencies, revrepo, fedrates +- Economy menu including: calendar, glbonds, indices, commodiities, usbonds, currencies, revrepo, fedrates - General menu including: futures, ta, news, quote - Government menu including: contracts, senate, house - Information menu including: serverid, stats, support, about, help @@ -30,4 +31,4 @@ description: Version 1.0.0 ## Fixed -- First release, no fixes. \ No newline at end of file +- First release, no fixes. diff --git a/website/content/bot/changelog/version1_0_1.mdx b/website/content/bot/changelog/version1_0_1.mdx index 97bae8574e7..48e42f81424 100644 --- a/website/content/bot/changelog/version1_0_1.mdx +++ b/website/content/bot/changelog/version1_0_1.mdx @@ -3,6 +3,7 @@ title: Version 1.0.1 version: "1.0.1" date: 2022-08-04 description: Version 1.0.1 +sidebar_position: 8 --- ## Added diff --git a/website/content/bot/changelog/version1_0_2.mdx b/website/content/bot/changelog/version1_0_2.mdx index d8157a66d3f..c0eef34a971 100644 --- a/website/content/bot/changelog/version1_0_2.mdx +++ b/website/content/bot/changelog/version1_0_2.mdx @@ -3,6 +3,7 @@ title: Version 1.0.2 version: "1.0.2" date: 2022-08-05 description: Version 1.0.2 +sidebar_position: 7 --- ## Added diff --git a/website/content/bot/changelog/version1_0_3.mdx b/website/content/bot/changelog/version1_0_3.mdx index 6b50d630b53..64e8d83dafc 100644 --- a/website/content/bot/changelog/version1_0_3.mdx +++ b/website/content/bot/changelog/version1_0_3.mdx @@ -3,6 +3,7 @@ title: Version 1.0.3 version: "1.0.3" date: 2022-08-12 description: Version 1.0.3 +sidebar_position: 6 --- ## Added diff --git a/website/content/bot/changelog/version1_0_4.mdx b/website/content/bot/changelog/version1_0_4.mdx index 58382b303fd..3e6d46b90cc 100644 --- a/website/content/bot/changelog/version1_0_4.mdx +++ b/website/content/bot/changelog/version1_0_4.mdx @@ -3,6 +3,7 @@ title: Version 1.0.4 version: "1.0.4" date: 2022-08-16 description: Version 1.0.4 +sidebar_position: 5 --- ## Added diff --git a/website/content/bot/changelog/version1_0_5.mdx b/website/content/bot/changelog/version1_0_5.mdx index 4e073547a9f..eda1a650ceb 100644 --- a/website/content/bot/changelog/version1_0_5.mdx +++ b/website/content/bot/changelog/version1_0_5.mdx @@ -3,6 +3,7 @@ title: Version 1.0.5 version: "1.0.5" date: 2022-08-30 description: Version 1.0.5 +sidebar_position: 4 --- ## Added diff --git a/website/content/bot/changelog/version1_0_6.mdx b/website/content/bot/changelog/version1_0_6.mdx index ed227bcca85..724190db17c 100644 --- a/website/content/bot/changelog/version1_0_6.mdx +++ b/website/content/bot/changelog/version1_0_6.mdx @@ -3,6 +3,7 @@ title: Version 1.0.6 version: "1.0.6" date: 2022-09-12 description: Version 1.0.6 +sidebar_position: 3 --- ## Added diff --git a/website/content/bot/changelog/version1_0_7.mdx b/website/content/bot/changelog/version1_0_7.mdx index c069216022f..5ee68aeb660 100644 --- a/website/content/bot/changelog/version1_0_7.mdx +++ b/website/content/bot/changelog/version1_0_7.mdx @@ -3,6 +3,7 @@ title: Version 1.0.7 version: "1.0.7" date: 2022-09-12 description: Version 1.0.7 +sidebar_position: 2 --- ## Added diff --git a/website/content/bot/changelog/version1_0_8.mdx b/website/content/bot/changelog/version1_0_8.mdx index a5a9b278d97..bf801faaf65 100644 --- a/website/content/bot/changelog/version1_0_8.mdx +++ b/website/content/bot/changelog/version1_0_8.mdx @@ -3,6 +3,7 @@ title: Version 1.0.8 version: "1.0.8" date: 2022-10-13 description: Version 1.0.8 +sidebar_position: 1 --- ## Added diff --git a/website/content/bot/index.md b/website/content/bot/index.md index eeeffd4c5b5..726a8954598 100644 --- a/website/content/bot/index.md +++ b/website/content/bot/index.md @@ -49,8 +49,8 @@ To know more about OpenBB Bot, you can start by reading the [Installation Guide] ### Using OpenBB Bot -To learn how to use OpenBB Bot, you can start by reading the [Basics Guide](/bot/guides). +To learn how to use OpenBB Bot, you can start by reading the [Basics Guide](/bot/guides/discord). ### Bot Reference -The Reference section is a complete list of all functions available for OpenBB Bot. It can be found [here](/bot/reference/). +The Reference section is a complete list of all functions available for OpenBB Bot. It can be found [here](/bot/reference/discord). diff --git a/website/content/bot/installation/discord.md b/website/content/bot/installation/discord.md new file mode 100644 index 00000000000..5b07d7bd490 --- /dev/null +++ b/website/content/bot/installation/discord.md @@ -0,0 +1,22 @@ +--- +title: Discord +sidebar_position: 1 +description: How to get started with OpenBB Bot +keywords: [installation, install, install openbb bot, guide, instructions, how to, explanation, openbb bot, openbb, discord, telegram,] +--- + +## Discord - First Time Setup + +A pop-up window will open, asking you to log in to your Discord account and allow the bot access. + +discord bot setup step 1 + +Once you log in, you’ll see a window asking for permission to access your account. Locate the “Add to Server” drop-down menu and click on it. +discord bot setup step 2 + +This will open a list of Discord servers where you can add a bot. Select your server and press “Continue”. + +Review permissions that the bot requests on your server. Select and deselect based on your needs, we recommend all the default settings in order to experience everything the bot has to offer. Click on “Authorize” when you’re ready. +discord bot setup step 3 + +Congratulations! You’ve successfully added a bot to your Discord server. diff --git a/website/content/bot/installation/installation.md b/website/content/bot/installation/installation.md new file mode 100644 index 00000000000..036199b1493 --- /dev/null +++ b/website/content/bot/installation/installation.md @@ -0,0 +1,17 @@ +--- +title: Installation +sidebar_position: 1 +description: How to get started with OpenBB Discord Bot +keywords: [installation, install, install openbb bot, guide, how to, explanation, openbb bot, openbb, discord] +--- + +import AddBotDialog from "@site/src/components/General/AddBot"; + +## Adding Bot to your Server + +To add the bot to your server click on one of the links for your respective platform and then follow the instructions for the respective platform. + + + +--- diff --git a/website/content/bot/installation/telegram.md b/website/content/bot/installation/telegram.md new file mode 100644 index 00000000000..4db392dd462 --- /dev/null +++ b/website/content/bot/installation/telegram.md @@ -0,0 +1,24 @@ +--- +title: Telegram +sidebar_position: 1 +description: How to get started with OpenBB Telegram Bot +keywords: [installation, install, install openbb bot, guide, instructions, how to, explanation, openbb bot, openbb, telegram] +--- + +## Telegram - First Time Setup + +After clicking on the Add to Telegram button it should open a chat with our OpenBB Bot. + +telegram bot setup step 1 + +Go to your Telegram chat and click/tap on the Top Bar of the OpenBB Bot chat window. + +telegram bot setup step 2 + +Then, you need to click on “More” and select "Add to Group or Channel" or just click "Add to Group or Channel" and select the Telegram group you want to add the chatbot to: + +telegram bot setup step 3 + +Now you can verify it has the permissions required, we recommend the ones already selected, and you are ready to go! + +telegram bot setup step 4 diff --git a/website/content/terminal/changelog/version2_0_0.mdx b/website/content/terminal/changelog/version2_0_0.mdx index 4b7c6b2aeb7..080a4262493 100644 --- a/website/content/terminal/changelog/version2_0_0.mdx +++ b/website/content/terminal/changelog/version2_0_0.mdx @@ -1,9 +1,9 @@ --- -title: Current - Version 2.0.0 +title: Version 2.0.0 version: "2.0.0" date: 2022-11-29 description: Version 2.0.0 -sidebar_position: 0 +sidebar_position: 8 --- ## Major Release Notes diff --git a/website/content/terminal/changelog/version2_1_0.mdx b/website/content/terminal/changelog/version2_1_0.mdx index 097f1b1356d..ede8120cf7f 100644 --- a/website/content/terminal/changelog/version2_1_0.mdx +++ b/website/content/terminal/changelog/version2_1_0.mdx @@ -1,9 +1,9 @@ --- -title: Current - Version 2.1.0 +title: Version 2.1.0 version: "2.1.0" date: 2022-12-21 description: Version 2.1.0 -sidebar_position: 0 +sidebar_position: 7 --- ## What's new diff --git a/website/content/terminal/changelog/version2_2_0.mdx b/website/content/terminal/changelog/version2_2_0.mdx index 87b2542204c..6dda61fdfd0 100644 --- a/website/content/terminal/changelog/version2_2_0.mdx +++ b/website/content/terminal/changelog/version2_2_0.mdx @@ -1,9 +1,9 @@ --- -title: Current - Version 2.2.0 +title: Version 2.2.0 version: "2.2.0" date: 2022-01-19 description: Version 2.2.0 -sidebar_position: 0 +sidebar_position: 6 --- ## What's new diff --git a/website/content/terminal/changelog/version2_3_0.mdx b/website/content/terminal/changelog/version2_3_0.mdx index 2cffe5af96c..0e6725378fa 100644 --- a/website/content/terminal/changelog/version2_3_0.mdx +++ b/website/content/terminal/changelog/version2_3_0.mdx @@ -1,9 +1,9 @@ --- -title: Current - Version 2.3.0 +title: Version 2.3.0 version: "2.3.0" date: 2023-01-31 description: Version 2.3.0 -sidebar_position: 0 +sidebar_position: 5 --- diff --git a/website/content/terminal/changelog/version2_3_1.mdx b/website/content/terminal/changelog/version2_3_1.mdx index a8d27713f4f..232f4c2ccb6 100644 --- a/website/content/terminal/changelog/version2_3_1.mdx +++ b/website/content/terminal/changelog/version2_3_1.mdx @@ -1,9 +1,9 @@ --- -title: Current - Version 2.3.1 +title: Version 2.3.1 version: "2.3.1" date: 2023-02-01 description: Version 2.3.1 -sidebar_position: 0 +sidebar_position: 4 --- ## Fixed diff --git a/website/content/terminal/changelog/version2_4_0.mdx b/website/content/terminal/changelog/version2_4_0.mdx index f1c9c9b1bc0..a32744dbefd 100644 --- a/website/content/terminal/changelog/version2_4_0.mdx +++ b/website/content/terminal/changelog/version2_4_0.mdx @@ -1,9 +1,9 @@ --- -title: Current - Version 2.4.0 +title: Version 2.4.0 version: "2.4.0" date: 2023-02-14 description: Version 2.4.0 -sidebar_position: 0 +sidebar_position: 3 --- ## What's new diff --git a/website/content/terminal/changelog/version2_4_1.mdx b/website/content/terminal/changelog/version2_4_1.mdx index b5a0f1d6257..4bc98a7e542 100644 --- a/website/content/terminal/changelog/version2_4_1.mdx +++ b/website/content/terminal/changelog/version2_4_1.mdx @@ -1,9 +1,9 @@ --- -title: Current - Version 2.4.1 +title: Version 2.4.1 version: "2.4.1" date: 2023-02-17 description: Version 2.4.1 -sidebar_position: 0 +sidebar_position: 2 --- ## What's new diff --git a/website/content/terminal/changelog/version2_5_0.mdx b/website/content/terminal/changelog/version2_5_0.mdx index 74863d05111..1e5869d6011 100644 --- a/website/content/terminal/changelog/version2_5_0.mdx +++ b/website/content/terminal/changelog/version2_5_0.mdx @@ -1,9 +1,9 @@ --- -title: Current - Version 2.5.0 +title: Version 2.5.0 version: "2.5.0" date: 2023-03-01 description: Version 2.5.0 -sidebar_position: 0 +sidebar_position: 1 --- diff --git a/website/content/terminal/installation/docker.md b/website/content/terminal/installation/docker.md index 94fa8b02cd3..33891004ae7 100644 --- a/website/content/terminal/installation/docker.md +++ b/website/content/terminal/installation/docker.md @@ -20,9 +20,13 @@ keywords: ] --- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + Installing the OpenBB Terminal via Docker supports both Windows and Unix systems (Linux + MacOS). Installation differs a bit between operating system (Windows, macOS and Linux). Please select the section matching to your OS.

-
Windows + + **Install Docker Desktop** @@ -81,10 +85,9 @@ docker compose run openbb This will download and run the file: `docker-compose.yaml` This file contents the settings to pull and run OpenBB Terminal Docker image. -
- -
MacOS + + **Install Docker Desktop** You can find `Docker Desktop` for MacOS here: [Download Docker Desktop](https://www.docker.com/products/docker-desktop) @@ -161,12 +164,8 @@ This will download and run the file: `docker-compose.yaml` This file contents the settings to pull and run OpenBB Terminal Docker image. The `xhost +$IP` and `DISPLAY=$IP:0` parts are there to allow charts display. - - -
- -
Linux - + + **Install Docker Desktop** You can find `Docker Desktop` for Linux here: [Download Docker Desktop](https://www.docker.com/products/docker-desktop) @@ -215,5 +214,5 @@ docker compose run openbb ``` Note: if you're using remote docker host, you can connect with `ssh -X `. - -
+ + diff --git a/website/content/terminal/installation/index.md b/website/content/terminal/installation/index.md new file mode 100644 index 00000000000..706622e0a11 --- /dev/null +++ b/website/content/terminal/installation/index.md @@ -0,0 +1,48 @@ +--- +title: Installation +sidebar_position: 1 +description: Choose your Installation type. +keywords: + [ + installation, + installer, + install, + guide, + mac, + windows, + linux, + python, + github, + macos, + how to, + explanation, + openbb terminal, + ] +--- + +import LinkCard from "@site/src/components/General/LinkCard"; + + + + + diff --git a/website/generate_sdk_markdown.py b/website/generate_sdk_markdown.py index 326845ea132..c24743fa628 100644 --- a/website/generate_sdk_markdown.py +++ b/website/generate_sdk_markdown.py @@ -186,7 +186,7 @@ def create_cmd_cards(cmd_text: List[Dict[str, str]]) -> str: cmd_cards = "" for cmd in cmd_text: url = f"/sdk/reference/{cmd['url']}/{cmd['title']}".replace("//", "/") - description = shorten(cmd["description"], width=116, placeholder="...") + description = shorten(f"{cmd['description']}", width=116, placeholder="...") cmd_cards += f""" +
+ //
+ className={clsx( + "shadow-sm group !no-underline text-grey-900 dark:text-white hover:text-grey-900 dark:hover:border-white hover:border-grey-900 dark:hover:!text-white relative w-full max-w-full p-5 rounded-lg border border-grey-400 bg-white dark:bg-grey-900", + className + )} + > +

+ {platform === "windows" && ( + + )} + {platform === "macos" && ( + + )} + {platform === "source" && ( + + )} + {platform === "docker" && ( + + )} + {platform === "discord" && ( + + )} + {platform === "telegram" && ( + + )} + {title} +

+

{description}

+ {false && ( +

+ See more + +

+ )} +
+ + ); +} diff --git a/website/src/components/General/ReferenceCard.tsx b/website/src/components/General/ReferenceCard.tsx index ce57afb3740..b526789806c 100644 --- a/website/src/components/General/ReferenceCard.tsx +++ b/website/src/components/General/ReferenceCard.tsx @@ -1,5 +1,8 @@ import Link from "@docusaurus/Link"; import React from "react"; +import clsx from "clsx"; + +import { useLocation } from "@docusaurus/router"; export default function ReferenceCard({ title, @@ -14,12 +17,24 @@ export default function ReferenceCard({ }) { // TODO: Waiting for mockup of how to display the command vs menu item const something = command ? "" : ""; + const { pathname } = useLocation(); return ( -

{title}{something}

+
+

{title}{something}

{description ? (

{description}

) : null} diff --git a/website/src/components/Icons/Apple.tsx b/website/src/components/Icons/Apple.tsx new file mode 100644 index 00000000000..caebf534a92 --- /dev/null +++ b/website/src/components/Icons/Apple.tsx @@ -0,0 +1,20 @@ +import React, { SVGProps } from "react" +interface SVGRProps { + title?: string + titleId?: string +} + +const AppleIcon = ({ + title, + titleId, + ...props +}: SVGProps & SVGRProps) => ( + + + +) + +export default AppleIcon + + + diff --git a/website/src/components/Icons/Docker.tsx b/website/src/components/Icons/Docker.tsx new file mode 100644 index 00000000000..627ed68a144 --- /dev/null +++ b/website/src/components/Icons/Docker.tsx @@ -0,0 +1,18 @@ +import React, { SVGProps } from "react" +interface SVGRProps { + title?: string + titleId?: string +} + +const DockerIcon = ({ + title, + titleId, + ...props +}: SVGProps & SVGRProps) => ( + +) + +export default DockerIcon + + + diff --git a/website/src/components/Icons/Source.tsx b/website/src/components/Icons/Source.tsx new file mode 100644 index 00000000000..5e7004baf60 --- /dev/null +++ b/website/src/components/Icons/Source.tsx @@ -0,0 +1,18 @@ +import React, { SVGProps } from "react" +interface SVGRProps { + title?: string + titleId?: string +} + +const SourceIcon = ({ + title, + titleId, + ...props +}: SVGProps & SVGRProps) => ( + +) + +export default SourceIcon + + + diff --git a/website/src/components/Icons/Windows.tsx b/website/src/components/Icons/Windows.tsx new file mode 100644 index 00000000000..8b8fd69eca4 --- /dev/null +++ b/website/src/components/Icons/Windows.tsx @@ -0,0 +1,31 @@ +import React, { SVGProps } from "react" +interface SVGRProps { + title?: string + titleId?: string +} + +const WindowsIcon = ({ + title, + titleId, + ...props +}: SVGProps & SVGRProps) => ( + + {title ? {title} : null} + + +) + +export default WindowsIcon + + + diff --git a/website/src/css/custom.css b/website/src/css/custom.css index c251d157985..d616fc2da88 100644 --- a/website/src/css/custom.css +++ b/website/src/css/custom.css @@ -68,11 +68,14 @@ ._btn-common { @apply inline-flex w-full items-center justify-center gap-2 rounded py-2 px-6 text-center !no-underline transition duration-150 ease-out md:w-fit; } + ._btn-dark { + @apply _btn-common bg-grey-100 text-grey-800 hover:bg-white focus:outline focus:outline-2 active:bg-grey-200 hover:active:text-grey-900 disabled:bg-grey-300 disabled:text-grey-500 active:disabled:bg-grey-300 active:disabled:text-grey-500; + } ._btn { - @apply _btn-common bg-grey-800 text-white hover:bg-grey-600 dark:bg-grey-100 dark:text-grey-800 dark:hover:bg-white focus:outline focus:outline-2 focus:outline-grey-500 dark:active:bg-grey-200 dark:hover:active:text-grey-900 disabled:bg-grey-300 disabled:text-grey-500 active:disabled:bg-grey-300 active:disabled:text-grey-500; + @apply _btn-common bg-grey-800 text-white hover:text-white hover:bg-grey-600 dark:bg-grey-100 dark:text-grey-800 dark:hover:bg-white focus:outline focus:outline-2 focus:outline-grey-500 dark:active:bg-grey-200 dark:hover:active:text-grey-900 disabled:bg-grey-300 disabled:text-grey-500 active:disabled:bg-grey-300 active:disabled:text-grey-500; } ._btn-secondary { - @apply _btn-common border border-grey-300 text-grey-300 outline-offset-0 hover:border-white hover:text-white focus:outline focus:outline-2 focus:outline-grey-500 active:border-white active:bg-grey-800 active:text-white disabled:border-grey-500 disabled:bg-transparent disabled:text-grey-500; + @apply _btn-common border border-grey-300 hover:text-grey-500 hover:border-grey-500 text-grey-300 outline-offset-0 dark:hover:border-white dark:hover:text-white focus:outline focus:outline-2 focus:outline-grey-500 active:border-white active:bg-grey-800 active:text-white disabled:border-grey-500 disabled:bg-transparent disabled:text-grey-500; } ._btn-tertiary { @apply _btn-common bg-grey-900 text-grey-50 hover:bg-grey-800 hover:text-white focus:bg-grey-900 focus:outline focus:outline-2 focus:outline-grey-500 active:bg-grey-700 active:text-white disabled:bg-grey-500 disabled:text-grey-700; @@ -438,3 +441,7 @@ pre[class*="language-"] { details summary { cursor: pointer; } + +[data-theme="dark"] #__docusaurus { + background-color: #131313ff !important; +} diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index 8934488182b..48b9185fb5a 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -29,9 +29,9 @@ export default function Home(): JSX.Element { backgroundSize: "100% 110%", }} to="/terminal" - className="bg-[url('/img/terminal_bg_light.png')] dark:bg-[url('/img/terminal_bg.png')] bg-no-repeat shadow-sm group !no-underline text-grey-900 dark:text-white hover:text-grey-900 dark:hover:border-white hover:border-grey-900 dark:hover:!text-white relative w-full h-[238px] max-w-full p-8 rounded flex flex-col items-start justify-start border border-grey-200 bg-white dark:bg-grey-900" + className="bg-[url(/img/terminal_bg_light.png)] dark:bg-[url('/img/terminal_bg.png')] bg-no-repeat shadow-sm group !no-underline text-grey-900 dark:text-white hover:text-grey-900 dark:hover:border-white hover:border-grey-600/80 dark:hover:!text-white relative w-full h-[238px] max-w-full p-8 rounded flex flex-col items-start justify-start border border-grey-300 bg-white dark:bg-grey-900" > -

+

OpenBB Terminal

@@ -39,7 +39,7 @@ export default function Home(): JSX.Element {

See more @@ -51,9 +51,9 @@ export default function Home(): JSX.Element { backgroundSize: "100% 130%", }} to="/sdk" - className="bg-[url('/img/sdk_bg_light.png')] dark:bg-[url('/img/sdk_bg.png')] bg-no-repeat shadow-sm group !no-underline text-grey-900 dark:text-white hover:text-grey-900 dark:hover:border-white hover:border-grey-900 dark:hover:!text-white relative w-full h-[238px] max-w-full p-8 rounded flex flex-col items-start justify-start border border-grey-200 bg-white dark:bg-grey-900" + className="bg-[url(/img/sdk_bg_light.png)] dark:bg-[url('/img/sdk_bg.png')] bg-no-repeat shadow-sm group !no-underline text-grey-900 dark:text-white hover:text-grey-900 dark:hover:border-white hover:border-grey-600/80 dark:hover:!text-white relative w-full h-[238px] max-w-full p-8 rounded flex flex-col items-start justify-start border border-grey-300 bg-white dark:bg-grey-900" > -

+

OpenBB SDK

@@ -61,7 +61,7 @@ export default function Home(): JSX.Element {

See more @@ -73,9 +73,9 @@ export default function Home(): JSX.Element { backgroundSize: "100% 130%", }} to="/bot" - className="bg-[url('/img/sdk_bot_light.png')] dark:bg-[url('/img/bot_bg.png')] bg-no-repeat shadow-sm group !no-underline text-grey-900 dark:text-white hover:text-grey-900 dark:hover:border-white hover:border-grey-900 dark:hover:!text-white relative w-full h-[238px] max-w-full p-8 rounded flex flex-col items-start justify-start border border-grey-200 bg-white dark:bg-grey-900" + className="bg-[url(/img/bot_bg_light.png)] dark:bg-[url('/img/bot_bg.png')] bg-no-repeat shadow-sm group !no-underline text-grey-900 dark:text-white hover:text-grey-900 dark:hover:border-white hover:border-grey-600/80 dark:hover:!text-white relative w-full h-[238px] max-w-full p-8 rounded flex flex-col items-start justify-start border border-grey-300 bg-white dark:bg-grey-900" > -

+

OpenBB Bot

@@ -84,7 +84,7 @@ export default function Home(): JSX.Element {

See more diff --git a/website/src/theme/ColorModeToggle/index.js b/website/src/theme/ColorModeToggle/index.js index 6289c98c435..500f4bc85a7 100644 --- a/website/src/theme/ColorModeToggle/index.js +++ b/website/src/theme/ColorModeToggle/index.js @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect } from "react"; import clsx from "clsx"; import useIsBrowser from "@docusaurus/useIsBrowser"; import { translate } from "@docusaurus/Translate"; @@ -9,10 +9,12 @@ import { useLocation } from "@docusaurus/router"; import DiscordIcon from "@site/src/components/Icons/Discord"; import TelegramIcon from "@site/src/components/Icons/Telegram"; import Link from "@docusaurus/Link"; +import { useIFrameContext } from "../Root"; function ColorModeToggle({ className, value, onChange }) { + const { isIFrame } = useIFrameContext(); const { pathname } = useLocation(); - const showBotChange = - pathname.startsWith("/bot/discord") || pathname.startsWith("/bot/telegram"); + const showBotChange = false; //pathname.startsWith("/bot/discord") || pathname.startsWith("/bot/telegram"); + // this can be used later to switch between discord and telegram commands on bot const isDiscord = pathname.startsWith("/bot/discord"); const isBrowser = useIsBrowser(); const title = translate( @@ -37,6 +39,11 @@ function ColorModeToggle({ className, value, onChange }) { } ); const command = pathname.split("/").pop(); + useEffect(() => { + if (isIFrame) { + onChange("dark"); + } + }, []); return (

{showBotChange && ( diff --git a/website/src/theme/DocSidebarItem/Category/index.js b/website/src/theme/DocSidebarItem/Category/index.js index 460fa8795f7..18418fb9d9a 100644 --- a/website/src/theme/DocSidebarItem/Category/index.js +++ b/website/src/theme/DocSidebarItem/Category/index.js @@ -1,25 +1,26 @@ -import React, {useEffect, useMemo} from 'react'; -import clsx from 'clsx'; +import React, { useEffect, useMemo } from "react"; +import clsx from "clsx"; import { ThemeClassNames, useThemeConfig, usePrevious, Collapsible, useCollapsible, -} from '@docusaurus/theme-common'; +} from "@docusaurus/theme-common"; import { isActiveSidebarItem, findFirstCategoryLink, useDocSidebarItemsExpandedState, isSamePath, -} from '@docusaurus/theme-common/internal'; -import Link from '@docusaurus/Link'; -import {translate} from '@docusaurus/Translate'; -import useIsBrowser from '@docusaurus/useIsBrowser'; -import DocSidebarItems from '@theme/DocSidebarItems'; +} from "@docusaurus/theme-common/internal"; +import Link from "@docusaurus/Link"; +import { translate } from "@docusaurus/Translate"; +import useIsBrowser from "@docusaurus/useIsBrowser"; +import DocSidebarItems from "@theme/DocSidebarItems"; +import { useIFrameContext } from "../../Root"; // If we navigate to a category and it becomes active, it should automatically // expand itself -function useAutoExpandActiveCategory({isActive, collapsed, updateCollapsed}) { +function useAutoExpandActiveCategory({ isActive, collapsed, updateCollapsed }) { const wasActive = usePrevious(isActive); useEffect(() => { const justBecameActive = isActive && !wasActive; @@ -50,17 +51,17 @@ function useCategoryHrefWithSSRFallback(item) { return findFirstCategoryLink(item); }, [item, isBrowser]); } -function CollapseButton({categoryLabel, onClick}) { +function CollapseButton({ categoryLabel, onClick }) { return (