From 2e1dbe168fd18c017ad4f5158786bfce1f19e8d5 Mon Sep 17 00:00:00 2001 From: Vivian Plasencia Date: Wed, 15 May 2024 12:20:44 +0200 Subject: [PATCH] Merge pull request #502 from JoshdfG/main Add search bar to Bandada docs #476 --- apps/docs/docusaurus.config.ts | 6 +++++ apps/docs/src/css/custom.css | 40 ++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/apps/docs/docusaurus.config.ts b/apps/docs/docusaurus.config.ts index ffc05547..fb12b6a0 100644 --- a/apps/docs/docusaurus.config.ts +++ b/apps/docs/docusaurus.config.ts @@ -126,6 +126,12 @@ const config: Config = { prism: { theme: prismThemes.github, darkTheme: prismThemes.dracula + }, + algolia: { + appId: "6P229KVKCB", + apiKey: "879bb5b002b6370f181f0f79f5c2afe2", + indexName: "semaphoreliedzkp", + contextualSearch: true } } satisfies Preset.ThemeConfig } diff --git a/apps/docs/src/css/custom.css b/apps/docs/src/css/custom.css index 6529f39e..ef4f6843 100644 --- a/apps/docs/src/css/custom.css +++ b/apps/docs/src/css/custom.css @@ -40,3 +40,43 @@ html { .navbar__brand:hover { color: unset; } + +[data-theme="light"] .DocSearch { + /* --docsearch-primary-color: var(--ifm-color-primary); */ + /* --docsearch-text-color: var(--ifm-font-color-base); */ + --docsearch-muted-color: var(--ifm-color-secondary-darkest); + --docsearch-container-background: rgba(94, 100, 112, 0.7); + /* Modal */ + --docsearch-modal-background: var(--ifm-color-secondary-lighter); + /* Search box */ + --docsearch-searchbox-background: var(--ifm-color-secondary); + --docsearch-searchbox-focus-background: var(--ifm-color-white); + /* Hit */ + --docsearch-hit-color: var(--ifm-font-color-base); + --docsearch-hit-active-color: var(--ifm-color-white); + --docsearch-hit-background: var(--ifm-color-white); + /* Footer */ + --docsearch-footer-background: var(--ifm-color-white); +} + +[data-theme="dark"] .DocSearch { + --docsearch-text-color: var(--ifm-font-color-base); + --docsearch-muted-color: var(--ifm-color-secondary-darkest); + --docsearch-container-background: rgba(47, 55, 69, 0.7); + /* Modal */ + --docsearch-modal-background: var(--ifm-background-color); + /* Search box */ + --docsearch-searchbox-background: var(--ifm-background-color); + --docsearch-searchbox-focus-background: var(--ifm-color-black); + /* Hit */ + --docsearch-hit-color: var(--ifm-font-color-base); + --docsearch-hit-active-color: var(--ifm-color-white); + --docsearch-hit-background: var(--ifm-color-emphasis-100); + /* Footer */ + --docsearch-footer-background: var(--ifm-background-surface-color); + --docsearch-key-gradient: linear-gradient( + -26.5deg, + var(--ifm-color-emphasis-200) 0%, + var(--ifm-color-emphasis-100) 100% + ); +}