From c3ee5f1ba1721f9a7e69776d0ed57785ebefe09f Mon Sep 17 00:00:00 2001 From: Shaun Struwig <41984034+Blargian@users.noreply.github.com> Date: Wed, 2 Apr 2025 11:51:44 +0200 Subject: [PATCH 1/3] add search to docs homepage --- src/css/home.scss | 29 +++++++++++++++++++++++++++++ src/pages/index.mdx | 16 ++++++++++++++++ src/theme/SearchBar/styles.css | 3 +++ 3 files changed, 48 insertions(+) diff --git a/src/css/home.scss b/src/css/home.scss index 3b52bf4d026..9fc377b3a5d 100644 --- a/src/css/home.scss +++ b/src/css/home.scss @@ -75,6 +75,18 @@ } } +.home-page-hero-right-search { + display: flex; + flex-direction: column; + align-items: center; + + @media (min-width: 768px) { + flex-direction: row; + flex: 1; + justify-content: center; + } +} + .home-page-hero-button { display: flex; color: inherit; @@ -196,6 +208,21 @@ } } +.home-page-section-search { + display: flex; + flex-direction: column; + padding-top: 2rem; + padding-bottom: 2rem; + justify-content: space-between; + border-bottom: 1px solid var(--click-color-stroke); + + @media (min-width: 768px) { + flex-direction: column; + padding-top: 2rem; + padding-bottom: 2rem; + } +} + .home-page-section:last-of-type { border-bottom: none; } @@ -234,5 +261,7 @@ img.home-svg svg path { .home-container { display: flex; flex-direction: column; + max-width: 1000px; + justify-self: center; } diff --git a/src/pages/index.mdx b/src/pages/index.mdx index 4b535326bb6..74a77211f38 100644 --- a/src/pages/index.mdx +++ b/src/pages/index.mdx @@ -23,6 +23,7 @@ import IconSQLConsole from '@site/src/icons/IconSQLConsole'; import IconLightning from '@site/src/icons/IconLightning'; import IconDownload from '@site/src/icons/IconDownload'; import Image from '@theme/IdealImage'; +import SearchBar from "@theme/SearchBar"; export const Hero = ({children, color}) => { return ( @@ -88,6 +89,20 @@ export const HomePageOptionButton = ({children, icon, iconWidth, svgIcon, link}) ) } +export const SearchClickHouse = ({children, color}) => { + return ( +
Search documentation