Skip to content

Commit aef7c24

Browse files
authored
Merge branch 'main' into docs-fix-styling-3022
2 parents b7623cd + ae3d249 commit aef7c24

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1120
-271
lines changed

.github/workflows/build_and_check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313

1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717

1818
- name: Set up Node.js
19-
uses: actions/setup-node@v2
19+
uses: actions/setup-node@v5
2020
with:
21-
node-version: 18.0.0
21+
node-version: 20.0.0
2222

2323
- name: Install Dependencies
2424
run: npm install

src/components/QuickStartFilter.js

Lines changed: 148 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {TbBrandCSharp} from "react-icons/tb";
99
import {FaPython} from "react-icons/fa";
1010
import {FaDocker} from "react-icons/fa";
1111
import {IoLogoJavascript} from "react-icons/io5";
12+
import {useColorMode} from "@docusaurus/theme-common";
1213

1314
// 🔹 Wrapper for icons to make them uniform
1415
const IconWrapper = ({icon, bg}) => (
@@ -20,7 +21,7 @@ const IconWrapper = ({icon, bg}) => (
2021
alignItems: "center",
2122
justifyContent: "center",
2223
borderRadius: "50%",
23-
backgroundColor: bg || "#f3f4f6",
24+
backgroundColor: bg,
2425
boxShadow: "0 3px 6px rgba(0,0,0,0.1)",
2526
transition: "transform 0.2s ease",
2627
}}
@@ -31,6 +32,9 @@ const IconWrapper = ({icon, bg}) => (
3132
);
3233

3334
export default function QuickstartFilter({defaultLanguage = null}) {
35+
const {colorMode} = useColorMode();
36+
const isDark = colorMode === "dark";
37+
3438
// 👇 initialize with defaultLanguage if provided
3539
const [language, setLanguage] = useState(defaultLanguage);
3640
const [server, setServer] = useState(null);
@@ -42,6 +46,18 @@ export default function QuickstartFilter({defaultLanguage = null}) {
4246
);
4347
});
4448

