Skip to content

Commit 95f263e

Browse files
authored
Merge pull request #2141 from mateuszbartosik/RavenDB-25117
RavenDB-25117 Allow usage of local images for Card components
2 parents 6e424b1 + 92b834f commit 95f263e

File tree

7 files changed

+113
-84
lines changed

7 files changed

+113
-84
lines changed

src/components/Homepage/UseCases/CloudUseCases.tsx

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,51 @@ import Heading from "@theme/Heading";
33
import UseCaseItem from "@site/src/components/Homepage/UseCases/UseCaseItem";
44
import Link from "@docusaurus/Link";
55
import { Icon } from "../../Common/Icon";
6+
import connectingCSharpApplicationToCloudImg from "@site/static/img/cloud/connecting-c-application-article-cover.jpg";
7+
import connectingNodeJsApplicationToCloudImg from "@site/static/img/cloud/connecting-nodejs-to-ravendb-article-cover.jpg";
68

79
const cloudUseCases = [
8-
{
9-
title: "Connecting C# application to Cloud",
10-
imgSrc:
11-
"https://ravendb.net/wp-content/uploads/2025/01/connecting-c-application-article-cover.jpg",
12-
description: (
13-
<>
14-
Learn how to connect to your Cloud instance with C#, and how to confirm
15-
your connection is established.
16-
</>
17-
),
18-
url: "https://ravendb.net/articles/connecting-c-application-to-ravendb-cloud",
19-
},
20-
{
21-
title: "Connecting Node.js application to Cloud",
22-
imgSrc:
23-
"https://ravendb.net/wp-content/uploads/2025/01/connecting-nodejs-to-ravendb-article-cover.jpg",
24-
description: (
25-
<>
26-
Learn how to connect to your Cloud instance with Node.js, and how to
27-
confirm your connection is established.
28-
</>
29-
),
30-
url: "https://ravendb.net/articles/connecting-node-js-application-to-ravendb-cloud",
31-
},
10+
{
11+
title: "Connecting C# application to Cloud",
12+
imgSrc: connectingCSharpApplicationToCloudImg,
13+
description: (
14+
<>
15+
Learn how to connect to your Cloud instance with C#, and how to
16+
confirm your connection is established.
17+
</>
18+
),
19+
url: "https://ravendb.net/articles/connecting-c-application-to-ravendb-cloud",
20+
},
21+
{
22+
title: "Connecting Node.js application to Cloud",
23+
imgSrc: connectingNodeJsApplicationToCloudImg,
24+
description: (
25+
<>
26+
Learn how to connect to your Cloud instance with Node.js, and
27+
how to confirm your connection is established.
28+
</>
29+
),
30+
url: "https://ravendb.net/articles/connecting-node-js-application-to-ravendb-cloud",
31+
},
3232
];
3333

3434
export default function CloudUseCases(): ReactNode {
35-
return (
36-
<section className="mb-8">
37-
<div className="flex justify-between items-baseline">
38-
<Heading as="h3">Use cases</Heading>
39-
<Link
40-
to="https://ravendb.net/articles"
41-
className="inline-flex text-base/4 gap-2"
42-
>
43-
See all <Icon icon="newtab" size="xs" />
44-
</Link>
45-
</div>
46-
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
47-
{cloudUseCases.map((props, idx) => (
48-
<UseCaseItem key={idx} {...props} />
49-
))}
50-
</div>
51-
</section>
52-
);
35+
return (
36+
<section className="mb-8">
37+
<div className="flex justify-between items-baseline">
38+
<Heading as="h3">Use cases</Heading>
39+
<Link
40+
to="https://ravendb.net/articles"
41+
className="inline-flex text-base/4 gap-2"
42+
>
43+
See all <Icon icon="newtab" size="xs" />
44+
</Link>
45+
</div>
46+
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
47+
{cloudUseCases.map((props, idx) => (
48+
<UseCaseItem key={idx} {...props} />
49+
))}
50+
</div>
51+
</section>
52+
);
5353
}

