diff --git a/client/docs/forms/create/__category__.json b/client/docs/forms/create/_category_.json similarity index 78% rename from client/docs/forms/create/__category__.json rename to client/docs/forms/create/_category_.json index 2da38ee..9b136d1 100644 --- a/client/docs/forms/create/__category__.json +++ b/client/docs/forms/create/_category_.json @@ -1,8 +1,9 @@ { + "collapsed": true, "label": "Create", "link": { "type": "generated-index", "description": "Common patterns for account creation forms" }, - "collapsed": false + "position": 5 } diff --git a/client/docs/forms/identity/_category_.json b/client/docs/forms/identity/_category_.json index 7b624a2..13371ed 100644 --- a/client/docs/forms/identity/_category_.json +++ b/client/docs/forms/identity/_category_.json @@ -1,8 +1,9 @@ { + "collapsed": true, "label": "Identity", "link": { "type": "generated-index", "description": "Common patterns for identity forms" }, - "collapsed": false + "position": 2 } diff --git a/client/docs/forms/login/_category_.json b/client/docs/forms/login/_category_.json index 99f6b4c..c92d027 100644 --- a/client/docs/forms/login/_category_.json +++ b/client/docs/forms/login/_category_.json @@ -1,9 +1,9 @@ { + "collapsed": false, "label": "Login", - "position": 1, "link": { "type": "generated-index", "description": "Common patterns for login forms" }, - "collapsed": false + "position": 1 } diff --git a/client/docs/forms/payment/_category_.json b/client/docs/forms/payment/_category_.json index 840fb62..bd9d9b6 100644 --- a/client/docs/forms/payment/_category_.json +++ b/client/docs/forms/payment/_category_.json @@ -1,8 +1,9 @@ { + "collapsed": true, "label": "Payment", "link": { "type": "generated-index", "description": "Common patterns for payment forms" }, - "collapsed": false + "position": 3 } diff --git a/client/docs/forms/search/_category_.json b/client/docs/forms/search/_category_.json index f48af43..9c0b853 100644 --- a/client/docs/forms/search/_category_.json +++ b/client/docs/forms/search/_category_.json @@ -1,8 +1,9 @@ { + "collapsed": true, "label": "Search", "link": { "type": "generated-index", "description": "Common patterns for search inputs" }, - "collapsed": false + "position": 4 } diff --git a/client/docs/forms/update/_category_.json b/client/docs/forms/update/_category_.json index 1a41fb0..02b4cc6 100644 --- a/client/docs/forms/update/_category_.json +++ b/client/docs/forms/update/_category_.json @@ -1,8 +1,9 @@ { + "collapsed": true, "label": "Update", "link": { "type": "generated-index", "description": "Common patterns for authentication update forms" }, - "collapsed": false + "position": 6 } diff --git a/client/src/pages/index.md b/client/docs/index.md similarity index 91% rename from client/src/pages/index.md rename to client/docs/index.md index 6b044b6..3b84c09 100644 --- a/client/src/pages/index.md +++ b/client/docs/index.md @@ -1,5 +1,6 @@ --- title: Intro +displayed_sidebar: formsSidebar --- # Let's test the web! diff --git a/client/docusaurus.config.ts b/client/docusaurus.config.ts index 01612b9..2eff7d4 100644 --- a/client/docusaurus.config.ts +++ b/client/docusaurus.config.ts @@ -51,6 +51,10 @@ const config: Config = { { docs: { breadcrumbs: false, + // @TODO there is a known issue where docs `routeBasePath` set to "/" breaks 404 pages + // https://github.com/facebook/docusaurus/issues/9665 + // https://github.com/facebook/docusaurus/issues/9688 + routeBasePath: "/", sidebarPath: require.resolve("./sidebars.js"), }, diff --git a/client/sidebars.js b/client/sidebars.js index 5a337b4..28e93dc 100644 --- a/client/sidebars.js +++ b/client/sidebars.js @@ -1,33 +1,9 @@ -/** - * Creating a sidebar enables you to: - - create an ordered group of docs - - render a sidebar for each doc of that group - - provide next/previous navigation - - The sidebars can be generated from the filesystem, or explicitly defined here. - - Create as many sidebars as you want. - */ - // @ts-check /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ const sidebars = { // By default, Docusaurus generates a sidebar from the docs folder structure formsSidebar: [{ type: "autogenerated", dirName: "forms" }], - - // But you can create a sidebar manually - /* - tutorialSidebar: [ - 'intro', - 'hello', - { - type: 'category', - label: 'Tutorial', - items: ['tutorial-basics/create-a-document'], - }, - ], - */ }; module.exports = sidebars; diff --git a/client/src/css/custom.css b/client/src/css/custom.css index 101869b..de1df33 100644 --- a/client/src/css/custom.css +++ b/client/src/css/custom.css @@ -59,18 +59,6 @@ --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); } -.theme-doc-markdown > header:first-of-type details > summary { - list-style: none; -} -.theme-doc-markdown > header:first-of-type details > summary::after { - font-size: 24px; - content: " ▸"; -} -.theme-doc-markdown > header:first-of-type details[open] > summary::after { - font-size: 24px; - content: " ▾"; -} - .theme-doc-markdown > header:first-of-type h1:first-of-type { display: inline-block; cursor: pointer; @@ -78,6 +66,11 @@ margin-bottom: 5px; } +main [class^="docItemCol_"], +main [class*=" docItemCol_"] { + margin: auto; +} + select, input:not([type]), /* text type is stripped from built html */ input[type="url"], diff --git a/client/src/theme/Navbar/Search/index.js b/client/src/theme/Navbar/Search/index.js deleted file mode 100644 index 551343c..0000000 --- a/client/src/theme/Navbar/Search/index.js +++ /dev/null @@ -1,10 +0,0 @@ -import React from "react"; -import clsx from "clsx"; -import styles from "./styles.module.css"; -export default function NavbarSearch({ children, className }) { - return ( -