From 077a87bfead30f1add30988eed12835dfc5bc563 Mon Sep 17 00:00:00 2001 From: Long Nguyen <18nguyenl@gmail.com> Date: Wed, 6 Sep 2023 17:35:50 -0500 Subject: [PATCH] Ryuuart/issue203 (#225) * Enable more sandpack customization * Clean up * Polish * Start on Getting Started documentation * Structure first pass of documentation * Write design principles * Change where sandpack source files are stored * Add css support * Draft CSS docs * Polish styles * Polish * Polish * Document initialization * Document nesting * Add docs for nesting and reusing * Use local manawave build * Change CTA * Polish * Draft * Document * Document * Document --- web/astro.config.mjs | 17 +++- .../components/docs/sandpack/Sandpack.astro | 15 ++- web/src/components/docs/sandpack/Sandpack.tsx | 47 ++++++--- .../components/docs/sandpack/src/index.html | 12 ++- web/src/components/docs/sandpack/src/index.js | 1 + .../components/docs/sandpack/src/js/index.js | 2 - .../components/docs/sandpack/src/style.css | 27 ++++++ .../docs/sandpack/src/styles/style.css | 4 - web/src/components/home/hero/Hero.astro | 2 +- .../docs/guides/_src/css/content/index.html | 47 +++++++++ .../docs/guides/_src/css/content/style.css | 56 +++++++++++ .../docs/guides/_src/css/marquee/index.html | 46 +++++++++ .../docs/guides/_src/css/marquee/style.css | 34 +++++++ .../guides/_src/initialization/dom/index.html | 22 +++++ .../guides/_src/initialization/dom/index.js | 6 ++ .../docs/docs/guides/_src/nesting/index.html | 23 +++++ .../docs/docs/guides/_src/reusing/index.html | 20 ++++ .../docs/docs/guides/_src/reusing/index.js | 7 ++ web/src/content/docs/docs/guides/css.mdx | 53 +++++++++++ .../docs/docs/guides/initialization.mdx | 30 ++++++ web/src/content/docs/docs/guides/inputs.mdx | 51 ++++++++++ web/src/content/docs/docs/guides/nesting.mdx | 22 +++++ .../content/docs/docs/guides/overrides.mdx | 71 ++++++++++++++ web/src/content/docs/docs/guides/reusing.mdx | 37 ++++++++ web/src/content/docs/docs/index.mdx | 10 -- .../getting-started/webcomponent/index.html | 22 +++++ .../docs/docs/quickstart/getting-started.mdx | 95 +++++++++++++++++++ .../content/docs/docs/quickstart/index.mdx | 24 +++++ .../docs/docs/quickstart/principles.mdx | 89 +++++++++++++++++ .../docs/docs/reference/attributes.mdx | 68 +++++++++++++ .../content/docs/docs/reference/behavior.mdx | 58 +++++++++++ .../content/docs/docs/reference/instance.mdx | 10 ++ .../content/docs/docs/reference/limits.mdx | 25 +++++ .../content/docs/docs/reference/overrides.mdx | 22 +++++ 34 files changed, 1034 insertions(+), 41 deletions(-) create mode 100644 web/src/components/docs/sandpack/src/index.js delete mode 100644 web/src/components/docs/sandpack/src/js/index.js create mode 100644 web/src/components/docs/sandpack/src/style.css delete mode 100644 web/src/components/docs/sandpack/src/styles/style.css create mode 100644 web/src/content/docs/docs/guides/_src/css/content/index.html create mode 100644 web/src/content/docs/docs/guides/_src/css/content/style.css create mode 100644 web/src/content/docs/docs/guides/_src/css/marquee/index.html create mode 100644 web/src/content/docs/docs/guides/_src/css/marquee/style.css create mode 100644 web/src/content/docs/docs/guides/_src/initialization/dom/index.html create mode 100644 web/src/content/docs/docs/guides/_src/initialization/dom/index.js create mode 100644 web/src/content/docs/docs/guides/_src/nesting/index.html create mode 100644 web/src/content/docs/docs/guides/_src/reusing/index.html create mode 100644 web/src/content/docs/docs/guides/_src/reusing/index.js create mode 100644 web/src/content/docs/docs/guides/css.mdx create mode 100644 web/src/content/docs/docs/guides/initialization.mdx create mode 100644 web/src/content/docs/docs/guides/inputs.mdx create mode 100644 web/src/content/docs/docs/guides/nesting.mdx create mode 100644 web/src/content/docs/docs/guides/overrides.mdx create mode 100644 web/src/content/docs/docs/guides/reusing.mdx delete mode 100644 web/src/content/docs/docs/index.mdx create mode 100644 web/src/content/docs/docs/quickstart/_src/getting-started/webcomponent/index.html create mode 100644 web/src/content/docs/docs/quickstart/getting-started.mdx create mode 100644 web/src/content/docs/docs/quickstart/index.mdx create mode 100644 web/src/content/docs/docs/quickstart/principles.mdx create mode 100644 web/src/content/docs/docs/reference/attributes.mdx create mode 100644 web/src/content/docs/docs/reference/behavior.mdx create mode 100644 web/src/content/docs/docs/reference/instance.mdx create mode 100644 web/src/content/docs/docs/reference/limits.mdx create mode 100644 web/src/content/docs/docs/reference/overrides.mdx diff --git a/web/astro.config.mjs b/web/astro.config.mjs index 7dc6c6a..191707a 100644 --- a/web/astro.config.mjs +++ b/web/astro.config.mjs @@ -10,7 +10,22 @@ export default defineConfig({ }, head: [{ tag: 'script', - content: `window.addEventListener('load', () => document.querySelector('.site-title').href += 'docs')` + content: `window.addEventListener('load', () => document.querySelector('.site-title').href += 'docs/quickstart')` }], + sidebar: [ + { label: "Home", link: "/" }, + { + label: "Start Here", + autogenerate: { directory: 'docs/quickstart' } + }, + { + label: "Guides", + autogenerate: { directory: 'docs/guides' } + }, + { + label: "Reference", + autogenerate: { directory: 'docs/reference' } + } + ] }), react()] }); \ No newline at end of file diff --git a/web/src/components/docs/sandpack/Sandpack.astro b/web/src/components/docs/sandpack/Sandpack.astro index d80b682..2627312 100644 --- a/web/src/components/docs/sandpack/Sandpack.astro +++ b/web/src/components/docs/sandpack/Sandpack.astro @@ -2,15 +2,24 @@ import SandpackReactComponent from "./Sandpack.jsx"; interface Props { - code?: string; + js?: string; html?: string; + css?: string; + activeFile?: string; } -const { code, html } = Astro.props; +const { js, html, css, activeFile } = Astro.props; ---