49+
// Icon backgrounds for dark mode
50+
const darkIconBgs = {
51+
Go: "#223044",
52+
Python: "#243447",
53+
Java: "#392a2a",
54+
"JS/TS": "#3b3924",
55+
Rust: "#44392b",
56+
"C#": "#332e44",
57+
Local: "#44392b",
58+
Docker: "#233044",
59+
};
60+
4561
const languages = [
4662
{
4763
name: "Go",
@@ -88,6 +104,79 @@ export default function QuickstartFilter({defaultLanguage = null}) {
88104
},
89105
];
90106

107+
// ----- Styles -----
108+
const headingStyle = {
109+
textAlign: "left",
110+
marginLeft: "1rem",
111+
fontSize: "1.4rem",
112+
fontWeight: "600",
113+
color: isDark ? "#fff" : "#222",
114+
};
115+
116+
const serverContainer = {
117+
display: "flex",
118+
flexWrap: "wrap",
119+
gap: "1.5rem",
120+
justifyContent: "flex-start",
121+
marginTop: "1.5rem",
122+
marginLeft: "1rem",
123+
};
124+
125+
const stepContainer = {
126+
display: "flex",
127+
flexWrap: "wrap",
128+
gap: "1.5rem",
129+
marginLeft: "1rem",
130+
justifyContent: "flex-start",
131+
marginTop: "1.5rem",
132+
};
133+
134+
const buttonCard = {
135+
border: isDark ? "2px solid #333" : "2px solid #ddd",
136+
borderRadius: "12px",
137+
padding: "1rem 2rem",
138+
cursor: "pointer",
139+
background: isDark ? "#222428" : "#fff",
140+
transition: "all 0.2s ease",
141+
textAlign: "center",
142+
display: "flex",
143+
flexDirection: "column",
144+
alignItems: "center",
145+
justifyContent: "center",
146+
gap: "0.5rem",
147+
color: isDark ? "#fff" : "#222",
148+
boxShadow: isDark
149+
? "0 2px 10px rgba(0,0,0,0.5)"
150+
: "0 2px 6px rgba(0, 0, 0, 0.08)",
151+
};
152+
153+
const gridContainer = {
154+
display: "grid",
155+
gap: "1.5rem",
156+
gridTemplateColumns: "repeat(auto-fit, minmax(250px, 1fr))",
157+
marginTop: "2rem",
158+
};
159+
160+
const cardStyle = {
161+
border: isDark ? "1px solid #333" : "1px solid #eee",
162+
borderRadius: "12px",
163+
padding: "1rem",
164+
background: isDark ? "#23272f" : "#fff",
165+
boxShadow: isDark
166+
? "0 2px 10px rgba(0,0,0,0.6)"
167+
: "0 2px 6px rgba(0, 0, 0, 0.08)",
168+
color: isDark ? "#fff" : "#222",
169+
};
170+
171+
const linkStyle = {
172+
marginTop: "0.8rem",
173+
display: "inline-block",
174+
color: "#f97316",
175+
fontWeight: "bold",
176+
textDecoration: "none",
177+
};
178+
179+
// ----- Render -----
91180
return (
92181
<div style={{marginTop: "2rem"}}>
93182
{/* Language Selection */}
@@ -100,15 +189,32 @@ export default function QuickstartFilter({defaultLanguage = null}) {
100189
style={{
101190
...buttonCard,
102191
border:
103-
language === lang.name ? "2px solid #f97316" : "2px solid #ddd",
192+
language === lang.name
193+
? "2px solid #f97316"
194+
: buttonCard.border,
104195
boxShadow:
105196
language === lang.name
106-
? "0 3px 8px rgba(249, 115, 22, 0.3)"
107-
: "none",
197+
? isDark
198+
? "0 3px 12px rgba(249,115,22,0.2)"
199+
: "0 3px 8px rgba(249, 115, 22, 0.3)"
200+
: buttonCard.boxShadow,
108201
}}
109202
>
110-
<IconWrapper icon={lang.icon} bg={lang.bg} />
111-
<p style={{marginTop: "0.5rem", fontWeight: "500"}}>{lang.name}</p>
203+
<IconWrapper
204+
icon={lang.icon}
205+
bg={isDark ? darkIconBgs[lang.name] || "#222" : lang.bg}
206+
/>
207+
<p
208+
style={{
209+
margin: 0,
210+
fontWeight: "500",
211+
color: isDark ? "#fff" : "#222",
212+
opacity: language === lang.name ? 1 : 0.7,
213+
transition: "color 0.2s, opacity 0.2s",
214+
}}
215+
>
216+
{lang.name}
217+
</p>
112218
</button>
113219
))}
114220
</div>
@@ -125,15 +231,30 @@ export default function QuickstartFilter({defaultLanguage = null}) {
125231
style={{
126232
...buttonCard,
127233
border:
128-
server === srv.name ? "2px solid #f97316" : "2px solid #ddd",
234+
server === srv.name ? "2px solid #f97316" : buttonCard.border,
129235
boxShadow:
130236
server === srv.name
131-
? "0 3px 8px rgba(249, 115, 22, 0.3)"
132-
: "none",
237+
? isDark
238+
? "0 3px 12px rgba(249,115,22,0.2)"
239+
: "0 3px 8px rgba(249, 115, 22, 0.3)"
240+
: buttonCard.boxShadow,
133241
}}
134242
>
135-
<IconWrapper icon={srv.icon} bg={srv.bg} />
136-
<p style={{marginTop: "0.5rem", fontWeight: "500"}}>{srv.name}</p>
243+
<IconWrapper
244+
icon={srv.icon}
245+
bg={isDark ? darkIconBgs[srv.name] || "#222" : srv.bg}
246+
/>
247+
<p
248+
style={{
249+
margin: 0,
250+
fontWeight: "500",
251+
color: isDark ? "#fff" : "#222",
252+
opacity: server === srv.name ? 1 : 0.7,
253+
transition: "color 0.2s, opacity 0.2s",
254+
}}
255+
>
256+
{srv.name}
257+
</p>
137258
</button>
138259
))}
139260
</div>
@@ -148,10 +269,21 @@ export default function QuickstartFilter({defaultLanguage = null}) {
148269
{filteredQuickstarts.length > 0 ? (
149270
filteredQuickstarts.map((app, idx) => (
150271
<div key={idx} style={cardStyle}>
151-
<h3 style={{margin: "0 0 0.5rem 0", fontSize: "1.2rem"}}>
272+
<h3
273+
style={{
274+
margin: "0 0 0.5rem 0",
275+
fontSize: "1.2rem",
276+
color: isDark ? "#fff" : "#222",
277+
}}
278+
>
152279
{app.title}
153280
</h3>
154-
<p style={{color: "#555", fontSize: "0.95rem"}}>
281+
<p
282+
style={{
283+
color: isDark ? "#ccc" : "#555",
284+
fontSize: "0.95rem",
285+
}}
286+
>
155287
{app.description}
156288
</p>
157289
<Link to={app.link} style={linkStyle}>
@@ -160,70 +292,13 @@ export default function QuickstartFilter({defaultLanguage = null}) {
160292
</div>
161293
))
162294
) : (
163-
<p>No quickstarts available for this selection.</p>
295+
<p style={{color: isDark ? "#fff" : "#222"}}>
296+
No quickstarts available for this selection.
297+
</p>
164298
)}
165299
</div>
166300
</>
167301
)}
168302
</div>
169303
);
170304
}
171-
172-
// Styles
173-
const headingStyle = {
174-
textAlign: "left",
175-
marginLeft: "1rem",
176-
fontSize: "1.4rem",
177-
fontWeight: "600",
178-
};
179-
180-
const serverContainer = {
181-
display: "flex",
182-
flexWrap: "wrap",
183-
gap: "1.5rem",
184-
justifyContent: "flex-start",
185-
marginTop: "1.5rem",
186-
marginLeft: "1rem",
187-
};
188-
189-
const stepContainer = {
190-
display: "flex",
191-
flexWrap: "wrap",
192-
gap: "1.5rem",
193-
marginLeft: "1rem",
194-
justifyContent: "flex-start",
195-
marginTop: "1.5rem",
196-
};
197-
198-
const buttonCard = {
199-
border: "2px solid #ddd",
200-
borderRadius: "12px",
201-
padding: "1rem 2rem",
202-
cursor: "pointer",
203-
background: "#fff",
204-
transition: "all 0.2s ease",
205-
textAlign: "center",
206-
};
207-
208-
const gridContainer = {
209-
display: "grid",
210-
gap: "1.5rem",
211-
gridTemplateColumns: "repeat(auto-fit, minmax(250px, 1fr))",
212-
marginTop: "2rem",
213-
};
214-
215-
const cardStyle = {
216-
border: "1px solid #eee",
217-
borderRadius: "12px",
218-
padding: "1rem",
219-
background: "#fff",
220-
boxShadow: "0 2px 6px rgba(0, 0, 0, 0.08)",
221-
};
222-
223-
const linkStyle = {
224-
marginTop: "0.8rem",
225-
display: "inline-block",
226-
color: "#f97316",
227-
fontWeight: "bold",
228-
textDecoration: "none",
229-
};

