Skip to content

Commit

Permalink
Merge pull request #26 from tiktok/octogonz/website-fixes
Browse files Browse the repository at this point in the history
Some cosmetic fixes for the website
  • Loading branch information
octogonz authored Feb 27, 2024
2 parents b90259c + 67b1204 commit 968f1af
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 2 deletions.
17 changes: 16 additions & 1 deletion apps/website/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,25 @@ hide_title: true
custom_edit_url: null
---

import { ThemedImage } from '@site/src/components/ThemedImage';

<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<img src="images/site/sparo-logo.svg" alt="Sparo" title="Sparo" style={{ width: '380px', paddingTop: '30px' }} />
<ThemedImage
srcLight="images/site/sparo-logo.svg"
srcDark="images/site/sparo-logo-dark.svg"
alt="Sparo"
title="Sparo"
style={{ width: '380px', paddingTop: '30px' }}
/>
</div>

> 🚧 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.
Expand Down
7 changes: 7 additions & 0 deletions apps/website/docs/pages/guide/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion apps/website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
{
Expand Down
1 change: 1 addition & 0 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 18 additions & 0 deletions apps/website/src/components/ThemedImage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from 'react';
import { useColorMode } from '@docusaurus/theme-common';

/**
* An `<img>` 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 (
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<img src={src} alt={alt} title={title} style={style} />
</div>
);
};

export { ThemedImage };
3 changes: 3 additions & 0 deletions apps/website/static/images/site/sparo-logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions apps/website/static/images/site/sparo-title-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 968f1af

Please sign in to comment.