Skip to content

Commit 59dea8a

Browse files
committed
docs: Auto-switch screenshots based on light/dark theme
Use CSS classes (light-only/dark-only) in Starlight docs and GitHub's #gh-light-mode-only/#gh-dark-mode-only fragments in README so only the matching theme screenshot is shown.
1 parent 5e667cf commit 59dea8a

File tree

6 files changed

+31
-19
lines changed

6 files changed

+31
-19
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
Modern, open-source WhatsApp Business Platform. Single binary app.
66

7-
![Dashboard](docs/public/images/dashboard-dark.png)
7+
![Dashboard](docs/public/images/dashboard-light.png#gh-light-mode-only)
8+
![Dashboard](docs/public/images/dashboard-dark.png#gh-dark-mode-only)
89

910
## Features
1011

@@ -38,13 +39,14 @@ Modern, open-source WhatsApp Business Platform. Single binary app.
3839
<details>
3940
<summary>View more screenshots</summary>
4041

41-
![Dashboard Light](docs/public/images/dashboard-light.png)
42-
![Chatbot Dark](docs/public/images/chatbot-dark.png)
43-
![Chatbot Light](docs/public/images/chatbot-light.png)
44-
![Agent Analytics Dark](docs/public/images/agent-analytics-dark.png)
45-
![Agent Analytics Light](docs/public/images/agent-analytics-light.png)
46-
![Conversation Flow Builder Dark](docs/public/images/conversation-flow-dark.png)
47-
![Conversation Flow Builder Light](docs/public/images/conversation-flow-light.png)
42+
![Dashboard](docs/public/images/dashboard-light.png#gh-light-mode-only)
43+
![Dashboard](docs/public/images/dashboard-dark.png#gh-dark-mode-only)
44+
![Chatbot](docs/public/images/chatbot-light.png#gh-light-mode-only)
45+
![Chatbot](docs/public/images/chatbot-dark.png#gh-dark-mode-only)
46+
![Agent Analytics](docs/public/images/agent-analytics-light.png#gh-light-mode-only)
47+
![Agent Analytics](docs/public/images/agent-analytics-dark.png#gh-dark-mode-only)
48+
![Conversation Flow Builder](docs/public/images/conversation-flow-light.png#gh-light-mode-only)
49+
![Conversation Flow Builder](docs/public/images/conversation-flow-dark.png#gh-dark-mode-only)
4850
![Templates](docs/public/images/11-templates.png)
4951
![Campaigns](docs/public/images/13-campaigns.png)
5052

docs/src/content/docs/features/chatbot.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ description: Automate customer conversations with intelligent chatbots
55

66
import { Card, CardGrid, Steps, Aside } from '@astrojs/starlight/components';
77

8-
![Chatbot Overview (Light)](/whatomate/images/chatbot-light.png)
9-
![Chatbot Overview (Dark)](/whatomate/images/chatbot-dark.png)
8+
<img src="/whatomate/images/chatbot-light.png" alt="Chatbot Overview" class="light-only" />
9+
<img src="/whatomate/images/chatbot-dark.png" alt="Chatbot Overview" class="dark-only" />
1010

1111
## Overview
1212

@@ -180,8 +180,8 @@ Design multi-step conversation flows with branching logic to guide customers thr
180180

181181
### Flow Builder
182182

183-
![Conversation Flow Builder (Light)](/whatomate/images/conversation-flow-light.png)
184-
![Conversation Flow Builder (Dark)](/whatomate/images/conversation-flow-dark.png)
183+
<img src="/whatomate/images/conversation-flow-light.png" alt="Conversation Flow Builder" class="light-only" />
184+
<img src="/whatomate/images/conversation-flow-dark.png" alt="Conversation Flow Builder" class="dark-only" />
185185

186186
The visual flow builder allows you to:
187187
- Create multiple conversation steps

docs/src/content/docs/features/dashboard.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ description: Monitor your WhatsApp business at a glance
55

66
import { Card, CardGrid } from '@astrojs/starlight/components';
77

8-
<img src="/whatomate/images/dashboard-light.png" alt="Whatomate Dashboard (Light)" />
9-
<img src="/whatomate/images/dashboard-dark.png" alt="Whatomate Dashboard (Dark)" />
8+
<img src="/whatomate/images/dashboard-light.png" alt="Whatomate Dashboard" class="light-only" />
9+
<img src="/whatomate/images/dashboard-dark.png" alt="Whatomate Dashboard" class="dark-only" />
1010

1111
## Overview
1212

@@ -77,8 +77,8 @@ All widgets and dashboard metrics reflect the selected time period. Number widge
7777

7878
### Agent Analytics
7979

80-
<img src="/whatomate/images/agent-analytics-light.png" alt="Agent Analytics (Light)" />
81-
<img src="/whatomate/images/agent-analytics-dark.png" alt="Agent Analytics (Dark)" />
80+
<img src="/whatomate/images/agent-analytics-light.png" alt="Agent Analytics" class="light-only" />
81+
<img src="/whatomate/images/agent-analytics-dark.png" alt="Agent Analytics" class="dark-only" />
8282

8383
The Agent Analytics page provides performance metrics for your support team, including transfers handled, active conversations, average resolution time, queue time, and break time. It also shows transfer trends over time, conversation source breakdowns, and agent-by-agent comparisons.
8484

docs/src/content/docs/getting-started/introduction.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ description: Welcome to Whatomate - A modern WhatsApp Business Platform
55

66
import { Card, CardGrid } from '@astrojs/starlight/components';
77

8-
![Whatomate Dashboard (Light)](/whatomate/images/dashboard-light.png)
9-
![Whatomate Dashboard (Dark)](/whatomate/images/dashboard-dark.png)
8+
<img src="/whatomate/images/dashboard-light.png" alt="Whatomate Dashboard" class="light-only" />
9+
<img src="/whatomate/images/dashboard-dark.png" alt="Whatomate Dashboard" class="dark-only" />
1010

1111
## What is Whatomate?
1212

docs/src/content/docs/index.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ description: Welcome to Whatomate - A modern WhatsApp Business Platform
55

66
import { Card, CardGrid } from '@astrojs/starlight/components';
77

8-
![Whatomate Dashboard](/whatomate/images/dashboard-light.png)
8+
<img src="/whatomate/images/dashboard-light.png" alt="Whatomate Dashboard" class="light-only" />
9+
<img src="/whatomate/images/dashboard-dark.png" alt="Whatomate Dashboard" class="dark-only" />
910

1011
## What is Whatomate?
1112

docs/src/styles/custom.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,12 @@ img {
3232
border-radius: 8px;
3333
border: 1px solid var(--sl-color-gray-3);
3434
}
35+
36+
/* Theme-aware screenshots: show light image by default, dark in dark mode */
37+
:root[data-theme='light'] .dark-only,
38+
:root:not([data-theme='dark']) .dark-only {
39+
display: none !important;
40+
}
41+
:root[data-theme='dark'] .light-only {
42+
display: none !important;
43+
}

0 commit comments

Comments
 (0)