Skip to content

Commit 08c8be7

Browse files
committed
chore: add custom css
1 parent a500750 commit 08c8be7

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

Diff for: src/index.ts

+40-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,46 @@ app.get(
1818
spec: {
1919
url: "/openapi.json",
2020
},
21-
layout: "modern",
22-
theme: "bluePlanet",
21+
layout: "classic",
22+
customCss: /* css */`
23+
.section.introduction-section {
24+
padding: 16px 0 !important;
25+
}
26+
27+
.section-container {
28+
border: none !important;
29+
padding: 0 !important;
30+
}
31+
32+
.tag-section {
33+
padding: 0 !important;
34+
}
35+
36+
.endpoint-label-path {
37+
display: none !important;
38+
}
39+
40+
.show-api-client-button {
41+
background: var(--theme-color-accent) !important;
42+
}
43+
44+
.scalar-codeblock-code {
45+
display: unset;
46+
}
47+
48+
:root {
49+
--theme-color-accent: rgb(59, 130, 246);
50+
--theme-color-background: hsla(348, 71%, 93%, 1);
51+
--scalar-api-client-color: var(--theme-color-accent);
52+
--scalar-background-1: hsla(241.9, 6.3926%, 10.038%) !important;
53+
}
54+
55+
.dark-mode {
56+
--scalar-background-1: hsla(241.9, 6.3926%, 10.038%) !important;
57+
--scalar-color-accent: rgb(59, 130, 246) !important;
58+
--scalar-color-background: hsla(348, 24%, 12%, 1) !important;
59+
}
60+
`,
2361
}),
2462
);
2563

0 commit comments

Comments
 (0)