From 6d5833e372fa7c38f28f4732143256deafc54980 Mon Sep 17 00:00:00 2001 From: DidierRLopes Date: Tue, 14 Nov 2023 02:17:22 -0800 Subject: [PATCH] Cool cards (#5727) * tidy up terminal/content * some more tidy up * fix styling for platform that was missing * more tidy up * improve color for dark and light mode * create new reference card for more basic cards * rename back to menus * implement all index.md for terminal, except reference * improve bot title * more refactoring * fix remaining index * header styling * more styling --- website/content/bot/changelog/index.mdx | 81 +++++------ website/content/bot/faqs.md | 2 - website/content/bot/index.mdx | 27 ---- website/content/bot/installation/discord.md | 2 +- .../installation/{overview.md => index.md} | 2 +- website/content/bot/installation/index.mdx | 22 --- website/content/bot/installation/telegram.md | 2 +- .../customizing/{overview.md => index.md} | 5 +- .../content/bot/usage/customizing/index.mdx | 22 --- website/content/bot/usage/index.mdx | 32 +++-- website/content/generate_index.py | 37 +++-- .../{introduction.md => index.md} | 0 .../content/platform/contributing/index.mdx | 32 ----- .../platform/data_models/_category_.json | 4 + website/content/platform/faqs/_category_.json | 1 - website/content/platform/faqs/index.md | 31 ----- website/content/platform/index.mdx | 32 ----- website/content/platform/showcase.md | 27 ---- .../platform/usage/{overview.md => index.md} | 0 website/content/platform/usage/index.mdx | 27 ---- .../sdk/data-available/crypto/_category_.json | 3 +- .../crypto/{introduction.md => index.md} | 4 +- website/content/sdk/data-available/index.mdx | 100 +++++++------- .../data-available/portfolio/_category_.json | 3 +- .../portfolio/{introduction.md => index.md} | 4 +- .../sdk/data-available/stocks/_category_.json | 3 +- .../stocks/{introduction.md => index.md} | 2 +- .../content/sdk/faqs/bugs_support_feedback.md | 2 - website/content/sdk/faqs/data_sources.md | 3 - website/content/sdk/faqs/developer_issues.md | 2 - website/content/sdk/faqs/import_errors.md | 2 - website/content/sdk/faqs/index.mdx | 58 ++++---- .../content/sdk/faqs/installation_updates.md | 2 - website/content/sdk/usage/index.mdx | 26 ++-- website/content/terminal/changelog/index.mdx | 127 ++++++++---------- website/content/terminal/faqs/index.mdx | 58 ++++---- website/content/terminal/index.mdx | 37 ----- .../content/terminal/installation/index.mdx | 44 +++--- .../content/terminal/menus/_category_.json | 2 +- .../terminal/menus/common/_category_.json | 3 +- .../content/terminal/menus/common/common.md | 23 ---- .../content/terminal/menus/common/index.mdx | 23 ++-- .../terminal/menus/crypto/_category_.json | 3 +- .../crypto/{introduction.md => index.md} | 0 .../content/terminal/menus/crypto/index.mdx | 42 ------ website/content/terminal/menus/index.mdx | 85 +++++++++--- .../terminal/menus/stocks/_category_.json | 3 +- .../stocks/{introduction.md => index.md} | 0 .../content/terminal/menus/stocks/index.mdx | 62 --------- website/content/terminal/usage/data/index.mdx | 32 +++-- website/content/terminal/usage/index.mdx | 65 +++++---- .../terminal/usage/outputs/_category_.json | 2 +- .../content/terminal/usage/outputs/index.mdx | 32 +++-- .../content/terminal/usage/overview/index.mdx | 32 +++-- .../content/terminal/usage/routines/index.mdx | 52 +++---- .../components/General/NewReferenceCard.tsx | 51 +++++++ website/src/theme/ColorModeToggle/index.js | 10 +- website/src/theme/Navbar/Content/index.js | 2 +- website/src/theme/Navbar/Layout/index.js | 48 +++++-- website/src/theme/Navbar/Logo/index.js | 9 +- website/src/theme/Tabs/index.js | 4 + 61 files changed, 624 insertions(+), 829 deletions(-) delete mode 100644 website/content/bot/index.mdx rename website/content/bot/installation/{overview.md => index.md} (98%) delete mode 100644 website/content/bot/installation/index.mdx rename website/content/bot/usage/customizing/{overview.md => index.md} (94%) delete mode 100644 website/content/bot/usage/customizing/index.mdx rename website/content/platform/contributing/{introduction.md => index.md} (100%) delete mode 100644 website/content/platform/contributing/index.mdx create mode 100644 website/content/platform/data_models/_category_.json delete mode 100644 website/content/platform/faqs/_category_.json delete mode 100644 website/content/platform/faqs/index.md delete mode 100644 website/content/platform/index.mdx delete mode 100644 website/content/platform/showcase.md rename website/content/platform/usage/{overview.md => index.md} (100%) delete mode 100644 website/content/platform/usage/index.mdx rename website/content/sdk/data-available/crypto/{introduction.md => index.md} (99%) rename website/content/sdk/data-available/portfolio/{introduction.md => index.md} (99%) rename website/content/sdk/data-available/stocks/{introduction.md => index.md} (99%) delete mode 100644 website/content/terminal/index.mdx delete mode 100644 website/content/terminal/menus/common/common.md rename website/content/terminal/menus/crypto/{introduction.md => index.md} (100%) delete mode 100644 website/content/terminal/menus/crypto/index.mdx rename website/content/terminal/menus/stocks/{introduction.md => index.md} (100%) delete mode 100644 website/content/terminal/menus/stocks/index.mdx create mode 100644 website/src/components/General/NewReferenceCard.tsx diff --git a/website/content/bot/changelog/index.mdx b/website/content/bot/changelog/index.mdx index 09d847c91c8d..5b097fc5ee79 100644 --- a/website/content/bot/changelog/index.mdx +++ b/website/content/bot/changelog/index.mdx @@ -1,57 +1,50 @@ -# changelog +--- +title: Changelog +--- +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -import ReferenceCard from "@site/src/components/General/ReferenceCard"; + - diff --git a/website/content/bot/faqs.md b/website/content/bot/faqs.md index 3fe16bbf4199..f2b1a07d40f5 100644 --- a/website/content/bot/faqs.md +++ b/website/content/bot/faqs.md @@ -24,8 +24,6 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -## Generic -
How Do I Link My OpenBB Bot Account? After you signup for an OpenBB Bot plan you can link your accounts from here diff --git a/website/content/bot/index.mdx b/website/content/bot/index.mdx deleted file mode 100644 index 08dce815d0f8..000000000000 --- a/website/content/bot/index.mdx +++ /dev/null @@ -1,27 +0,0 @@ -# OpenBB Bot Reference - -import ReferenceCard from "@site/src/components/General/ReferenceCard"; - -
    - - - - - -
diff --git a/website/content/bot/installation/discord.md b/website/content/bot/installation/discord.md index 1e389dd673e8..a4da8dfa579d 100644 --- a/website/content/bot/installation/discord.md +++ b/website/content/bot/installation/discord.md @@ -1,5 +1,5 @@ --- -title: Setting up Discord bot +title: Discord bot sidebar_position: 2 description: This page guides you on how to add a bot to your Discord server, through steps of login, bot authorization, and adjusting bot permissions. diff --git a/website/content/bot/installation/overview.md b/website/content/bot/installation/index.md similarity index 98% rename from website/content/bot/installation/overview.md rename to website/content/bot/installation/index.md index 3ba49bea3c24..425b9e36b188 100644 --- a/website/content/bot/installation/overview.md +++ b/website/content/bot/installation/index.md @@ -1,5 +1,5 @@ --- -title: Overview +title: Installation sidebar_position: 1 description: Learn how to use OpenBB Bot in Discord and Telegram. Understand the requirements for individual and server uses, and explore additional features by linking your diff --git a/website/content/bot/installation/index.mdx b/website/content/bot/installation/index.mdx deleted file mode 100644 index cfef3f075367..000000000000 --- a/website/content/bot/installation/index.mdx +++ /dev/null @@ -1,22 +0,0 @@ -# installation - -import ReferenceCard from "@site/src/components/General/ReferenceCard"; - -
    - - - - -
diff --git a/website/content/bot/installation/telegram.md b/website/content/bot/installation/telegram.md index 00e10176bac4..6f17f836c8bc 100644 --- a/website/content/bot/installation/telegram.md +++ b/website/content/bot/installation/telegram.md @@ -1,5 +1,5 @@ --- -title: Setting up Telegram bot +title: Telegram bot sidebar_position: 3 description: Step-by-step guide to add the OpenBB Bot to a Telegram group. From starting a chat with the bot to verifying its permissions, follow these steps to have your diff --git a/website/content/bot/usage/customizing/overview.md b/website/content/bot/usage/customizing/index.md similarity index 94% rename from website/content/bot/usage/customizing/overview.md rename to website/content/bot/usage/customizing/index.md index fc35dc706abf..5dfe2d97c878 100644 --- a/website/content/bot/usage/customizing/overview.md +++ b/website/content/bot/usage/customizing/index.md @@ -1,5 +1,5 @@ --- -title: Overview +title: Customization sidebar_position: 1 description: A guide to OpenBB Bot settings customization, including chart themes, alerts, autoposting, and more. Learn how to link your account and start personalizing @@ -18,10 +18,9 @@ keywords: import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - + For the best user experience, you will want to customize the OpenBB Bot settings. Different types of customizations we offer are: -
  • diff --git a/website/content/bot/usage/customizing/index.mdx b/website/content/bot/usage/customizing/index.mdx deleted file mode 100644 index 0eb07dd9dd42..000000000000 --- a/website/content/bot/usage/customizing/index.mdx +++ /dev/null @@ -1,22 +0,0 @@ -# customizing - -import ReferenceCard from "@site/src/components/General/ReferenceCard"; - -
      - - - - -
    diff --git a/website/content/bot/usage/index.mdx b/website/content/bot/usage/index.mdx index 7f5f19ab5158..271d4cffeaa2 100644 --- a/website/content/bot/usage/index.mdx +++ b/website/content/bot/usage/index.mdx @@ -1,22 +1,26 @@ -# usage +--- +title: Usage +--- -import ReferenceCard from "@site/src/components/General/ReferenceCard"; +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -
      + - - + - +
    diff --git a/website/content/generate_index.py b/website/content/generate_index.py index d7ff0a4e8332..06e6119511af 100644 --- a/website/content/generate_index.py +++ b/website/content/generate_index.py @@ -3,17 +3,22 @@ from textwrap import shorten from typing import Dict, List +# Importing the ReferenceCard component for use in the generated index reference_import = """import ReferenceCard from "@site/src/components/General/ReferenceCard";
      """ +# Setting the encoding and newline character for file writing wopen_kwargs = {"encoding": "utf-8", "newline": "\n"} +# Function to create command cards for each command in the provided list def create_cmd_cards(cmd_text: List[Dict[str, str]], url: str) -> str: _cmd_cards = "" for cmd in cmd_text: + # Shortening the description to fit within the card cmd["description"] = shorten(f"{cmd['description']}", 116, placeholder="...") + # Adding the command card to the list _cmd_cards += f""" str: return _cmd_cards +# Function to create a card for each subfolder in the provided folder def create_nested_subfolder_card(_folder: Path, url: str) -> str: + # Creating a list of all markdown files in the subfolder nested_card = f""" str: return nested_card -for bot in [ +# Looping through each topfolder to generate the index +for topfolder in [ "terminal", "platform", "bot", "terminal/usage", "terminal/menus", ]: - for folder in (Path(__file__).parent / bot).iterdir(): - rel_path = folder.relative_to(Path(__file__).parent / bot) + # Looping through each folder in the fold directory + for folder in (Path(__file__).parent / topfolder).iterdir(): + rel_path = folder.relative_to(Path(__file__).parent / topfolder) cmd_cards: List[Dict[str, str]] = [] print(rel_path) print(cmd_cards) + # Looping through each markdown file in the folder for file in folder.glob("*.md*"): if file.stem == "index": continue + # Regex to extract the description from the file desc_regex = re.compile(r"^---(.*?)---", re.DOTALL | re.MULTILINE) description = desc_regex.search(file.read_text(encoding="utf-8")).group(1).strip() # type: ignore + # Regex to extract the title and description from the description pattern = re.compile(r"^(title|description):\s*(.*)$", re.MULTILINE) # Find all matches in the text @@ -66,37 +78,44 @@ def create_nested_subfolder_card(_folder: Path, url: str) -> str: elif key == "description": description = value.strip() + # Creating a dictionary for the command cmd_dict = dict( name=title, description=description, - url=f"{bot}/{rel_path}", + url=f"{topfolder}/{rel_path}", ) + # Adding the command to the list of commands cmd_cards.append(cmd_dict) if not cmd_cards: continue + # Writing the index for the subfolder with open( - Path(__file__).parent / bot / rel_path / "index.mdx", "w", **wopen_kwargs # type: ignore + Path(__file__).parent / topfolder / rel_path / "index.mdx", "w", **wopen_kwargs # type: ignore ) as subindex: subindex.write(f"# {folder.name}\n\n{reference_import}\n") + # Writing a card for each subfolder in the folder for subfolder in folder.glob("*"): if not subfolder.is_dir(): continue subindex.write(create_nested_subfolder_card(subfolder, f"{rel_path}")) print(cmd_cards) + # Writing the command cards to the index subindex.write(create_cmd_cards(cmd_cards, f'{"/".join(rel_path.parts)}')) subindex.write("
    \n") - with open(Path(__file__).parent / bot / "index.mdx", "w", **wopen_kwargs) as index: # type: ignore - index.write(f"# OpenBB {bot.title()} Reference\n\n{reference_import}\n") + # Writing the main index for the topfolder + with open(Path(__file__).parent / topfolder / "index.mdx", "w", **wopen_kwargs) as index: # type: ignore + index.write(f"# OpenBB {topfolder.title()} Reference\n\n{reference_import}\n") - for folder in (Path(__file__).parent / bot).glob("*"): + # Writing a card for each folder in the bot directory + for folder in (Path(__file__).parent / topfolder).glob("*"): if not folder.is_dir(): continue - index.write(create_nested_subfolder_card(folder, bot)) + index.write(create_nested_subfolder_card(folder, topfolder)) index.write("
\n") diff --git a/website/content/platform/contributing/introduction.md b/website/content/platform/contributing/index.md similarity index 100% rename from website/content/platform/contributing/introduction.md rename to website/content/platform/contributing/index.md diff --git a/website/content/platform/contributing/index.mdx b/website/content/platform/contributing/index.mdx deleted file mode 100644 index 4d9d9d8b4531..000000000000 --- a/website/content/platform/contributing/index.mdx +++ /dev/null @@ -1,32 +0,0 @@ -# contributing - -import ReferenceCard from "@site/src/components/General/ReferenceCard"; - -
    - - - - - - -
diff --git a/website/content/platform/data_models/_category_.json b/website/content/platform/data_models/_category_.json new file mode 100644 index 000000000000..42ea3a6e6b1b --- /dev/null +++ b/website/content/platform/data_models/_category_.json @@ -0,0 +1,4 @@ +{ + "label": "Data Models", + "position": 3 +} diff --git a/website/content/platform/faqs/_category_.json b/website/content/platform/faqs/_category_.json deleted file mode 100644 index 0967ef424bce..000000000000 --- a/website/content/platform/faqs/_category_.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/website/content/platform/faqs/index.md b/website/content/platform/faqs/index.md deleted file mode 100644 index a4778c9d08a1..000000000000 --- a/website/content/platform/faqs/index.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: FAQs -sidebar_position: 1 -description: Discover how to deal with installations, updates, import errors, and - general operation. Learn more about data sources and how to handle bugs, support - and various developer issues. -keywords: -- Installation -- Updates -- Import errors -- General operation -- Data and sources -- Bugs support -- Feedback -- Developer issues -- LinkCard component ---- - -import LinkCard from "@site/src/components/General/LinkCard"; - -## Installation and Updates - -## Import errors - -## General Operation - -## Data and Sources - -## Bugs, Support and Feedback - -## Developer Issues diff --git a/website/content/platform/index.mdx b/website/content/platform/index.mdx deleted file mode 100644 index acd8e7d4852a..000000000000 --- a/website/content/platform/index.mdx +++ /dev/null @@ -1,32 +0,0 @@ -# OpenBB Platform Reference - -import ReferenceCard from "@site/src/components/General/ReferenceCard"; - -
    - - - - - - -
diff --git a/website/content/platform/showcase.md b/website/content/platform/showcase.md deleted file mode 100644 index 74f8a1eaaa70..000000000000 --- a/website/content/platform/showcase.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -title: Showcase -sidebar_position: 6 -description: Stay updated with our upcoming open source projects on GitHub. Visit - https://github.com/search?q=topic:openbb&type=Repositories&l=&l= for more open source - projects under the topic OpenBB. -keywords: -- Open Source Projects -- GitHub -- Upcoming Projects -- OpenBB -- Showcase Item ---- - -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - - -import ShowcaseItem from "@site/src/components/General/ShowcaseItem" - -## Coming Soon - ---- - -:::tip - -Find more open source projects on GitHub [here](https://github.com/search?q=topic:openbb&type=Repositories&l=&l=) diff --git a/website/content/platform/usage/overview.md b/website/content/platform/usage/index.md similarity index 100% rename from website/content/platform/usage/overview.md rename to website/content/platform/usage/index.md diff --git a/website/content/platform/usage/index.mdx b/website/content/platform/usage/index.mdx deleted file mode 100644 index 79bb3c78bae9..000000000000 --- a/website/content/platform/usage/index.mdx +++ /dev/null @@ -1,27 +0,0 @@ -# usage - -import ReferenceCard from "@site/src/components/General/ReferenceCard"; - -
    - - - - - -
diff --git a/website/content/sdk/data-available/crypto/_category_.json b/website/content/sdk/data-available/crypto/_category_.json index 5fa0dc863137..d2e71624766a 100644 --- a/website/content/sdk/data-available/crypto/_category_.json +++ b/website/content/sdk/data-available/crypto/_category_.json @@ -1,3 +1,4 @@ { - "label": "Crypto" + "label": "Crypto", + "position": 2 } diff --git a/website/content/sdk/data-available/crypto/introduction.md b/website/content/sdk/data-available/crypto/index.md similarity index 99% rename from website/content/sdk/data-available/crypto/introduction.md rename to website/content/sdk/data-available/crypto/index.md index ccd44106e051..3b63edc0b2e9 100644 --- a/website/content/sdk/data-available/crypto/introduction.md +++ b/website/content/sdk/data-available/crypto/index.md @@ -1,6 +1,6 @@ --- -title: Introduction -sidebar_position: 1 +title: Crypto +sidebar_position: 0 description: This Docusaurus page is dedicated to providing a detailed guide on how Cryptocurrency applications and dashboards can be built quickly using the OpenBB Terminal's Crypto Module. It provides an outline on how to use SDK functions at diff --git a/website/content/sdk/data-available/index.mdx b/website/content/sdk/data-available/index.mdx index 9b84aef6c4f3..c695bef91695 100644 --- a/website/content/sdk/data-available/index.mdx +++ b/website/content/sdk/data-available/index.mdx @@ -1,72 +1,76 @@ -# data-available +--- +title: Data Available +--- -import ReferenceCard from "@site/src/components/General/ReferenceCard"; +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -
    + - - - - + + + + - - - - - - - - -
diff --git a/website/content/sdk/data-available/portfolio/_category_.json b/website/content/sdk/data-available/portfolio/_category_.json index 57f2b3495e01..3622bc2502d7 100644 --- a/website/content/sdk/data-available/portfolio/_category_.json +++ b/website/content/sdk/data-available/portfolio/_category_.json @@ -1,3 +1,4 @@ { - "label": "Portfolio" + "label": "Portfolio", + "position": 3 } diff --git a/website/content/sdk/data-available/portfolio/introduction.md b/website/content/sdk/data-available/portfolio/index.md similarity index 99% rename from website/content/sdk/data-available/portfolio/introduction.md rename to website/content/sdk/data-available/portfolio/index.md index 4c547478d53f..18f9ea64fbf8 100644 --- a/website/content/sdk/data-available/portfolio/introduction.md +++ b/website/content/sdk/data-available/portfolio/index.md @@ -1,6 +1,6 @@ --- -title: Introduction -sidebar_position: 1 +title: Portfolio +sidebar_position: 0 description: Docusaurus page focuses on the usage of the OpenBB Terminal Portfolio module, detailing its features and examples of use like portfolio performance benchmarking, risk metrics calculation or maximum drawdown calculation. diff --git a/website/content/sdk/data-available/stocks/_category_.json b/website/content/sdk/data-available/stocks/_category_.json index 297211823a46..3f12cd939c8e 100644 --- a/website/content/sdk/data-available/stocks/_category_.json +++ b/website/content/sdk/data-available/stocks/_category_.json @@ -1,3 +1,4 @@ { - "label": "Stocks" + "label": "Stocks", + "position": 1 } diff --git a/website/content/sdk/data-available/stocks/introduction.md b/website/content/sdk/data-available/stocks/index.md similarity index 99% rename from website/content/sdk/data-available/stocks/introduction.md rename to website/content/sdk/data-available/stocks/index.md index 4e0f030124e3..71c2790bb859 100644 --- a/website/content/sdk/data-available/stocks/introduction.md +++ b/website/content/sdk/data-available/stocks/index.md @@ -1,6 +1,6 @@ --- title: Stocks -sidebar_position: 1 +sidebar_position: 0 description: This documentation page describes all the modules that are within the stocks menu of OpenBB. keywords: - stocks diff --git a/website/content/sdk/faqs/bugs_support_feedback.md b/website/content/sdk/faqs/bugs_support_feedback.md index 00ff14e55bed..f078e484eee6 100644 --- a/website/content/sdk/faqs/bugs_support_feedback.md +++ b/website/content/sdk/faqs/bugs_support_feedback.md @@ -21,8 +21,6 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -## Bugs, Support, and Feedback - When an error is encountered, it is always a good idea to check the open issues on [GitHub](https://github.com/OpenBB-finance/OpenBBTerminal/issues). There may be a workaround solution for the specific problem until a patch is released.
How often are patches for bugs released? diff --git a/website/content/sdk/faqs/data_sources.md b/website/content/sdk/faqs/data_sources.md index 4dd246992233..124eb1b09f11 100644 --- a/website/content/sdk/faqs/data_sources.md +++ b/website/content/sdk/faqs/data_sources.md @@ -20,9 +20,6 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - -## Data and Sources - Please note that OpenBB does not provide any data, it is an aggregator which provides users access to data from a variety of sources. OpenBB does not maintain or have any control over the raw data supplied. If there is a specific problem with the output from a data provider, please consider contacting them first.
Is there a list of all data providers? diff --git a/website/content/sdk/faqs/developer_issues.md b/website/content/sdk/faqs/developer_issues.md index 76a985aefb23..6a7510edbac1 100644 --- a/website/content/sdk/faqs/developer_issues.md +++ b/website/content/sdk/faqs/developer_issues.md @@ -21,8 +21,6 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -## Developer Issues -
How do I launch in debug mode? The PyWry window can be run in debug mode for identifying specific issues. Use the code block below - with the `obb` Python environment active - to import the OpenBB SDK in debug mode. diff --git a/website/content/sdk/faqs/import_errors.md b/website/content/sdk/faqs/import_errors.md index 24a0fac5595a..9b1688b0c97a 100644 --- a/website/content/sdk/faqs/import_errors.md +++ b/website/content/sdk/faqs/import_errors.md @@ -24,8 +24,6 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -## Import Errors - When packages not included in the OpenBB installation are installed to the same environment as the SDK, it is possible that an incompatible build of a specific library (like SciPy) has overwritten the existing and creating a conflict. In this event, try creating a new environment containing only the OpenBB dependencies.
ModuleNotFoundError: No module named '______' diff --git a/website/content/sdk/faqs/index.mdx b/website/content/sdk/faqs/index.mdx index 4f0183a139c7..1e379a55cef1 100644 --- a/website/content/sdk/faqs/index.mdx +++ b/website/content/sdk/faqs/index.mdx @@ -1,37 +1,41 @@ -# faqs +--- +title: FAQs +--- -import ReferenceCard from "@site/src/components/General/ReferenceCard"; +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -
    + - - + - - - - +
diff --git a/website/content/sdk/faqs/installation_updates.md b/website/content/sdk/faqs/installation_updates.md index 77f41680eab7..7482dbb28e54 100644 --- a/website/content/sdk/faqs/installation_updates.md +++ b/website/content/sdk/faqs/installation_updates.md @@ -23,8 +23,6 @@ import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -## Installation and Updates -
"Microsoft Visual C++ 14.0 or greater is required" Download and install [C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/), restart the machine, then try again. diff --git a/website/content/sdk/usage/index.mdx b/website/content/sdk/usage/index.mdx index cd56fbe6efe6..5f21639854bd 100644 --- a/website/content/sdk/usage/index.mdx +++ b/website/content/sdk/usage/index.mdx @@ -1,17 +1,21 @@ -# usage +--- +title: Usage +--- -import ReferenceCard from "@site/src/components/General/ReferenceCard"; +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -
    + - - + +
diff --git a/website/content/terminal/changelog/index.mdx b/website/content/terminal/changelog/index.mdx index 544e75b89614..d7d4eece6e1e 100644 --- a/website/content/terminal/changelog/index.mdx +++ b/website/content/terminal/changelog/index.mdx @@ -1,92 +1,79 @@ -# changelog +--- +title: Changelog +--- -import ReferenceCard from "@site/src/components/General/ReferenceCard"; +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -
    + - + - - - - - - - - - - - - - - - -
diff --git a/website/content/terminal/faqs/index.mdx b/website/content/terminal/faqs/index.mdx index 8d31b7a14b42..b95de46d491e 100644 --- a/website/content/terminal/faqs/index.mdx +++ b/website/content/terminal/faqs/index.mdx @@ -1,37 +1,41 @@ -# faqs +--- +title: FAQs +--- -import ReferenceCard from "@site/src/components/General/ReferenceCard"; +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -
    + - - + - - - - +
diff --git a/website/content/terminal/index.mdx b/website/content/terminal/index.mdx deleted file mode 100644 index bb50db46f174..000000000000 --- a/website/content/terminal/index.mdx +++ /dev/null @@ -1,37 +0,0 @@ -# OpenBB Terminal Reference - -import ReferenceCard from "@site/src/components/General/ReferenceCard"; - -
    - - - - - - - -
diff --git a/website/content/terminal/installation/index.mdx b/website/content/terminal/installation/index.mdx index 7890ba989d2c..5ce670df7f27 100644 --- a/website/content/terminal/installation/index.mdx +++ b/website/content/terminal/installation/index.mdx @@ -1,32 +1,36 @@ -# installation +--- +title: Installation +--- -import ReferenceCard from "@site/src/components/General/ReferenceCard"; +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -
    + - + - - - - +
diff --git a/website/content/terminal/menus/_category_.json b/website/content/terminal/menus/_category_.json index b9628cc63daf..fc61fac4dbb1 100644 --- a/website/content/terminal/menus/_category_.json +++ b/website/content/terminal/menus/_category_.json @@ -1,4 +1,4 @@ { - "label": "Menus", + "label": "Data Available", "position": 3 } diff --git a/website/content/terminal/menus/common/_category_.json b/website/content/terminal/menus/common/_category_.json index c47bdcba8d10..e1e70547424c 100644 --- a/website/content/terminal/menus/common/_category_.json +++ b/website/content/terminal/menus/common/_category_.json @@ -1,3 +1,4 @@ { - "label": "Common" + "label": "Common", + "position": 2 } diff --git a/website/content/terminal/menus/common/common.md b/website/content/terminal/menus/common/common.md deleted file mode 100644 index 41e0ff297d9d..000000000000 --- a/website/content/terminal/menus/common/common.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: Introduction -sidebar_position: 1 -description: The page explains various features available on sub-menus that can be - utilized across different asset classes. These features are grouped and can be found - under the directory trees in the 'common/'. -keywords: -- sub-menus -- features -- asset classes -- directory trees -- common/ -- quant -- quantitative -- technical -- analysis ---- - -import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; - - - -Sub-menus containing features that can be applied across different asset classes are grouped here. These are grouped in the directory trees under `common/`. diff --git a/website/content/terminal/menus/common/index.mdx b/website/content/terminal/menus/common/index.mdx index 2c833286689d..243bbd983b76 100644 --- a/website/content/terminal/menus/common/index.mdx +++ b/website/content/terminal/menus/common/index.mdx @@ -1,22 +1,21 @@ -# common +--- +title: Common +--- -import ReferenceCard from "@site/src/components/General/ReferenceCard"; +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -
    + - - + -
diff --git a/website/content/terminal/menus/crypto/_category_.json b/website/content/terminal/menus/crypto/_category_.json index ff7142a628e7..03e59b43b60d 100644 --- a/website/content/terminal/menus/crypto/_category_.json +++ b/website/content/terminal/menus/crypto/_category_.json @@ -1,3 +1,4 @@ { - "label": "Crypto" + "label": "Crypto", + "position": 1 } diff --git a/website/content/terminal/menus/crypto/introduction.md b/website/content/terminal/menus/crypto/index.md similarity index 100% rename from website/content/terminal/menus/crypto/introduction.md rename to website/content/terminal/menus/crypto/index.md diff --git a/website/content/terminal/menus/crypto/index.mdx b/website/content/terminal/menus/crypto/index.mdx deleted file mode 100644 index fba7333fcae0..000000000000 --- a/website/content/terminal/menus/crypto/index.mdx +++ /dev/null @@ -1,42 +0,0 @@ -# crypto - -import ReferenceCard from "@site/src/components/General/ReferenceCard"; - -
    - - - - - - - - -
diff --git a/website/content/terminal/menus/index.mdx b/website/content/terminal/menus/index.mdx index 94a3b068d4d9..1b3f6689a03a 100644 --- a/website/content/terminal/menus/index.mdx +++ b/website/content/terminal/menus/index.mdx @@ -1,22 +1,71 @@ -# OpenBB Terminal/Menus Reference +--- +title: Data Available +--- -import ReferenceCard from "@site/src/components/General/ReferenceCard"; +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -
    + - - - +
      + + + + + + + + + + + +
    diff --git a/website/content/terminal/menus/stocks/_category_.json b/website/content/terminal/menus/stocks/_category_.json index 79c165ed2dfb..b934b2b227da 100644 --- a/website/content/terminal/menus/stocks/_category_.json +++ b/website/content/terminal/menus/stocks/_category_.json @@ -1,3 +1,4 @@ { - "label": "Stocks" + "label": "Stocks", + "position": 0 } diff --git a/website/content/terminal/menus/stocks/introduction.md b/website/content/terminal/menus/stocks/index.md similarity index 100% rename from website/content/terminal/menus/stocks/introduction.md rename to website/content/terminal/menus/stocks/index.md diff --git a/website/content/terminal/menus/stocks/index.mdx b/website/content/terminal/menus/stocks/index.mdx deleted file mode 100644 index 9da09870c57c..000000000000 --- a/website/content/terminal/menus/stocks/index.mdx +++ /dev/null @@ -1,62 +0,0 @@ -# stocks - -import ReferenceCard from "@site/src/components/General/ReferenceCard"; - -
      - - - - - - - - - - - - -
    diff --git a/website/content/terminal/usage/data/index.mdx b/website/content/terminal/usage/data/index.mdx index a120df7d3458..a6262fdc4db8 100644 --- a/website/content/terminal/usage/data/index.mdx +++ b/website/content/terminal/usage/data/index.mdx @@ -1,22 +1,26 @@ -# data +--- +title: Data +--- -import ReferenceCard from "@site/src/components/General/ReferenceCard"; +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -
      + - + + - -
    diff --git a/website/content/terminal/usage/index.mdx b/website/content/terminal/usage/index.mdx index 66463d6669fb..2a83cb01f56b 100644 --- a/website/content/terminal/usage/index.mdx +++ b/website/content/terminal/usage/index.mdx @@ -1,27 +1,46 @@ -# OpenBB Terminal/Usage Reference +--- +title: Usage +--- -import ReferenceCard from "@site/src/components/General/ReferenceCard"; +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -
      + - - - - +
        + + + + + + +
      diff --git a/website/content/terminal/usage/outputs/_category_.json b/website/content/terminal/usage/outputs/_category_.json index 8a6d966dbaa5..1e5caec41bc6 100644 --- a/website/content/terminal/usage/outputs/_category_.json +++ b/website/content/terminal/usage/outputs/_category_.json @@ -1,4 +1,4 @@ { - "label": "Output", + "label": "Outputs", "position": 3 } diff --git a/website/content/terminal/usage/outputs/index.mdx b/website/content/terminal/usage/outputs/index.mdx index 1bc528b3b25c..f0d92a27cb20 100644 --- a/website/content/terminal/usage/outputs/index.mdx +++ b/website/content/terminal/usage/outputs/index.mdx @@ -1,22 +1,26 @@ -# outputs +--- +title: Outputs +--- -import ReferenceCard from "@site/src/components/General/ReferenceCard"; +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -
        + - + - -
      diff --git a/website/content/terminal/usage/overview/index.mdx b/website/content/terminal/usage/overview/index.mdx index 9f432891970d..f2bb8fbe26a7 100644 --- a/website/content/terminal/usage/overview/index.mdx +++ b/website/content/terminal/usage/overview/index.mdx @@ -1,22 +1,26 @@ -# overview +--- +title: Overview +--- -import ReferenceCard from "@site/src/components/General/ReferenceCard"; +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -
        + - + + - -
      diff --git a/website/content/terminal/usage/routines/index.mdx b/website/content/terminal/usage/routines/index.mdx index 0d77c03ff679..969e4b11263e 100644 --- a/website/content/terminal/usage/routines/index.mdx +++ b/website/content/terminal/usage/routines/index.mdx @@ -1,37 +1,41 @@ -# routines +--- +title: Routines +--- -import ReferenceCard from "@site/src/components/General/ReferenceCard"; +import NewReferenceCard from "@site/src/components/General/NewReferenceCard"; +import HeadTitle from '@site/src/components/General/HeadTitle.tsx'; -
        + - + - - - - - +
      diff --git a/website/src/components/General/NewReferenceCard.tsx b/website/src/components/General/NewReferenceCard.tsx new file mode 100644 index 000000000000..b3999be24149 --- /dev/null +++ b/website/src/components/General/NewReferenceCard.tsx @@ -0,0 +1,51 @@ +import Link from "@docusaurus/Link"; +import clsx from "clsx"; +import React from "react"; + +import { useLocation } from "@docusaurus/router"; +import ChevronRightIcon from "../Icons/ChevronRight"; + +export default function NewReferenceCard({ + title, + url, + description, + command, +}: { + title: string; + url: string; + description: string; + command: string; +}) { + // TODO: Waiting for mockup of how to display the command vs menu item + const something = command ? "" : ""; + const { pathname } = useLocation(); + const cleanedPath = pathname.replace(/\/v\d+/, ""); + return ( + +
      +

      + {title} + {something} +

      + + {description ? ( +

      {description}

      + ) : null} + + ); +} diff --git a/website/src/theme/ColorModeToggle/index.js b/website/src/theme/ColorModeToggle/index.js index 500f4bc85a77..139f91c589df 100644 --- a/website/src/theme/ColorModeToggle/index.js +++ b/website/src/theme/ColorModeToggle/index.js @@ -114,7 +114,10 @@ function ColorModeToggle({ className, value, onChange }) { "text-white": value !== "dark", })} type="button" - onClick={() => onChange("light")} + onClick={() => { + onChange("light") + window.location.reload(); + }} disabled={!isBrowser} title={title} aria-label={title} @@ -128,7 +131,10 @@ function ColorModeToggle({ className, value, onChange }) { "text-white": value === "dark", })} type="button" - onClick={() => onChange("dark")} + onClick={() => { + onChange("dark") + window.location.reload(); + }} disabled={!isBrowser} title={title} aria-label={title} diff --git a/website/src/theme/Navbar/Content/index.js b/website/src/theme/Navbar/Content/index.js index fed95480e50e..85f85f7f9116 100644 --- a/website/src/theme/Navbar/Content/index.js +++ b/website/src/theme/Navbar/Content/index.js @@ -26,7 +26,7 @@ function NavbarItems({ items }) { } function NavbarContentLayout({ left, right }) { return ( -
      +
      {left}
      {right} diff --git a/website/src/theme/Navbar/Layout/index.js b/website/src/theme/Navbar/Layout/index.js index 71d3074a6878..ce49c2c2e0a9 100644 --- a/website/src/theme/Navbar/Layout/index.js +++ b/website/src/theme/Navbar/Layout/index.js @@ -30,24 +30,46 @@ export default function NavbarLayout({ children }) { useEffect(() => { if (cleanedPath.startsWith("/terminal") || - cleanedPath.startsWith("/pro")) { - document.documentElement.style.setProperty( - "--ifm-color-primary", - "#669DCB", - ); + cleanedPath.startsWith("/pro") + ) { + if (document.documentElement.getAttribute('data-theme') === 'dark') { + document.documentElement.style.setProperty( + "--ifm-color-primary", + "#669DCB", + ); + } else { + document.documentElement.style.setProperty( + "--ifm-color-primary", + "#004A87", + ); + } } else if ( cleanedPath.startsWith("/sdk") || cleanedPath.startsWith("/platform") ) { - document.documentElement.style.setProperty( - "--ifm-color-primary", - "#F5B166", - ); + if (document.documentElement.getAttribute('data-theme') === 'dark') { + document.documentElement.style.setProperty( + "--ifm-color-primary", + "#F5B166", + ); + } else { + document.documentElement.style.setProperty( + "--ifm-color-primary", + "#511d11", + ); + } } else if (cleanedPath.startsWith("/bot")) { - document.documentElement.style.setProperty( - "--ifm-color-primary", - "#b186bb", - ); + if (document.documentElement.getAttribute('data-theme') === 'dark') { + document.documentElement.style.setProperty( + "--ifm-color-primary", + "#b186bb", + ); + } else { + document.documentElement.style.setProperty( + "--ifm-color-primary", + "#3a204f", + ); + } } else { } }, [pathname]); diff --git a/website/src/theme/Navbar/Logo/index.js b/website/src/theme/Navbar/Logo/index.js index c39bd77149b1..451f2d2cb660 100644 --- a/website/src/theme/Navbar/Logo/index.js +++ b/website/src/theme/Navbar/Logo/index.js @@ -12,15 +12,10 @@ export default function NavbarLogo() { const type = pathname.length > 1 ? pathname.split("/")[1] : "home"; return ( -
      - +
      + {getLogo(type)} - {type === "sdk" && ( -
      - OpenBB SDK has been deprecated in detriment of the Platform. More details here. -
      - )}
      ); } diff --git a/website/src/theme/Tabs/index.js b/website/src/theme/Tabs/index.js index fbeb1e6e7c78..83767c9d7e31 100644 --- a/website/src/theme/Tabs/index.js +++ b/website/src/theme/Tabs/index.js @@ -75,6 +75,10 @@ function TabList({ className, block, selectedValue, selectValue, tabValues }) { selectedValue === value && pathname.startsWith("/sdk"), "border-grey-400 text-grey-400 hover:text-[#ffd4b1] hover:border-[#ffd4b1]": selectedValue !== value && pathname.startsWith("/sdk"), + "border-b-2 text-[#FB923C] border-[#FB923C]": + selectedValue === value && pathname.startsWith("/platform"), + "border-grey-400 text-grey-400 hover:text-[#ffd4b1] hover:border-[#ffd4b1]": + selectedValue !== value && pathname.startsWith("/platform"), "border-grey-400 text-grey-400 hover:text-[#abd2f1] hover:border-[#abd2f1]": selectedValue !== value && pathname.startsWith("/terminal"), }