Skip to content

Commit 0e47b50

Browse files
authored
fix: use white github icon for dark theme (#1084)
Closes #1069 Some changes in `sources/platform/integrations/index.mdx` are because of auto-formatting
1 parent 15c1639 commit 0e47b50

File tree

4 files changed

+32
-12
lines changed

4 files changed

+32
-12
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sources/platform/integrations/index.mdx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ category: platform
66
slug: /integrations
77
---
88

9-
import Card from "@site/src/components/Card";
10-
import CardGrid from "@site/src/components/CardGrid";
9+
import Card from '@site/src/components/Card';
10+
import CardGrid from '@site/src/components/CardGrid';
1111

1212
# Integrations
1313

1414
**Learn how to integrate the Apify platform with other services, your systems, data pipelines, and other web automation workflows.**
1515

1616
---
1717

18-
> The whole is greater than the sum of its parts.
19-
>
20-
> 👴 *Aristotle*
18+
> The whole is greater than the sum of its parts.
19+
>
20+
> 👴 _Aristotle_
2121
2222
Integrations allow you to combine separate applications and take advantage of their combined capabilities. Automation of these online processes increases your productivity. That's why we made Apify in a way that allows you to connect it with practically any cloud service or web app and make it part of your larger projects.
2323

@@ -46,7 +46,8 @@ Apify‘s RESTful API allows you to interact with the platform programmatically.
4646
to="/platform/integrations/webhooks"
4747
smallImage
4848
/>
49-
</CardGrid><br />
49+
</CardGrid>
50+
<br />
5051

5152
Apify offers easy-to-set-up solutions for common scenarios, like uploading your datasets to Google Drive when the run succeeds or creating an issue on GitHub when it fails.
5253

@@ -73,6 +74,7 @@ Apify offers easy-to-set-up solutions for common scenarios, like uploading your
7374
title="GitHub"
7475
to="/platform/integrations/github"
7576
imageUrl="/img/platform/integrations/github.svg"
77+
imageUrlDarkTheme="/img/platform/integrations/github-white.svg"
7678
smallImage
7779
/>
7880
<Card
@@ -141,8 +143,8 @@ The Apify platform integrates with popular ETL and data pipeline services, enabl
141143
imageUrl="/img/platform/integrations/airbyte.svg"
142144
smallImage
143145
/>
144-
</CardGrid><br />
145-
146+
</CardGrid>
147+
<br />
146148

147149
If you are working on an AI/LLM-related project, we recommend you look into the Langchain integration.
148150

src/components/Card.jsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1-
import React from 'react';
21
import Link from '@docusaurus/Link';
2+
import { useColorMode } from '@docusaurus/theme-common';
33
import clsx from 'clsx';
4+
import React, { useEffect, useState } from 'react';
5+
46
import styles from './Cards.module.css';
57

68
// TODO: Better sizing for logo images (in integrations)
7-
const Card = ({ to, imageUrl, title, desc, smallImage }) => {
9+
const Card = ({ to, imageUrl, imageUrlDarkTheme, title, desc, smallImage }) => {
10+
const [themeIsDark, setThemeIsDark] = useState(true);
11+
const isDark = useColorMode().isDarkTheme;
12+
useEffect(() => {
13+
setThemeIsDark(isDark);
14+
}, [isDark]);
15+
816
return (
917
<div className={clsx(styles.card, styles['card-hoverable'])}>
1018
<Link to={to}>
1119
{!imageUrl || (<div className={styles[smallImage ? 'card-image-container-small' : 'card-image-container']}>
12-
<img src={imageUrl}/>
20+
<img src={imageUrlDarkTheme && themeIsDark ? imageUrlDarkTheme : imageUrl }/>
1321
</div>)}
1422
<div style={{ padding: '0px 1rem 1rem', paddingBottom: desc ? '1rem' : '0' }}>
1523
<h4 style={{ fontSize: '120%' }}>{title}</h4>
Lines changed: 10 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)