docusaurus/packages/docusaurus-theme-classic
Alexey Pyltsyn 9536ef900d
feat(v2): redesign mobile UX: inline TOC + doc sidebar in main menu (#4273)
* feat(v2): mobile TOC

* Bug fixes and various improvements

* Redesign

* extract TOCCollapsible component

* TS improvements

* Assign sidebar name directly to the doc route => no need for either permalinkToSidebar or GlobalData

* revert changes to useWindowSize, fix FOUC issues

* extract DocSidebarDesktop component

* remove now useless menu infima classes

* TOCHeadings => rename + remove unused onClick prop

* Extract DocSidebarItem

* minor renaming

* replace GlobalData usage by a React teleport system to render in the navbar mobile sidebar menu directly from the DocPage component

* useWindowSize => simulate SSR size in dev to make FOUC issues more obvious

* fix remaining sidebar layout shift

* update docs snapshots

* remove unused code translations

* remove unused code translations

* fix minor update-code-translations bug

* Add more build-size paths to watch

* Restyle back button

* Add  missing`menu` class

* extract useShallowMemoizedObject

* fix routes tests + better routes formatting

* use Translate api for labels

* use Translate api for labels

* Update translations

* Improve dark mode support for back button

* Merge branch 'master' into lex111/inline-color-code

# Conflicts:
#	packages/core/dist/css/default-dark/default-dark-rtl.min.css
#	packages/core/dist/css/default-dark/default-dark.min.css
#	packages/core/dist/css/default/default-rtl.min.css
#	packages/core/dist/css/default/default.min.css

* replace useCollapse by new useCollapsible

* Cleanup and use clean-btn for TOCCollapsible button

* Make TOC links clickable over full width

* Cleanup

* fix uncollapsible sidebar that can be collapsed + create <Collapsible> component

* dependency array typo

* rollback sidebars community commit typo

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-07-09 16:50:38 +02:00
..
codeTranslations feat(v2): redesign mobile UX: inline TOC + doc sidebar in main menu (#4273) 2021-07-09 16:50:38 +02:00
src feat(v2): redesign mobile UX: inline TOC + doc sidebar in main menu (#4273) 2021-07-09 16:50:38 +02:00
babel.config.js feat(v2): core v2 i18n support + Docusaurus site Crowdin integration (#3325) 2020-11-26 12:16:46 +01:00
package.json fix(v2): introduce useCollapsible to fix collapsible animation perf issues (#5116) 2021-07-07 18:50:13 +02:00
README.md docs(v2) themes (#1645) 2019-07-26 12:00:40 +07:00
tsconfig.json feat(v2): Support swizzling TypeScript components (#2671) 2020-06-25 16:07:30 +02:00
update-code-translations.js feat(v2): redesign mobile UX: inline TOC + doc sidebar in main menu (#4273) 2021-07-09 16:50:38 +02:00
update-code-translations.test.js feat(v2): auto-generated sidebars, frontmatter-less sites (#4582) 2021-04-15 16:20:11 +02:00

Docusaurus Theme Classic

The classic theme for Docusaurus.

Installation

Add docusaurus/theme-classic to your package:

npm i @docusaurus/theme-classic
# or
yarn add @docusaurus/theme-classic

Modify your docusaurus.config.js:

module.exports = {
  ...
+ themes: ['@docusaurus/theme-classic'],
  ...
}

Swizzling components

$ npm swizzle @docusaurus/theme-classic [component name]

All components used by this theme can be found here