diff --git a/packages/orange/orange-logo.svg b/packages/orange/orange-logo.svg index 7d608bf6ef..fbff97f1cd 100644 --- a/packages/orange/orange-logo.svg +++ b/packages/orange/orange-logo.svg @@ -1 +1,4 @@ - + diff --git a/site/data/sidebar-foundation.yml b/site/data/sidebar-foundation.yml index 9581006bcc..4594b717d0 100644 --- a/site/data/sidebar-foundation.yml +++ b/site/data/sidebar-foundation.yml @@ -8,6 +8,7 @@ coming_soon: true - title: Colors - title: Color modes + - title: Themes - title: CSS variables - title: Reboot - title: Typography diff --git a/site/src/components/shortcodes/SvgDocs.astro b/site/src/components/shortcodes/SvgDocs.astro index c588c456d9..3b8f8dfb8c 100644 --- a/site/src/components/shortcodes/SvgDocs.astro +++ b/site/src/components/shortcodes/SvgDocs.astro @@ -19,16 +19,20 @@ interface Props { * @default true */ downloadable?: boolean + /** * Defines label to complete 'Copy SVG to clipboard' button aria-label. */ buttonLabel?: string + + brand?: string } +const { brand = 'orange' } = Astro.props -const { file = `${getConfig().brand}-logo`, downloadable = true, buttonLabel } = Astro.props +const { file = `${brand}-logo`, downloadable = true, buttonLabel } = Astro.props -const filePath = `site/${getConfig().brand}/static/docs/[version]/assets/brand/${file}` -const svgFormattedPath = `${filePath}-formatted.svg` +const filePath = `site/static/[brand]/docs/[version]/assets/brand/${file}` +const svgFormattedPath = `${filePath}.svg` const svgPath = `${filePath}.svg` const svg = fs.readFileSync(svgPath, 'utf8') @@ -37,7 +41,7 @@ const size = fs.statSync(svgPath).size const clipboardLabel = buttonLabel ? `Copy ${buttonLabel} SVG to clipboard` : file - ? `Copy ${file}.svg file to clipboard` + ? `Copy ${file}.svg content to clipboard` : 'Copy SVG to clipboard' --- diff --git a/site/src/components/shortcodes/ThemeDemo.astro b/site/src/components/shortcodes/ThemeDemo.astro new file mode 100644 index 0000000000..658229da1a --- /dev/null +++ b/site/src/components/shortcodes/ThemeDemo.astro @@ -0,0 +1,225 @@ +--- +import {getDocsPublicFsPath, getVersionedDocsPath} from "@libs/path.ts"; +import {getConfig} from "@libs/config.ts"; + +interface Props { + /** + * The theme to use for display. One of `orange`, `orange-compact`, or `sosh`. + * @default 'orange' + */ + theme?: 'orange' | 'orange-compact' | 'sosh' + +} + +const { theme = 'orange' } = Astro.props + +--- + + + + +
Success
+Info
+Warning
+Beware
+0notification
+1notification
++ + Success +
++ + Info +
+