src/components/QuickStartList.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,14 @@ const quickstarts = [
193193
},
194194

195195
// python list
196+
{
197+
title: "E-commerce Microservices",
198+
language: "Python",
199+
server: "Docker",
200+
description:
201+
"This guide walks you through testing an E-commerce microservices application using Keploy.",
202+
link: "/docs/quickstart/samples-microservices/",
203+
},
196204

197205
{
198206
title: "Django + Postgres",

src/css/custom.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ div[class^="sidebar_"] .button svg {
243243
/* Search */
244244

245245
.DocSearch-Button {
246-
@apply rounded-lg p-5 !important;
246+
@apply rounded-lg px-3 py-2 !important;
247247
}
248248

249249
.button.button--secondary.button--outline:not(.button--active):not(:hover) {
@@ -273,7 +273,7 @@ footer svg {
273273
}
274274

275275
.DocSearch-Button {
276-
@apply mr-[-18px] !important;
276+
@apply mr-2 !important;
277277
}
278278

279279
/* .footer .footer__block {

src/pages/concepts/reference/glossary.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, {useState, useMemo} from "react";
22
import Layout from "@theme/Layout";
3+
import BackToTopButton from "@theme/BackToTopButton";
34

45
import {glossaryEntries} from "../../../../static/data/glossaryEntries";
56
import GlossaryCard from "../../../components/GlossaryCard";
@@ -127,6 +128,7 @@ function Glossary() {
127128
</div>
128129
)}
129130
</div>
131+
<BackToTopButton />
130132
</main>
131133
</Layout>
132134
);
-1.34 MB
Binary file not shown.
23 KB
Loading
168 KB
Loading
-114 KB
Loading
-69.7 KB
Loading

0 commit comments

Comments
 (0)