diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index b3e06ce66..fe4142447 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -2,5 +2,9 @@ export default { buildOptions: { site: 'https://docs.astro.build/', }, - renderers: ['@astrojs/renderer-preact', '@astrojs/renderer-react'], + renderers: [ + // Our main renderer for frontend components + '@astrojs/renderer-preact', + // Needed for Algolia search component + '@astrojs/renderer-react'], }; diff --git a/docs/public/index.css b/docs/public/index.css index 5f382e7d0..abd3b5e98 100644 --- a/docs/public/index.css +++ b/docs/public/index.css @@ -183,14 +183,15 @@ strong { } /* Supporting Content */ +code { + font-family: var(--font-mono); + font-size: 0.85em; +} code:not([class*='language']) { --border-radius: 3px; --padding-block: 0.2rem; - --padding-inline: 0.33rem; - - font-family: var(--font-mono); - font-size: 0.85em; + --padding-inline: 0.4rem; color: var(--theme-code-inline-text); background-color: var(--theme-code-inline-bg); padding: var(--padding-block) var(--padding-inline); @@ -207,6 +208,10 @@ pre > code:not([class*='language']) { color: inherit; } +pre > code { + font-size: 1em; +} + table, pre { position: relative; @@ -299,56 +304,6 @@ button { background-color: var(--theme-bg); } -#theme-toggle { - display: inline-flex; - align-items: center; - gap: 0.25em; - padding: 0.33em 0.67em; - border-radius: 99em; - background-color: var(--theme-code-inline-bg); -} - -#theme-toggle > label:focus-within { - outline: 2px solid transparent; - box-shadow: 0 0 0 0.08em var(--theme-accent), 0 0 0 0.12em white; -} - -#theme-toggle > label { - color: var(--theme-code-inline-text); - position: relative; - display: flex; - align-items: center; - justify-content: center; - opacity: 0.5; -} - -#theme-toggle .checked { - color: var(--theme-accent); - opacity: 1; -} - -input[name='theme-toggle'] { - position: absolute; - opacity: 0; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: -1; -} - -.sidebar-nav { - width: 100%; - position: sticky; - top: 0; -} -.sidebar-nav-inner { - height: 100%; - padding: 0; - padding-top: var(--doc-padding); - overflow: auto; -} - h2.heading { font-size: 1rem; font-weight: 700; @@ -397,13 +352,6 @@ h2.heading { text-decoration: none; } -.edit-on-github { - text-decoration: none; - font: inherit; - color: inherit; - font-size: 1rem; -} - /* Screenreader Only Text */ .sr-only { position: absolute; @@ -429,24 +377,6 @@ h2.heading { white-space: normal; } -.skiplink, -.skiplink:focus, -.skiplink:focus-visible { - position: absolute; - padding: 0.25em; - font-size: larger; - top: 0.5rem; - left: 0.5rem; - z-index: 9; - display: block; - background-color: var(--theme-bg); - color: var(--theme-text-accent); - border-radius: 0.25em; - outline: var(--theme-text-accent) solid 1px; - outline-offset: 0; -} -/* Screenreader Only Text - End */ - :target { scroll-margin: calc(var(--theme-sidebar-offset, 5rem) + 2rem) 0 2rem; } diff --git a/docs/reference/api-reference.md b/docs/reference/api-reference.md index 9b0d82c9f..08580bcf1 100644 --- a/docs/reference/api-reference.md +++ b/docs/reference/api-reference.md @@ -1,5 +1,5 @@ --- -layout: ~/layouts/Main.astro +layout: ~/layouts/MainLayout.astro title: API Reference --- diff --git a/docs/src/components/DocSidebar/DocSidebar.tsx b/docs/src/components/DocSidebar/DocSidebar.tsx deleted file mode 100644 index ebf3dbf0d..000000000 --- a/docs/src/components/DocSidebar/DocSidebar.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import type { FunctionalComponent } from 'preact'; -import { h } from 'preact'; -import More from './More'; -import TableOfContents from './TableOfContents'; - -export const DocSidebar: FunctionalComponent<{ - headers: any[]; - editHref: string; -}> = ({ headers = [], editHref }) => { - return ( - - ); -}; - -export default DocSidebar; -export { default as More } from './More'; -export { default as TableOfContents } from './TableOfContents'; diff --git a/docs/src/components/DocSidebar/EditOnGithub.tsx b/docs/src/components/DocSidebar/EditOnGithub.tsx deleted file mode 100644 index e6e757f5f..000000000 --- a/docs/src/components/DocSidebar/EditOnGithub.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import type { FunctionalComponent } from 'preact'; -import { h } from 'preact'; - -const EditOnGithub: FunctionalComponent<{ href: string }> = ({ href }) => { - return ( - - - Edit this page - - ); -}; - -export default EditOnGithub; diff --git a/docs/src/components/DocSidebar/More.tsx b/docs/src/components/DocSidebar/More.tsx deleted file mode 100644 index 6b0c5145c..000000000 --- a/docs/src/components/DocSidebar/More.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import type { FunctionalComponent } from 'preact'; -import { h, Fragment } from 'preact'; -import EditOnGithub from './EditOnGithub'; -import ThemeToggle from '../ThemeToggle'; - -const More: FunctionalComponent<{ editHref: string }> = ({ editHref }) => { - return ( - <> -