-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into criterion-build-util
- Loading branch information
Showing
94 changed files
with
2,227 additions
and
2,081 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
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
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
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
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,55 @@ | ||
import React from 'react'; | ||
import { Link, useLocation } from 'react-router-dom'; | ||
import clsx from 'clsx'; | ||
import { useColorMode } from '@docusaurus/theme-common'; | ||
import SearchBar from '@theme/SearchBar'; | ||
import ColorModeToggle from '@theme/ColorModeToggle'; | ||
import styles from './styles.module.scss'; | ||
import DocsVersionDropdownNavbarItem from '@theme/NavbarItem/DocsVersionDropdownNavbarItem'; | ||
|
||
function SecondNavbarContent() { | ||
const { colorMode, setColorMode } = useColorMode(); | ||
const location = useLocation(); | ||
const isDocsPath = location.pathname.startsWith('/docs'); | ||
if (!isDocsPath) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<div className={clsx(styles.secondNavbar, colorMode === 'dark' && styles.darkMode)}> | ||
<div className={styles.container}> | ||
<div className={styles.versionDropdown}> | ||
<DocsVersionDropdownNavbarItem | ||
docsPluginId="default" | ||
dropdownItemsBefore={[]} | ||
dropdownItemsAfter={[]} | ||
dropdownActiveClassDisabled={false} | ||
mobile={false} | ||
/> | ||
</div> | ||
<div className={clsx(styles.navbarItemsRight)}> | ||
<div className={styles.colorModeToggle}> | ||
<ColorModeToggle | ||
className="clean-btn toggleButton_node_modules-@docusaurus-theme-classic-lib-theme-ColorModeToggle-styles-module" | ||
title={`Switch between dark and light mode (currently ${colorMode} mode)`} | ||
aria-label={`Switch between dark and light mode (currently ${colorMode} mode)`} | ||
aria-live="polite" | ||
onChange={() => setColorMode(colorMode === 'dark' ? 'light' : 'dark')} | ||
/> | ||
</div> | ||
<div className={styles.searchBox}> | ||
<SearchBar /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
function SecondNavbar() { | ||
return ( | ||
<SecondNavbarContent /> | ||
); | ||
} | ||
|
||
export default SecondNavbar; |
Oops, something went wrong.