fix: trying new bg color (#4583)
* fix: trying new bg color * changes to docs from conf page * ref for bot * playing with ref cards - feel free to revert * update bot references * Update ReferenceCard.tsx * refactor doc generation files * Delete generate_index.py * feat: initial algoliacrawler * Update generate_sdk_markdown.py * new error page * fix: lot of bug fixes * deleting image * fix: improved light mode and not found page --------- Co-authored-by: andrewkenreich <andrew.kenreich@gmail.com> Co-authored-by: teh_coderer <me@tehcoderer.com>
@@ -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.
|
||||
- First release, no fixes.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
4
website/content/bot/index.md
vendored
@@ -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).
|
||||
|
||||
22
website/content/bot/installation/discord.md
vendored
Normal file
@@ -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.
|
||||
|
||||
<img src="https://openbb-assets.s3.amazonaws.com/docs/bot_docs/discord_step_1.png" alt="discord bot setup step 1" width="40%" height="40%" />
|
||||
|
||||
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.
|
||||
<img src="https://openbb-assets.s3.amazonaws.com/docs/bot_docs/discord_step_2.png" alt="discord bot setup step 2" width="40%" height="40%" />
|
||||
|
||||
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.
|
||||
<img src="https://openbb-assets.s3.amazonaws.com/docs/bot_docs/discord_step_3.png" alt="discord bot setup step 3" width="40%" height="40%" />
|
||||
|
||||
Congratulations! You’ve successfully added a bot to your Discord server.
|
||||
17
website/content/bot/installation/installation.md
vendored
Normal file
@@ -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.
|
||||
|
||||
<AddBotDialog
|
||||
/>
|
||||
|
||||
---
|
||||
24
website/content/bot/installation/telegram.md
vendored
Normal file
@@ -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.
|
||||
|
||||
<img src="https://openbb-assets.s3.amazonaws.com/docs/bot_docs/telegram_step_1.png" alt="telegram bot setup step 1" width="40%" height="40%" />
|
||||
|
||||
Go to your Telegram chat and click/tap on the Top Bar of the OpenBB Bot chat window.
|
||||
|
||||
<img src="https://openbb-assets.s3.amazonaws.com/docs/bot_docs/telegram_step_2.png" alt="telegram bot setup step 2" width="40%" height="40%" />
|
||||
|
||||
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:
|
||||
|
||||
<img src="https://openbb-assets.s3.amazonaws.com/docs/bot_docs/telegram_step_3.png" alt="telegram bot setup step 3" width="40%" height="40%" />
|
||||
|
||||
Now you can verify it has the permissions required, we recommend the ones already selected, and you are ready to go!
|
||||
|
||||
<img src="https://openbb-assets.s3.amazonaws.com/docs/bot_docs/telegram_step_4.png" alt="telegram bot setup step 4" width="40%" height="40%" />
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
---
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
---
|
||||
|
||||
|
||||
|
||||
23
website/content/terminal/installation/docker.md
vendored
@@ -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.<p></p>
|
||||
|
||||
<details><summary>Windows</summary>
|
||||
<Tabs>
|
||||
<TabItem value="Windows" label="Windows" default>
|
||||
|
||||
**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.
|
||||
</details>
|
||||
|
||||
<details><summary>MacOS</summary>
|
||||
</TabItem>
|
||||
|
||||
<TabItem value="MacOS" label="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.
|
||||
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Linux</summary>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="Linux" label="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 <FQDN/IP>`.
|
||||
|
||||
</details>
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
48
website/content/terminal/installation/index.md
vendored
Normal file
@@ -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";
|
||||
|
||||
<LinkCard
|
||||
title="Windows"
|
||||
description="Install the OpenBB Terminal via Windows (10 or greater)"
|
||||
url="/terminal/installation/windows"
|
||||
platform = "windows"
|
||||
/>
|
||||
<LinkCard
|
||||
title="MacOS"
|
||||
description="Install the OpenBB Terminal on MacOS (Big Sur or later)."
|
||||
url="/terminal/installation/macos"
|
||||
platform = "macos"
|
||||
/>
|
||||
<LinkCard
|
||||
title="Docker"
|
||||
description="Installing the OpenBB Terminal via Docker"
|
||||
url="/terminal/installation/docker"
|
||||
platform = "docker"
|
||||
/>
|
||||
<LinkCard
|
||||
title="Source"
|
||||
description="Install the OpenBB Terminal via Python"
|
||||
url="/terminal/installation/source"
|
||||
platform = "source"
|
||||
/>
|
||||
@@ -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"""<ReferenceCard
|
||||
title="{cmd["title"]}"
|
||||
description="{description}"
|
||||
|
||||
86
website/src/components/General/LinkCard.tsx
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
import clsx from "clsx";
|
||||
import React from "react";
|
||||
import ChevronRightIcon from "../Icons/ChevronRight";
|
||||
import Link from "@docusaurus/Link";
|
||||
import WindowsIcon from "../Icons/Windows";
|
||||
import DockerIcon from "../Icons/Docker";
|
||||
import AppleIcon from "../Icons/Apple";
|
||||
import SourceIcon from "../Icons/Source";
|
||||
import DiscordIcon from "../Icons/Discord";
|
||||
import TelegramIcon from "../Icons/Telegram";
|
||||
|
||||
interface CardProps {
|
||||
title: string;
|
||||
description: string;
|
||||
className?: string;
|
||||
type?: "terminal" | "sdk" | "bot";
|
||||
url: string;
|
||||
platform?: "windows" | "macos" | "source" | "docker" | "discord" | "telegram";
|
||||
}
|
||||
|
||||
export default function Card({
|
||||
title,
|
||||
description,
|
||||
className = "mb-8",
|
||||
type = "terminal",
|
||||
platform,
|
||||
url = "/"
|
||||
}: CardProps) {
|
||||
return (
|
||||
<Link
|
||||
className="flex !no-underline h-full p-2 items-center justify-between cursor-pointer relative w-2/4 rounded-t-lg"
|
||||
// className="flex !no-underline p-6 items-center cursor-pointer relative w-2/4 rounded-t-lg"
|
||||
to={url}
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
backgroundImage:
|
||||
type === "terminal"
|
||||
? "url('/img/terminal_bg.png')"
|
||||
: type === "sdk"
|
||||
? "url('/img/sdk_bg.png')"
|
||||
: "url('/img/bot_bg.png')",
|
||||
backgroundRepeat: "no-repeat",
|
||||
backgroundSize: "100% 130%",
|
||||
}}
|
||||
// <div className="flex h-6 w-full items-center justify-between rounded-t-lg border-b bg-grey-100 dark:bg-white px-4 md:h-8">
|
||||
// <div className="flex h-full items-center gap-x-2">
|
||||
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
|
||||
)}
|
||||
>
|
||||
<p className="uppercase tracking-widest font-bold text-lg inline-flex gap-4 h-2 items-center">
|
||||
{platform === "windows" && (
|
||||
<WindowsIcon className="w-4 h-4" />
|
||||
)}
|
||||
{platform === "macos" && (
|
||||
<AppleIcon className="w-4 h-4" />
|
||||
)}
|
||||
{platform === "source" && (
|
||||
<SourceIcon className="w-4 h-4" />
|
||||
)}
|
||||
{platform === "docker" && (
|
||||
<DockerIcon className="w-4 h-4" />
|
||||
)}
|
||||
{platform === "discord" && (
|
||||
<DiscordIcon className="w-4 h-4" />
|
||||
)}
|
||||
{platform === "telegram" && (
|
||||
<TelegramIcon className="w-4 h-4" />
|
||||
)}
|
||||
{title}
|
||||
</p>
|
||||
<p className="text-sm dark:text-grey-300">{description}</p>
|
||||
{false && (
|
||||
<p
|
||||
className={clsx("mt-auto inline-flex items-center gap-2 font-normal")}
|
||||
>
|
||||
See more
|
||||
<ChevronRightIcon className="group-hover:translate-x-2 tw-transition w-3" />
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
19
website/src/components/General/ReferenceCard.tsx
vendored
@@ -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 (
|
||||
<Link
|
||||
className="rounded border !no-underline border-grey-400 bg-black p-6 cursor-pointer relative overflow-hidden"
|
||||
className={clsx(
|
||||
"rounded border-2 !no-underline border-grey-600 p-6 cursor-pointer relative overflow-hidden hover:shadow-2xl hover:-translate-y-2 transform transition-all duration-300 ease-in-out font-bold shadow-2xl",
|
||||
{header_docs_terminal: pathname.startsWith("/terminal"),
|
||||
"bg-gradient-to-r from-[#541c12] to-[rgba(84, 29, 19, 1)]" : pathname.startsWith("/sdk"),
|
||||
"bg-gradient-to-r from-grey-800 to-purple-800" : pathname.startsWith("/bot"),
|
||||
header_docs:
|
||||
!pathname.startsWith("/terminal") &&
|
||||
!pathname.startsWith("/sdk") &&
|
||||
!pathname.startsWith("/bot"),
|
||||
}
|
||||
)}
|
||||
to={url}
|
||||
>
|
||||
<p className="font-bold text-lg my-0">{title}{something}</p>
|
||||
<div className="absolute top-0 right-0 left-0 bottom-0 bg-gradient-to-t from-black to-transparent"></div>
|
||||
<p className={"py-2 font-bold text-lg my-0"}>{title}{something}</p>
|
||||
{description ? (
|
||||
<p className="text-grey-200 text-xs mt-2 mb-0">{description}</p>
|
||||
) : null}
|
||||
|
||||
20
website/src/components/Icons/Apple.tsx
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import React, { SVGProps } from "react"
|
||||
interface SVGRProps {
|
||||
title?: string
|
||||
titleId?: string
|
||||
}
|
||||
|
||||
const AppleIcon = ({
|
||||
title,
|
||||
titleId,
|
||||
...props
|
||||
}: SVGProps<SVGSVGElement> & SVGRProps) => (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
|
||||
<path d="M11.182.008C11.148-.03 9.923.023 8.857 1.18c-1.066 1.156-.902 2.482-.878 2.516.024.034 1.52.087 2.475-1.258.955-1.345.762-2.391.728-2.43Zm3.314 11.733c-.048-.096-2.325-1.234-2.113-3.422.212-2.189 1.675-2.789 1.698-2.854.023-.065-.597-.79-1.254-1.157a3.692 3.692 0 0 0-1.563-.434c-.108-.003-.483-.095-1.254.116-.508.139-1.653.589-1.968.607-.316.018-1.256-.522-2.267-.665-.647-.125-1.333.131-1.824.328-.49.196-1.422.754-2.074 2.237-.652 1.482-.311 3.83-.067 4.56.244.729.625 1.924 1.273 2.796.576.984 1.34 1.667 1.659 1.899.319.232 1.219.386 1.843.067.502-.308 1.408-.485 1.766-.472.357.013 1.061.154 1.782.539.571.197 1.111.115 1.652-.105.541-.221 1.324-1.059 2.238-2.758.347-.79.505-1.217.473-1.282Z"/>
|
||||
</svg>
|
||||
)
|
||||
|
||||
export default AppleIcon
|
||||
|
||||
|
||||
|
||||
18
website/src/components/Icons/Docker.tsx
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import React, { SVGProps } from "react"
|
||||
interface SVGRProps {
|
||||
title?: string
|
||||
titleId?: string
|
||||
}
|
||||
|
||||
const DockerIcon = ({
|
||||
title,
|
||||
titleId,
|
||||
...props
|
||||
}: SVGProps<SVGSVGElement> & SVGRProps) => (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M21.81 10.25c-.06-.04-.56-.43-1.64-.43c-.28 0-.56.03-.84.08c-.21-1.4-1.38-2.11-1.43-2.14l-.29-.17l-.18.27c-.24.36-.43.77-.51 1.19c-.2.8-.08 1.56.33 2.21c-.49.28-1.29.35-1.46.35H2.62c-.34 0-.62.28-.62.63c0 1.15.18 2.3.58 3.38c.45 1.19 1.13 2.07 2 2.61c.98.6 2.59.94 4.42.94c.79 0 1.61-.07 2.42-.22c1.12-.2 2.2-.59 3.19-1.16A8.3 8.3 0 0 0 16.78 16c1.05-1.17 1.67-2.5 2.12-3.65h.19c1.14 0 1.85-.46 2.24-.85c.26-.24.45-.53.59-.87l.08-.24l-.19-.14m-17.96.99h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H3.85c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.43 0h1.76c.08 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16H6.28c-.09 0-.16.07-.16.16v1.58c.01.09.07.16.16.16m2.47 0h1.75c.1 0 .17-.07.17-.16V9.5c0-.08-.06-.16-.17-.16H8.75c-.08 0-.15.07-.15.16v1.58c0 .09.06.16.15.16m2.44 0h1.77c.08 0 .15-.07.15-.16V9.5c0-.08-.06-.16-.15-.16h-1.77c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16M6.28 9h1.76c.08 0 .16-.09.16-.18V7.25c0-.09-.07-.16-.16-.16H6.28c-.09 0-.16.06-.16.16v1.57c.01.09.07.18.16.18m2.47 0h1.75c.1 0 .17-.09.17-.18V7.25c0-.09-.06-.16-.17-.16H8.75c-.08 0-.15.06-.15.16v1.57c0 .09.06.18.15.18m2.44 0h1.77c.08 0 .15-.09.15-.18V7.25c0-.09-.07-.16-.15-.16h-1.77c-.08 0-.15.06-.15.16v1.57c0 .09.07.18.15.18m0-2.28h1.77c.08 0 .15-.07.15-.16V5c0-.1-.07-.17-.15-.17h-1.77c-.08 0-.15.06-.15.17v1.56c0 .08.07.16.15.16m2.46 4.52h1.76c.09 0 .16-.07.16-.16V9.5c0-.08-.07-.16-.16-.16h-1.76c-.08 0-.15.07-.15.16v1.58c0 .09.07.16.15.16"/></svg>
|
||||
)
|
||||
|
||||
export default DockerIcon
|
||||
|
||||
|
||||
|
||||
18
website/src/components/Icons/Source.tsx
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import React, { SVGProps } from "react"
|
||||
interface SVGRProps {
|
||||
title?: string
|
||||
titleId?: string
|
||||
}
|
||||
|
||||
const SourceIcon = ({
|
||||
title,
|
||||
titleId,
|
||||
...props
|
||||
}: SVGProps<SVGSVGElement> & SVGRProps) => (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19.14 7.5A2.86 2.86 0 0 1 22 10.36v3.78A2.86 2.86 0 0 1 19.14 17H12c0 .39.32.96.71.96H17v1.68a2.86 2.86 0 0 1-2.86 2.86H9.86A2.86 2.86 0 0 1 7 19.64v-3.75a2.85 2.85 0 0 1 2.86-2.85h5.25a2.85 2.85 0 0 0 2.85-2.86V7.5h1.18m-4.28 11.79c-.4 0-.72.3-.72.89c0 .59.32.71.72.71a.71.71 0 0 0 .71-.71c0-.59-.32-.89-.71-.89m-10-1.79A2.86 2.86 0 0 1 2 14.64v-3.78A2.86 2.86 0 0 1 4.86 8H12c0-.39-.32-.96-.71-.96H7V5.36A2.86 2.86 0 0 1 9.86 2.5h4.28A2.86 2.86 0 0 1 17 5.36v3.75a2.85 2.85 0 0 1-2.86 2.85H8.89a2.85 2.85 0 0 0-2.85 2.86v2.68H4.86M9.14 5.71c.4 0 .72-.3.72-.89c0-.59-.32-.71-.72-.71c-.39 0-.71.12-.71.71s.32.89.71.89Z"/></svg>
|
||||
)
|
||||
|
||||
export default SourceIcon
|
||||
|
||||
|
||||
|
||||
31
website/src/components/Icons/Windows.tsx
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
import React, { SVGProps } from "react"
|
||||
interface SVGRProps {
|
||||
title?: string
|
||||
titleId?: string
|
||||
}
|
||||
|
||||
const WindowsIcon = ({
|
||||
title,
|
||||
titleId,
|
||||
...props
|
||||
}: SVGProps<SVGSVGElement> & SVGRProps) => (
|
||||
<svg
|
||||
viewBox="0 0 88 88"
|
||||
width={16}
|
||||
height={12}
|
||||
fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
aria-labelledby={titleId}
|
||||
{...props}
|
||||
>
|
||||
{title ? <title id={titleId}>{title}</title> : null}
|
||||
<path d="m0 12.402 35.687-4.86.016 34.423-35.67.203zm35.67 33.529.028 34.453L.028 75.48.026 45.7zm4.326-39.025L87.314 0v41.527l-47.318.376zm47.329 39.349-.011 41.34-47.318-6.678-.066-34.739z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
</svg>
|
||||
)
|
||||
|
||||
export default WindowsIcon
|
||||
|
||||
|
||||
|
||||
11
website/src/css/custom.css
vendored
@@ -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;
|
||||
}
|
||||
|
||||
18
website/src/pages/index.tsx
vendored
@@ -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"
|
||||
>
|
||||
<h3 className="uppercase tracking-widest font-bold text-l mb-3">
|
||||
<h3 className="uppercase tracking-widest font-bold mb-3">
|
||||
OpenBB Terminal
|
||||
</h3>
|
||||
<p className="text-sm lg:text-base dark:text-grey-300">
|
||||
@@ -39,7 +39,7 @@ export default function Home(): JSX.Element {
|
||||
</p>
|
||||
<p
|
||||
className={clsx(
|
||||
"mt-auto inline-flex items-center gap-2 font-normal"
|
||||
"mt-auto inline-flex items-center gap-2 font-normal text-sm"
|
||||
)}
|
||||
>
|
||||
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"
|
||||
>
|
||||
<h3 className="uppercase tracking-widest font-bold text-l mb-3">
|
||||
<h3 className="uppercase tracking-widest font-bold mb-3">
|
||||
OpenBB SDK
|
||||
</h3>
|
||||
<p className="text-sm lg:text-base dark:text-grey-300">
|
||||
@@ -61,7 +61,7 @@ export default function Home(): JSX.Element {
|
||||
</p>
|
||||
<p
|
||||
className={clsx(
|
||||
"mt-auto inline-flex items-center gap-2 font-normal"
|
||||
"mt-auto inline-flex items-center gap-2 font-normal text-sm"
|
||||
)}
|
||||
>
|
||||
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"
|
||||
>
|
||||
<h3 className="uppercase tracking-widest font-bold text-l mb-3">
|
||||
<h3 className="uppercase tracking-widest font-bold mb-3">
|
||||
OpenBB Bot
|
||||
</h3>
|
||||
<p className="text-sm lg:text-base dark:text-grey-300">
|
||||
@@ -84,7 +84,7 @@ export default function Home(): JSX.Element {
|
||||
</p>
|
||||
<p
|
||||
className={clsx(
|
||||
"mt-auto inline-flex items-center gap-2 font-normal"
|
||||
"mt-auto inline-flex items-center gap-2 font-normal text-sm"
|
||||
)}
|
||||
>
|
||||
See more
|
||||
|
||||
13
website/src/theme/ColorModeToggle/index.js
vendored
@@ -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 (
|
||||
<div className="flex gap-4 mr-12 md:mr-0 ml-4">
|
||||
{showBotChange && (
|
||||
|
||||
@@ -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 (
|
||||
<button
|
||||
aria-label={translate(
|
||||
{
|
||||
id: 'theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel',
|
||||
id: "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",
|
||||
message: "Toggle the collapsible sidebar category '{label}'",
|
||||
description:
|
||||
'The ARIA label to toggle the collapsible sidebar category',
|
||||
"The ARIA label to toggle the collapsible sidebar category",
|
||||
},
|
||||
{label: categoryLabel},
|
||||
{ label: categoryLabel }
|
||||
)}
|
||||
type="button"
|
||||
className="clean-btn menu__caret"
|
||||
@@ -76,16 +77,16 @@ export default function DocSidebarItemCategory({
|
||||
index,
|
||||
...props
|
||||
}) {
|
||||
const {items, label, collapsible, className, href} = item;
|
||||
const { items, label, collapsible, className, href } = item;
|
||||
const {
|
||||
docs: {
|
||||
sidebar: {autoCollapseCategories},
|
||||
sidebar: { autoCollapseCategories },
|
||||
},
|
||||
} = useThemeConfig();
|
||||
const hrefWithSSRFallback = useCategoryHrefWithSSRFallback(item);
|
||||
const isActive = isActiveSidebarItem(item, activePath);
|
||||
const isCurrentPage = isSamePath(href, activePath);
|
||||
const {collapsed, setCollapsed} = useCollapsible({
|
||||
const { collapsed, setCollapsed } = useCollapsible({
|
||||
// Active categories are always initialized as expanded. The default
|
||||
// (`item.collapsed`) is only used for non-active categories.
|
||||
initialState: () => {
|
||||
@@ -95,13 +96,13 @@ export default function DocSidebarItemCategory({
|
||||
return isActive ? false : item.collapsed;
|
||||
},
|
||||
});
|
||||
const {expandedItem, setExpandedItem} = useDocSidebarItemsExpandedState();
|
||||
const { expandedItem, setExpandedItem } = useDocSidebarItemsExpandedState();
|
||||
// Use this instead of `setCollapsed`, because it is also reactive
|
||||
const updateCollapsed = (toCollapsed = !collapsed) => {
|
||||
setExpandedItem(toCollapsed ? null : index);
|
||||
setCollapsed(toCollapsed);
|
||||
};
|
||||
useAutoExpandActiveCategory({isActive, collapsed, updateCollapsed});
|
||||
useAutoExpandActiveCategory({ isActive, collapsed, updateCollapsed });
|
||||
useEffect(() => {
|
||||
if (
|
||||
collapsible &&
|
||||
@@ -112,30 +113,39 @@ export default function DocSidebarItemCategory({
|
||||
setCollapsed(true);
|
||||
}
|
||||
}, [collapsible, expandedItem, index, setCollapsed, autoCollapseCategories]);
|
||||
const { isIFrame } = useIFrameContext();
|
||||
const dontShowLink =
|
||||
isIFrame && ["OpenBB Terminal", "OpenBB SDK", "OpenBB Bot"].includes(label);
|
||||
|
||||
return (
|
||||
<li
|
||||
className={clsx(
|
||||
ThemeClassNames.docs.docSidebarItemCategory,
|
||||
ThemeClassNames.docs.docSidebarItemCategoryLevel(level),
|
||||
'menu__list-item',
|
||||
"menu__list-item",
|
||||
{
|
||||
'menu__list-item--collapsed': collapsed,
|
||||
"menu__list-item--collapsed": collapsed,
|
||||
},
|
||||
className,
|
||||
)}>
|
||||
className
|
||||
)}
|
||||
>
|
||||
<div
|
||||
className={clsx('menu__list-item-collapsible', {
|
||||
'menu__list-item-collapsible--active': isCurrentPage,
|
||||
})}>
|
||||
className={clsx("menu__list-item-collapsible", {
|
||||
"menu__list-item-collapsible--active": isCurrentPage,
|
||||
})}
|
||||
>
|
||||
<Link
|
||||
className={clsx('menu__link', {
|
||||
'menu__link--sublist': collapsible,
|
||||
'menu__link--sublist-caret': !href && collapsible,
|
||||
'menu__link--active': isActive,
|
||||
className={clsx("menu__link", {
|
||||
"menu__link--sublist": collapsible,
|
||||
"menu__link--sublist-caret": !href && collapsible,
|
||||
"menu__link--active": isActive,
|
||||
})}
|
||||
onClick={
|
||||
collapsible
|
||||
? (e) => {
|
||||
if (dontShowLink) {
|
||||
e.preventDefault();
|
||||
}
|
||||
onItemClick?.(item);
|
||||
if (href) {
|
||||
updateCollapsed(false);
|
||||
@@ -145,13 +155,17 @@ export default function DocSidebarItemCategory({
|
||||
}
|
||||
}
|
||||
: () => {
|
||||
if (dontShowLink) {
|
||||
e.preventDefault();
|
||||
}
|
||||
onItemClick?.(item);
|
||||
}
|
||||
}
|
||||
aria-current={isCurrentPage ? 'page' : undefined}
|
||||
aria-current={isCurrentPage ? "page" : undefined}
|
||||
aria-expanded={collapsible ? !collapsed : undefined}
|
||||
href={collapsible ? hrefWithSSRFallback ?? '#' : hrefWithSSRFallback}
|
||||
{...props}>
|
||||
href={collapsible ? hrefWithSSRFallback ?? "#" : hrefWithSSRFallback}
|
||||
{...props}
|
||||
>
|
||||
{label}
|
||||
</Link>
|
||||
{href && collapsible && (
|
||||
|
||||
4
website/src/theme/Footer/index.js
vendored
@@ -46,7 +46,7 @@ function Footer() {
|
||||
}
|
||||
|
||||
return (
|
||||
<footer className="px-4 border-t dark:border-grey-600/50 lg:px-12 py-14 bg-white dark:bg-grey-900 z-10 overflow-hidden">
|
||||
<footer className="px-4 border-t dark:border-grey-600/50 lg:px-12 py-14 bg-white dark:bg-grey-850 z-10 overflow-hidden">
|
||||
<div className="flex w-full flex-col justify-between gap-10 md:flex-row md:items-start">
|
||||
<div className="ml-2 mb-2 space-y-10 md:m-0">
|
||||
<Link
|
||||
@@ -69,7 +69,7 @@ function Footer() {
|
||||
/>
|
||||
Star us
|
||||
</span>
|
||||
<span className="inline-flex w-[40%] items-center justify-center rounded-r-md bg-grey-900 text-grey-500">
|
||||
<span className="inline-flex w-[40%] items-center justify-center rounded-r-md bg-grey-850 text-grey-200">
|
||||
{nFormatter(stars, 1) ?? "12.5k"}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
2
website/src/theme/Navbar/Logo/index.js
vendored
@@ -15,7 +15,7 @@ function getLogo(type) {
|
||||
case "bot":
|
||||
return <BotLetteringLogo />;
|
||||
default:
|
||||
return <LetteringLogo />;
|
||||
return <LetteringLogo className="text-white" />;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
105
website/src/theme/NotFound.js
vendored
@@ -1,70 +1,49 @@
|
||||
import React from "react";
|
||||
import Translate, { translate } from "@docusaurus/Translate";
|
||||
import { PageMetadata } from "@docusaurus/theme-common";
|
||||
import LetteringLogo from "@site/src/components/Icons/LetteringLogo";
|
||||
import Layout from "@theme/Layout";
|
||||
import Link from "@docusaurus/Link";
|
||||
import DarkBlueRadialGradient from "../components/Icons/RadialGradients/DarkBlue";
|
||||
import RubyRedRadialGradient from "../components/Icons/RadialGradients/RubyRed";
|
||||
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<>
|
||||
<PageMetadata
|
||||
title={translate({
|
||||
id: "theme.NotFound.title",
|
||||
message: "Page Not Found",
|
||||
})}
|
||||
/>
|
||||
<Layout>
|
||||
<main className="container margin-vert--xl mb-20">
|
||||
<div className="row">
|
||||
<div className="col col--6 col--offset-3">
|
||||
<h1 className="mt-10 !text-[32px] uppercase font-bold tracking-widest">
|
||||
<Translate
|
||||
id="theme.NotFound.title"
|
||||
description="The title of the 404 page"
|
||||
>
|
||||
Page Not Found
|
||||
</Translate>
|
||||
</h1>
|
||||
<p className="mt-6 mb-2">
|
||||
We could not find what you were looking for.
|
||||
</p>
|
||||
<p>
|
||||
We recently moved our documentation to a new location and some
|
||||
links may be broken. Popular links are listed below:
|
||||
</p>
|
||||
<ul className="space-y-1 max-w-md list-disc list-inside mt-4">
|
||||
<li>
|
||||
<a href="/">Homepage</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/sdk">Terminal Documentation</a>
|
||||
<ul className="space-y-1 max-w-md list-disc ml-4 mt-2 mb-3 list-inside">
|
||||
<li>
|
||||
<a href="/terminal/quickstart/installation">
|
||||
Terminal Installation
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/terminal/reference">Terminal Reference</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/sdk">SDK Documentation</a>
|
||||
<ul className="space-y-1 max-w-md list-disc ml-4 mt-2 mb-3 list-inside">
|
||||
<li>
|
||||
<a href="/sdk/quickstart/installation">
|
||||
SDK Installation
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/sdk/reference">SDK Reference</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<Layout title="404 | OpenBB Docs">
|
||||
<div className="flex flex-col items-center justify-center my-auto p-10 relative overflow-hidden min-h-[60vh] 2xl:min-h-[70vh]">
|
||||
<DarkBlueRadialGradient className="absolute opacity-40 -left-[1000px] w-[1600px] h-[1600px] lg:-left-[1000px] lg:opacity-40 -top-20 xl:-top-60 xl:-left-[800px] 2xl:opacity-50" />
|
||||
<RubyRedRadialGradient className="absolute opacity-40 -right-[1000px] w-[1600px] h-[1600px] lg:-right-[1000px] lg:opacity-40 -top-20 xl:-top-60 xl:-right-[800px] 2xl:opacity-50" />
|
||||
|
||||
<img
|
||||
src="img/404.png"
|
||||
className="shadow-none"
|
||||
width={612}
|
||||
height={271}
|
||||
alt="not found"
|
||||
/>
|
||||
<div className="mt-8 flex-center flex-col gap-0">
|
||||
<h1 className="uppercase text-center tracking-widest font-bold text-2xl">
|
||||
OOPS! PAGE NOT FOUND!
|
||||
</h1>
|
||||
<p className="text-center text-xl mt-6">
|
||||
Sorry the page you’re looking for doesn’t exist.
|
||||
<br />
|
||||
If you think something is broken, please report a problem.
|
||||
</p>
|
||||
<div className="flex flex-col md:flex-row gap-6 mt-10 justify-center w-full">
|
||||
<Link to="/" className="_btn">
|
||||
Return Home
|
||||
</Link>
|
||||
<a
|
||||
// TODO - add link to report problem
|
||||
href="https://openbb.co/support"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="_btn-secondary"
|
||||
>
|
||||
Report problem
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
</Layout>
|
||||
</>
|
||||
</div>
|
||||
</div>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
||||
2
website/src/theme/SearchBar/index.js
vendored
@@ -189,7 +189,7 @@ export default function SearchBar() {
|
||||
<div className="flex gap-2">
|
||||
<DocSearch {...siteConfig.themeConfig.algolia} />
|
||||
{!isIFrame && (
|
||||
<a href="https://my.openbb.co/" className="_btn text-xs">
|
||||
<a href="https://my.openbb.co/" className="_btn-dark text-xs">
|
||||
Visit hub
|
||||
</a>
|
||||
)}
|
||||
|
||||
BIN
website/static/img/404.png
vendored
Normal file
|
After Width: | Height: | Size: 426 KiB |
BIN
website/static/img/bot_bg_light.png
vendored
Normal file
|
After Width: | Height: | Size: 705 KiB |
BIN
website/static/img/sdk_bg_light.png
vendored
|
Before Width: | Height: | Size: 916 KiB After Width: | Height: | Size: 675 KiB |
BIN
website/static/img/sdk_bot_light.png
vendored
|
Before Width: | Height: | Size: 1008 KiB |
BIN
website/static/img/terminal_bg_light.png
vendored
|
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 1000 KiB |
88
website/utils/initialAlgoliaCrawler.js
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
new Crawler({
|
||||
rateLimit: 8,
|
||||
maxDepth: 10,
|
||||
startUrls: ["https://docs.openbb.co/"],
|
||||
sitemaps: [],
|
||||
ignoreCanonicalTo: false,
|
||||
discoveryPatterns: ["https://docs.openbb.co/**"],
|
||||
schedule: "at 1:44 PM on Friday",
|
||||
actions: [
|
||||
{
|
||||
indexName: "openbbterminal",
|
||||
pathsToMatch: ["https://docs.openbb.co/**"],
|
||||
recordExtractor: ({ helpers }) => {
|
||||
return helpers.docsearch({
|
||||
recordProps: {
|
||||
lvl1: ["header h1", "article h1", "main h1", "h1", "head > title"],
|
||||
content: ["article p, article li", "main p, main li", "p, li"],
|
||||
lvl0: {
|
||||
selectors: "",
|
||||
defaultValue: "Documentation",
|
||||
},
|
||||
lvl2: ["article h2", "main h2", "h2"],
|
||||
lvl3: ["article h3", "main h3", "h3"],
|
||||
lvl4: ["article h4", "main h4", "h4"],
|
||||
lvl5: ["article h5", "main h5", "h5"],
|
||||
lvl6: ["article h6", "main h6", "h6"],
|
||||
},
|
||||
aggregateContent: true,
|
||||
recordVersion: "v3",
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
initialIndexSettings: {
|
||||
openbbterminal: {
|
||||
attributesForFaceting: ["type", "lang"],
|
||||
attributesToRetrieve: [
|
||||
"hierarchy",
|
||||
"content",
|
||||
"anchor",
|
||||
"url",
|
||||
"url_without_anchor",
|
||||
"type",
|
||||
],
|
||||
attributesToHighlight: ["hierarchy", "content"],
|
||||
attributesToSnippet: ["content:10"],
|
||||
camelCaseAttributes: ["hierarchy", "content"],
|
||||
searchableAttributes: [
|
||||
"unordered(hierarchy.lvl0)",
|
||||
"unordered(hierarchy.lvl1)",
|
||||
"unordered(hierarchy.lvl2)",
|
||||
"unordered(hierarchy.lvl3)",
|
||||
"unordered(hierarchy.lvl4)",
|
||||
"unordered(hierarchy.lvl5)",
|
||||
"unordered(hierarchy.lvl6)",
|
||||
"content",
|
||||
],
|
||||
distinct: true,
|
||||
attributeForDistinct: "url",
|
||||
customRanking: [
|
||||
"desc(weight.pageRank)",
|
||||
"desc(weight.level)",
|
||||
"asc(weight.position)",
|
||||
],
|
||||
ranking: [
|
||||
"words",
|
||||
"filters",
|
||||
"typo",
|
||||
"attribute",
|
||||
"proximity",
|
||||
"exact",
|
||||
"custom",
|
||||
],
|
||||
highlightPreTag: '<span class="algolia-docsearch-suggestion--highlight">',
|
||||
highlightPostTag: "</span>",
|
||||
minWordSizefor1Typo: 3,
|
||||
minWordSizefor2Typos: 7,
|
||||
allowTyposOnNumericTokens: false,
|
||||
minProximity: 1,
|
||||
ignorePlurals: true,
|
||||
advancedSyntax: true,
|
||||
attributeCriteriaComputedByMinProximity: true,
|
||||
removeWordsIfNoResults: "allOptional",
|
||||
},
|
||||
},
|
||||
appId: "",
|
||||
apiKey: "",
|
||||
});
|
||||