Skip to content

Commit 914c9cf

Browse files
committed
Merge branch 'ADP-4608' into develop
# Conflicts: # src/css/custom.css # versioned_docs/version-3.0/img/meta-destination.webp # versioned_docs/version-3.0/ios-sdk-migration-guides.md # versioned_docs/version-3.0/meta-create-campaign.md # versioned_docs/version-3.0/tiktok-create-campaign.md # versioned_docs/version-3.0/ua-facebook.md
2 parents 1f10018 + b983d6f commit 914c9cf

29 files changed

Lines changed: 717 additions & 175 deletions

docusaurus.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,8 @@ const config = {
358358
// Configure the color mode to default to light and disable the dark mode switch
359359
colorMode: {
360360
defaultMode: 'light', // Set default theme to light mode
361-
disableSwitch: true, // Disable the toggle for switching themes
362-
respectPrefersColorScheme: false, // Ignore system preference for dark mode
361+
disableSwitch: false, // Enable the toggle for switching themes
362+
respectPrefersColorScheme: true, // Respect system preference for dark mode
363363
},
364364
sidebar: {
365365
autoCollapseCategories: true,

src/components/ArticleButtons/styles.module.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,30 @@
6161
.theme-doc-markdown h1 {
6262
margin-bottom: 0.5em;
6363
margin-top: 0;
64+
}
65+
66+
/* Dark Mode Styles */
67+
[data-theme='dark'] .button {
68+
background: #1e1e1e;
69+
border: 1px solid #2a2a2a;
70+
color: var(--textPrimary);
71+
}
72+
73+
[data-theme='dark'] .button svg {
74+
fill: var(--textPrimary);
75+
color: var(--textPrimary);
76+
}
77+
78+
[data-theme='dark'] .button:hover {
79+
background: #252525;
80+
border-color: #3a3a3a;
81+
}
82+
83+
[data-theme='dark'] .button:focus {
84+
outline: none;
85+
box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.3);
86+
}
87+
88+
[data-theme='dark'] .divider {
89+
background: #2a2a2a;
6490
}

src/components/CustomDocCardList/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ export default function CustomDocCardList({ ids = null }) {
8080

8181
if (filteredItems.length === 0) {
8282
return (
83-
<div style={{padding: '20px', border: '1px solid #e1e5e9', borderRadius: '8px', margin: '20px 0', backgroundColor: '#f8f9fa'}}>
84-
<h3 style={{color: '#4a5568', margin: '0 0 10px 0'}}>Related Topics</h3>
83+
<div className={styles.emptyState}>
84+
<h3>Related Topics</h3>
8585
<p>No related topics found for the specified IDs.</p>
8686
</div>
8787
);
@@ -99,8 +99,8 @@ export default function CustomDocCardList({ ids = null }) {
9999
// Default behavior: use current category items
100100
if (!category || !category.items) {
101101
return (
102-
<div style={{padding: '20px', border: '1px solid #e1e5e9', borderRadius: '8px', margin: '20px 0', backgroundColor: '#f8f9fa'}}>
103-
<h3 style={{color: '#4a5568', margin: '0 0 10px 0'}}>Related Topics</h3>
102+
<div className={styles.emptyState}>
103+
<h3>Related Topics</h3>
104104
<p>No related topics found. This might be because the current page doesn't have child pages in the sidebar.</p>
105105
</div>
106106
);
@@ -114,8 +114,8 @@ export default function CustomDocCardList({ ids = null }) {
114114

115115
if (filteredItems.length === 0) {
116116
return (
117-
<div style={{padding: '20px', border: '1px solid #e1e5e9', borderRadius: '8px', margin: '20px 0', backgroundColor: '#f8f9fa'}}>
118-
<h3 style={{color: '#4a5568', margin: '0 0 10px 0'}}>Related Topics</h3>
117+
<div className={styles.emptyState}>
118+
<h3>Related Topics</h3>
119119
<p>No related topics found. This might be because the current page doesn't have child pages in the sidebar.</p>
120120
</div>
121121
);

src/components/CustomDocCardList/styles.module.css

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,51 @@
107107
font-size: 11px;
108108
-webkit-line-clamp: 2;
109109
}
110+
}
111+
112+
/* Empty state styling */
113+
.emptyState {
114+
padding: 20px;
115+
border: 1px solid #e1e5e9;
116+
border-radius: 8px;
117+
margin: 20px 0;
118+
background-color: #f8f9fa;
119+
}
120+
121+
.emptyState h3 {
122+
color: #4a5568;
123+
margin: 0 0 10px 0;
124+
}
125+
126+
/* Dark Mode Styles */
127+
[data-theme='dark'] .card {
128+
background: #1e1e1e;
129+
border: 1px solid #2a2a2a;
130+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
131+
}
132+
133+
[data-theme='dark'] .card:hover {
134+
border-color: var(--purplePrimary);
135+
box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
136+
}
137+
138+
[data-theme='dark'] .cardTitle {
139+
color: var(--purplePrimary) !important;
140+
}
141+
142+
[data-theme='dark'] .cardDescription {
143+
color: var(--textSecondary) !important;
144+
}
145+
146+
[data-theme='dark'] .emptyState {
147+
background-color: #1e1e1e;
148+
border-color: #2a2a2a;
149+
}
150+
151+
[data-theme='dark'] .emptyState h3 {
152+
color: var(--textPrimary);
153+
}
154+
155+
[data-theme='dark'] .emptyState p {
156+
color: var(--textSecondary);
110157
}

src/components/SidebarMenu/index.jsx

Lines changed: 9 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
22
import { useHistory } from '@docusaurus/router';
33
import { useActiveDocContext } from '@docusaurus/plugin-content-docs/client';
44
import { isMobileSdkDocument, getCorrespondingDocId } from '../../lib/sidebarMapping';
5+
import styles from './styles.module.css';
56

67

78

@@ -132,56 +133,20 @@ export default function SidebarMenu() {
132133

133134

134135
return (
135-
<div style={{
136-
width: '100%',
137-
padding: '24px 16px 8px 16px',
138-
background: '#f8f9fa',
139-
borderBottom: '1px solid #e9ecef',
140-
flexShrink: 0,
141-
boxShadow: '0 1px 3px rgba(0,0,0,0.1)'
142-
}}>
143-
<div style={{
144-
display: 'flex',
145-
alignItems: 'center',
146-
gap: '8px'
147-
}}>
148-
<div style={{
149-
color: '#495057',
150-
fontWeight: '600',
151-
fontSize: '15px',
152-
whiteSpace: 'nowrap'
153-
}}>
136+
<div className={styles.platformSwitcher}>
137+
<div className={styles.switcherInner}>
138+
<div className={styles.switcherLabel}>
154139
Platform:
155140
</div>
156-
<div style={{ position: 'relative', flex: 1 }}>
141+
<div className={styles.selectWrapper}>
157142
<button
158-
style={{
159-
width: '100%',
160-
background: 'white',
161-
border: '1px solid #dee2e6',
162-
borderRadius: '8px',
163-
color: '#495057',
164-
fontSize: '15px',
165-
fontWeight: '500',
166-
padding: '8px 12px',
167-
cursor: 'pointer',
168-
display: 'flex',
169-
alignItems: 'center',
170-
justifyContent: 'space-between',
171-
minWidth: '0'
172-
}}
143+
className={styles.selectButton}
173144
onClick={() => setIsDropdownOpen(!isDropdownOpen)}
174145
onBlur={() => setTimeout(() => setIsDropdownOpen(false), 150)}
175146
>
176147
<span>{currentPlatform.name}</span>
177148
<svg
178-
style={{
179-
width: '12px',
180-
height: '12px',
181-
marginLeft: '8px',
182-
transform: isDropdownOpen ? 'rotate(180deg)' : 'rotate(0deg)',
183-
transition: 'transform 0.2s ease'
184-
}}
149+
className={`${styles.selectIcon} ${isDropdownOpen ? styles.selectIconOpen : ''}`}
185150
fill="currentColor"
186151
viewBox="0 0 20 20"
187152
>
@@ -190,54 +155,15 @@ export default function SidebarMenu() {
190155
</button>
191156

192157
{isDropdownOpen && (
193-
<div style={{
194-
position: 'absolute',
195-
top: '100%',
196-
left: '0',
197-
right: '0',
198-
background: 'white',
199-
border: '1px solid #dee2e6',
200-
borderRadius: '8px',
201-
boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)',
202-
zIndex: 1000,
203-
marginTop: '2px',
204-
padding: '8px'
205-
}}>
158+
<div className={styles.dropdown}>
206159
{platforms.map((platform) => (
207160
<button
208161
key={platform.name}
209-
style={{
210-
width: '100%',
211-
padding: '6px 16px',
212-
background: platform.name === currentPlatform.name ? 'var(--ifm-menu-color-background-active)' : 'transparent',
213-
border: 'none',
214-
textAlign: 'left',
215-
cursor: 'pointer',
216-
fontSize: '15px',
217-
color: platform.name === currentPlatform.name ? 'var(--purplePrimary)' : 'var(--textSecondary)',
218-
fontWeight: platform.name === currentPlatform.name ? '600' : '400',
219-
borderRadius: '8px',
220-
margin: '0'
221-
}}
162+
className={`${styles.dropdownItem} ${platform.name === currentPlatform.name ? styles.dropdownItemActive : ''}`}
222163
onClick={() => {
223164
handlePlatformChange(platform);
224165
setIsDropdownOpen(false);
225166
}}
226-
onMouseEnter={(e) => {
227-
if (platform.name !== currentPlatform.name) {
228-
e.target.style.background = 'var(--ifm-menu-color-background-hover)';
229-
e.target.style.color = 'var(--textPrimary)';
230-
}
231-
}}
232-
onMouseLeave={(e) => {
233-
if (platform.name !== currentPlatform.name) {
234-
e.target.style.background = 'transparent';
235-
e.target.style.color = 'var(--textSecondary)';
236-
} else {
237-
e.target.style.background = 'var(--ifm-menu-color-background-active)';
238-
e.target.style.color = 'var(--purplePrimary)';
239-
}
240-
}}
241167
>
242168
{platform.name}
243169
</button>

0 commit comments

Comments
 (0)