-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(devx): re-enable navbar search (#1623)
* feat(devx): re-enable navbar search feat(devx): add typesense config * fix(devx): dead link * fix(devx): syntax * fix(devx): change IP to new static server * feat(devx): update config to use the new typesense server. * feat(devx): update pnpm-lock.yaml with TypeSense * feat(devx): update config * feat(devx): remove unnecessary blank lines * feat(devx): fix port * fix(devx): remove unwanted button
- Loading branch information
1 parent
ebf4e8f
commit b58d45e
Showing
6 changed files
with
223 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Copyright (c) Mysten Labs, Inc. | ||
// Modifications Copyright (c) 2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
import React from "react"; | ||
import clsx from "clsx"; | ||
import styles from "./styles.module.css"; | ||
export default function NavbarSearch({ children, className }) { | ||
return <div className={clsx(className, styles.searchBox)}>{children}</div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
Workaround to avoid rendering empty search container | ||
See https://github.com/facebook/docusaurus/pull/9385 | ||
*/ | ||
/* | ||
TODO temporary @supports check, remove before 2025 | ||
only needed for Firefox < 121 | ||
see https://github.com/facebook/docusaurus/issues/9527#issuecomment-1805272379 | ||
*/ | ||
@supports selector(:has(*)) { | ||
.navbarSearchContainer:not(:has(> *)) { | ||
display: none; | ||
} | ||
} | ||
|
||
@media (max-width: 996px) { | ||
.searchBox { | ||
position: absolute; | ||
right: var(--ifm-navbar-padding-horizontal); | ||
} | ||
} | ||
|
||
@media (min-width: 997px) { | ||
.searchBox { | ||
padding: var(--ifm-navbar-item-padding-vertical) | ||
var(--ifm-navbar-item-padding-horizontal); | ||
display: flex; | ||
column-gap: 1rem; | ||
} | ||
} |
Oops, something went wrong.