Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,16 +209,9 @@ module.exports = {
additionalLanguages: ["bash", "docker", "json"],
},
colorMode: {
// "light" | "dark"
defaultMode: "light",

// Hides the switch in the navbar
// Useful if you want to support a single color mode
disableSwitch: true,

// Should we use the prefers-color-scheme media-query,
// using user system preferences, instead of the hardcoded defaultMode
respectPrefersColorScheme: false,
disableSwitch: false,
respectPrefersColorScheme: true,
},
},
presets: [
Expand Down
28 changes: 1 addition & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ HTTP method badges: tinted background with dark text (WCAG AA), e.g. POST `rgba(
- Max content width: 840px (`.theme-doc-markdown`)
- Container width: 1366px
- Navbar height: 4rem
- Light mode only (dark mode switch disabled)
- Theme selector in the navbar: System (default), Light, or Dark. System follows the OS setting

## Components

Expand Down
20 changes: 13 additions & 7 deletions src/components/Homepage.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
border: none;
}

.btnSecondary {
/* Outrank Infima's `.button.button--secondary` dark text colour. */
.btnSecondary:global(.button.button--secondary) {
display: inline-flex;
align-items: center;
gap: 0.5rem;
Expand All @@ -71,7 +72,7 @@
color: var(--ifm-heading-color);
}

.btnSecondary:hover {
.btnSecondary:global(.button.button--secondary):hover {
background: var(--paper-shade);
color: var(--ifm-heading-color);
}
Expand Down Expand Up @@ -318,7 +319,7 @@
font-size: clamp(2.25rem, 4vw, 2.9rem);
font-weight: 600;
letter-spacing: -0.005em;
color: var(--ifm-background-color);
color: var(--on-ink-plate);
margin-bottom: 0.75rem;
}

Expand Down Expand Up @@ -396,16 +397,16 @@

/* Secondary button needs an outline-on-dark variant here; the base
.btnSecondary assumes a paper background. */
.finalCta .btnSecondary {
.finalCta .btnSecondary:global(.button.button--secondary) {
background: transparent;
border-color: rgba(253, 252, 250, 0.25);
color: var(--ifm-background-color);
color: var(--on-ink-plate);
}

.finalCta .btnSecondary:hover {
.finalCta .btnSecondary:global(.button.button--secondary):hover {
background: rgba(253, 252, 250, 0.08);
border-color: rgba(253, 252, 250, 0.5);
color: var(--ifm-background-color);
color: var(--on-ink-plate);
}

/* The GitHub mark ships as a dark octocat that disappears on ink.
Expand All @@ -414,6 +415,11 @@
filter: brightness(0) invert(1);
}

/* The GitHub SVG has a dark fill, so make it legible on the dark hero. */
:global(html[data-theme="dark"]) .hero .githubIcon {
filter: brightness(0) invert(1);
}

/* --- TERMINAL --- */

.terminalWindow {
Expand Down
14 changes: 7 additions & 7 deletions src/components/documentation/ApiEndpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ function renderValues(text) {

const MethodBadge = ({ method = "" }) => {
const colors = {
GET: { bg: "rgba(97, 175, 254, 0.18)", fg: "#0060a1" },
POST: { bg: "rgba(73, 204, 144, 0.16)", fg: "#047857" },
PUT: { bg: "rgba(252, 161, 48, 0.18)", fg: "#92400e" },
DELETE: { bg: "rgba(249, 62, 62, 0.12)", fg: "#b91c1c" },
PATCH: { bg: "rgba(80, 227, 194, 0.18)", fg: "#0f766e" },
HEAD: { bg: "rgba(144, 97, 249, 0.14)", fg: "#6d28d9" },
GET: { bg: "rgba(97, 175, 254, 0.18)", fg: "var(--method-get-text)" },
POST: { bg: "rgba(73, 204, 144, 0.16)", fg: "var(--method-post-text)" },
PUT: { bg: "rgba(252, 161, 48, 0.18)", fg: "var(--method-put-text)" },
DELETE: { bg: "rgba(249, 62, 62, 0.12)", fg: "var(--method-delete-text)" },
PATCH: { bg: "rgba(80, 227, 194, 0.18)", fg: "var(--method-patch-text)" },
HEAD: { bg: "rgba(144, 97, 249, 0.14)", fg: "var(--method-head-text)" },
};

const isMultipart = !method;
const safeMethod = isMultipart ? "multipart/form-data" : method.toUpperCase();
const color = colors[safeMethod] || {
bg: "rgba(100, 116, 139, 0.14)",
fg: "#475569",
fg: "var(--method-default-text)",
};

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/documentation/ApiEndpoint.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@

.paramDefault code {
font-size: 0.75rem;
background-color: rgba(241, 245, 249, 0.8);
background-color: var(--ifm-color-emphasis-100);
color: var(--ifm-color-primary-dark);
}

Expand Down
Loading
Loading