From f15bc9d10dbfba4cbf73c36cc8d9d029329f3978 Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Mon, 26 Feb 2024 21:46:01 -0800 Subject: [PATCH 1/4] Add "Under Construction" notices to website --- apps/website/docs/index.md | 7 +++++++ apps/website/docs/pages/guide/getting_started.md | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/apps/website/docs/index.md b/apps/website/docs/index.md index b8662cd..c16e621 100644 --- a/apps/website/docs/index.md +++ b/apps/website/docs/index.md @@ -8,6 +8,13 @@ custom_edit_url: null Sparo +> 🚧 UNDER CONSTRUCTION 🚧 +> +> This is an early test release of the software. +> It is not yet ready for general usage. +> If you have questions about this project, let us know +> using [GitHub discussions](https://github.com/tiktok/sparo/discussions). + ## Clone faster! Sparo optimizes performance of Git operations for your large frontend monorepo. diff --git a/apps/website/docs/pages/guide/getting_started.md b/apps/website/docs/pages/guide/getting_started.md index 9c007bf..4de21b8 100644 --- a/apps/website/docs/pages/guide/getting_started.md +++ b/apps/website/docs/pages/guide/getting_started.md @@ -2,6 +2,13 @@ title: Getting Started --- +> 🚧 UNDER CONSTRUCTION 🚧 +> +> This is an early test release of the software. +> It is not yet ready for general usage. +> If you have questions about this project, let us know +> using [GitHub discussions](https://github.com/tiktok/sparo/discussions). + ## Everyday workflow ### Step 1: Upgrade Git From 64c747840afb8d0d951b3a039931940fd69ae06b Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Mon, 26 Feb 2024 22:23:50 -0800 Subject: [PATCH 2/4] Improve website logo appearance in dark mode --- apps/website/src/components/ThemedImage.tsx | 18 ++++++++++++++++++ .../static/images/site/sparo-logo-dark.svg | 3 +++ .../static/images/site/sparo-title-dark.svg | 2 ++ 3 files changed, 23 insertions(+) create mode 100644 apps/website/src/components/ThemedImage.tsx create mode 100644 apps/website/static/images/site/sparo-logo-dark.svg create mode 100644 apps/website/static/images/site/sparo-title-dark.svg diff --git a/apps/website/src/components/ThemedImage.tsx b/apps/website/src/components/ThemedImage.tsx new file mode 100644 index 0000000..29dcbc9 --- /dev/null +++ b/apps/website/src/components/ThemedImage.tsx @@ -0,0 +1,18 @@ +import React from 'react'; +import { useColorMode } from '@docusaurus/theme-common'; + +/** + * An `` tag with a different URLs for light vs dark mode. + */ +const ThemedImage = ({ srcLight, srcDark, alt, title, style }) => { + const { colorMode } = useColorMode(); + const src = colorMode === 'dark' ? srcDark : srcLight; + + return ( +
+ {alt} +
+ ); +}; + +export { ThemedImage }; diff --git a/apps/website/static/images/site/sparo-logo-dark.svg b/apps/website/static/images/site/sparo-logo-dark.svg new file mode 100644 index 0000000..8dbca59 --- /dev/null +++ b/apps/website/static/images/site/sparo-logo-dark.svg @@ -0,0 +1,3 @@ + + +Sparoimage/svg+xmlSparohttps://github.com/octogonzCopyright (c) TikTok Pte. Ltd. diff --git a/apps/website/static/images/site/sparo-title-dark.svg b/apps/website/static/images/site/sparo-title-dark.svg new file mode 100644 index 0000000..57f740e --- /dev/null +++ b/apps/website/static/images/site/sparo-title-dark.svg @@ -0,0 +1,2 @@ + +SparoSparo From e42289ecfacf2b245348403d683a59d4d8b6ebfc Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Mon, 26 Feb 2024 22:36:09 -0800 Subject: [PATCH 3/4] Add dependency needed for type checking --- apps/website/package.json | 1 + common/config/rush/pnpm-lock.yaml | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/apps/website/package.json b/apps/website/package.json index a66aa95..f260adf 100644 --- a/apps/website/package.json +++ b/apps/website/package.json @@ -20,6 +20,7 @@ "@algolia/client-search": "^4.22.1", "@docusaurus/core": "3.1.1", "@docusaurus/preset-classic": "3.1.1", + "@docusaurus/theme-common": "3.1.1", "@mdx-js/react": "^3.0.1", "clsx": "^2.1.0", "prism-react-renderer": "^2.3.1", diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index fad8d7f..266ff7c 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -93,6 +93,9 @@ importers: '@docusaurus/preset-classic': specifier: 3.1.1 version: 3.1.1(@algolia/client-search@4.22.1)(@types/react@18.2.59)(react-dom@18.2.0)(react@18.2.0)(search-insights@2.13.0)(typescript@5.3.3) + '@docusaurus/theme-common': + specifier: 3.1.1 + version: 3.1.1(@docusaurus/types@3.1.1)(react-dom@18.2.0)(react@18.2.0)(typescript@5.3.3) '@mdx-js/react': specifier: ^3.0.1 version: 3.0.1(@types/react@18.2.59)(react@18.2.0) @@ -11932,6 +11935,7 @@ time: /@docusaurus/core@3.1.1: '2024-01-26T12:52:02.277Z' /@docusaurus/module-type-aliases@3.1.1: '2024-01-26T12:51:46.849Z' /@docusaurus/preset-classic@3.1.1: '2024-01-26T12:52:48.070Z' + /@docusaurus/theme-common@3.1.1: '2024-01-26T12:52:31.593Z' /@docusaurus/types@3.1.1: '2024-01-26T12:51:42.114Z' /@mdx-js/react@3.0.1: '2024-02-12T10:50:27.073Z' /@rushstack/heft-node-rig@2.4.5: '2024-01-25T23:04:47.299Z' From 67b120450525d3dda35e1e9b2c0fda025d0780fc Mon Sep 17 00:00:00 2001 From: Pete Gonzalez <4673363+octogonz@users.noreply.github.com> Date: Mon, 26 Feb 2024 22:39:53 -0800 Subject: [PATCH 4/4] Add ThemedImage to control logo color in dark mode --- apps/website/docs/index.md | 10 +++++++++- apps/website/docusaurus.config.js | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/website/docs/index.md b/apps/website/docs/index.md index c16e621..67e398e 100644 --- a/apps/website/docs/index.md +++ b/apps/website/docs/index.md @@ -4,8 +4,16 @@ hide_title: true custom_edit_url: null --- +import { ThemedImage } from '@site/src/components/ThemedImage'; +
- Sparo +
> 🚧 UNDER CONSTRUCTION 🚧 diff --git a/apps/website/docusaurus.config.js b/apps/website/docusaurus.config.js index a581410..a92d16d 100644 --- a/apps/website/docusaurus.config.js +++ b/apps/website/docusaurus.config.js @@ -82,7 +82,8 @@ const config = { title: '', logo: { alt: 'Sparo', - src: 'images/site/sparo-title.svg' + src: 'images/site/sparo-title.svg', + srcDark: 'images/site/sparo-title-dark.svg' }, items: [ {