Skip to content

Commit 344a981

Browse files
Add dark mode images to docs
1 parent aad0d4d commit 344a981

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

spiceaidocs/docs/index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ slug: /
44
title: Home
55
---
66

7+
import ThemeBasedImage from '@site/src/components/ThemeBasedImage';
8+
79
# Spice.ai OSS
810

911
## What is Spice?
@@ -14,19 +16,19 @@ Spice makes it easy to build data-driven and data-intensive applications by stre
1416

1517
The Spice runtime is written in Rust and leverages industry leading technologies like Apache DataFusion, Apache Arrow, Apache Arrow Flight, and DuckDB.
1618

17-
<img width="900" alt="OGP" src="https://github.com/spiceai/docs/assets/80174/74d201f9-a954-450b-a7c7-b73ae11aeede" />
19+
<ThemeBasedImage width="900" alt="OGP" lightSrc="https://github.com/spiceai/spiceai/assets/80174/f71f227d-d7cd-418c-85b9-5c663a728491" darkSrc="https://github.com/spiceai/spiceai/assets/80174/96b5fcef-a550-4ce8-a74a-83931275e83e" />
1820

1921
## Why Spice?
2022

2123
Spice makes querying data by SQL across one or more data sources simple and fast. Easily co-locate a managed working set of your data with your application or ML, locally accelerated in-memory with Arrow, with SQLite/DuckDB, or with an attached database like PostgreSQL for high-performance, low-latency queries.
2224

2325
### Before Spice
2426

25-
<img width="750" alt="Before Spice" src="https://github.com/spiceai/docs/assets/80174/05732e82-6609-4d6b-981f-ff514e93e56f" />
27+
<ThemeBasedImage width="750" alt="Before Spice" lightSrc="https://github.com/spiceai/spiceai/assets/80174/0550d682-cf3b-4b1b-a3bd-d8b3ad7d8caf" darkSrc="https://github.com/spiceai/spiceai/assets/80174/64a3216e-0bbb-48b0-bf98-72e656d690af" />
2628

2729
### With Spice
2830

29-
<img width="900" alt="With Spice" src="https://github.com/spiceai/docs/assets/80174/21107db5-ee25-4416-b292-7c08af99cfe6" />
31+
<ThemeBasedImage width="900" alt="With Spice" lightSrc="https://github.com/spiceai/spiceai/assets/80174/b57514fe-d53d-42de-b8f0-97ae313c5708" darkSrc="https://github.com/spiceai/spiceai/assets/80174/02dbedb4-b209-4d08-bf83-4785a1bf886f" />
3032

3133
### Example Use-Cases
3234

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from 'react';
2+
import {useColorMode} from '@docusaurus/theme-common';
3+
4+
const ThemeBasedImage = ({ width, lightSrc, darkSrc, alt }) => {
5+
const { colorMode } = useColorMode();
6+
7+
return (
8+
<img width={width} src={colorMode === "dark" ? darkSrc : lightSrc} alt={alt} />
9+
);
10+
};
11+
12+
export default ThemeBasedImage;

0 commit comments

Comments
 (0)