Skip to content

Commit

Permalink
search result highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubabrzy committed Sep 18, 2023
1 parent e2ab8d6 commit 62e2432
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ html[data-theme="dark"] {
--ifm-font-color-base: theme("colors.gray.50");
--ifm-navbar-search-input-placeholder-color: theme("colors.gray.500");
--ifm-card-background-color: theme("colors.blue.900");
--docsearch-primary-color: theme("colors.blue.900");
}

html[data-theme="light"] {
Expand Down
6 changes: 5 additions & 1 deletion src/theme/Navbar/Content/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React from "react";
import clsx from "clsx";

import { useThemeConfig, ErrorCauseBoundary } from "@docusaurus/theme-common";
import { splitNavbarItems } from "@docusaurus/theme-common/internal";
import NavbarItem, { type Props as NavbarItemConfig } from "@theme/NavbarItem";
Expand All @@ -7,6 +9,8 @@ import SearchBar from "@theme/SearchBar";
import NavbarMobileSidebarToggle from "@theme/Navbar/MobileSidebar/Toggle";
import NavbarLogo from "@theme/Navbar/Logo";

import styles from "./styles.module.css";

function NavbarItems({ items }: { items: NavbarItemConfig[] }) {
return (
<>
Expand Down Expand Up @@ -38,7 +42,7 @@ export default function NavbarContent() {
</div>
</div>

<div className="flex items-center gap-6">
<div className={clsx(styles.navbarContent, "flex", "items-center", "gap-6")}>
<SearchBar />

<div className="items-center gap-6 hidden xl:flex">
Expand Down
3 changes: 3 additions & 0 deletions src/theme/Navbar/Content/styles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.navbarContent {
--ifm-color-primary: theme("colors.brand.500");
}

0 comments on commit 62e2432

Please sign in to comment.