src/components/Homepage/UseCases/UseCases.tsx

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,51 +3,51 @@ import Heading from "@theme/Heading";
33
import UseCaseItem from "@site/src/components/Homepage/UseCases/UseCaseItem";
44
import Link from "@docusaurus/Link";
55
import { Icon } from "../../Common/Icon";
6+
import surviveTheAiTidalWaveWithRavenDBGenAiImg from "@site/static/img/ravendb/article-cover-genai.png";
7+
import processingInvoicesUsingDataSubscriptionsInRavenDbImg from "@site/static/img/ravendb/processing-invoices-article-cover.jpg";
68

79
const useCases = [
8-
{
9-
title: "Survive the AI tidal wave with RavenDB & GenAI",
10-
imgSrc:
11-
"https://ravendb.net/wp-content/uploads/2025/06/article-cover-genai.png",
12-
description: (
13-
<>
14-
Learn how to harness the power of Generative AI by pairing it with a
15-
high-performance document database.
16-
</>
17-
),
18-
url: "https://ravendb.net/articles/survive-the-ai-tidal-wave-with-ravendb-genai",
19-
},
20-
{
21-
title: "Processing invoices using Data Subscriptions in RavenDB",
22-
imgSrc:
23-
"https://ravendb.net/wp-content/uploads/2024/12/processing-invoices-article-cover.jpg",
24-
description: (
25-
<>
26-
Learn how to process invoices in asynchronous manner using the data
27-
subscriptions feature
28-
</>
29-
),
30-
url: "https://ravendb.net/articles/processing-invoices-using-data-subscriptions-in-ravendb",
31-
},
10+
{
11+
title: "Survive the AI tidal wave with RavenDB & GenAI",
12+
imgSrc: surviveTheAiTidalWaveWithRavenDBGenAiImg,
13+
description: (
14+
<>
15+
Learn how to harness the power of Generative AI by pairing it
16+
with a high-performance document database.
17+
</>
18+
),
19+
url: "https://ravendb.net/articles/survive-the-ai-tidal-wave-with-ravendb-genai",
20+
},
21+
{
22+
title: "Processing invoices using Data Subscriptions in RavenDB",
23+
imgSrc: processingInvoicesUsingDataSubscriptionsInRavenDbImg,
24+
description: (
25+
<>
26+
Learn how to process invoices in asynchronous manner using the
27+
data subscriptions feature
28+
</>
29+
),
30+
url: "https://ravendb.net/articles/processing-invoices-using-data-subscriptions-in-ravendb",
31+
},
3232
];
3333

3434
export default function UseCases(): ReactNode {
35-
return (
36-
<section className="mb-8">
37-
<div className="flex justify-between items-baseline">
38-
<Heading as="h3">Use cases</Heading>
39-
<Link
40-
to="https://ravendb.net/articles"
41-
className="inline-flex text-base/4 gap-2"
42-
>
43-
See all <Icon icon="newtab" size="xs" />
44-
</Link>
45-
</div>
46-
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
47-
{useCases.map((props, idx) => (
48-
<UseCaseItem key={idx} {...props} />
49-
))}
50-
</div>
51-
</section>
52-
);
35+
return (
36+
<section className="mb-8">
37+
<div className="flex justify-between items-baseline">
38+
<Heading as="h3">Use cases</Heading>
39+
<Link
40+
to="https://ravendb.net/articles"
41+
className="inline-flex text-base/4 gap-2"
42+
>
43+
See all <Icon icon="newtab" size="xs" />
44+
</Link>
45+
</div>
46+
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4">
47+
{useCases.map((props, idx) => (
48+
<UseCaseItem key={idx} {...props} />
49+
))}
50+
</div>
51+
</section>
52+
);
5353
}

src/typescript/images.d.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
declare module "*.png" {
2+
const src: string;
3+
export default src;
4+
}
5+
6+
declare module "*.jpg" {
7+
const src: string;
8+
export default src;
9+
}
10+
11+
declare module "*.jpeg" {
12+
const src: string;
13+
export default src;
14+
}
15+
16+
declare module "*.svg" {
17+
const src: string;
18+
export default src;
19+
}
20+
21+
declare module "*.webp" {
22+
const src: string;
23+
export default src;
24+
}
25+
26+
declare module "*.gif" {
27+
const src: string;
28+
export default src;
29+
}
32.9 KB
Loading
33.3 KB
Loading
58.7 KB
Loading
27.9 KB
Loading

0 commit comments

Comments
 (0)