An open-source, faster Devin alternative
TypeScript
scope the banner to sandboxes
Brian Reardone774d1c2b084
diff --git a/docs/docs.json b/docs/docs.jsonindex 466d04e8..edfe8bbd 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -363,7 +363,7 @@]},"banner": {- "content": "✨ You are viewing the **v2** SDK docs, which have not gone into effect yet. For the docs that describe the platform as it works today, go to [docs-v1.opencomputer.dev](https://docs-v1.opencomputer.dev).",+ "content": "✨ You are viewing the **v2** Sandboxes docs, which have not gone into effect yet. For the Sandboxes docs that describe the platform as it works today, go to [docs-v1.opencomputer.dev](https://docs-v1.opencomputer.dev).","dismissible": false},"logo": {diff --git a/docs/style.css b/docs/style.cssindex ea1483a8..2d813691 100644--- a/docs/style.css+++ b/docs/style.css@@ -1,14 +1,31 @@-/* Pre-cutover notice for the v2 docs.+/* Pre-cutover notice for the v2 Sandboxes docs.*- * The banner takes its background from `bg-primary-dark` (colors.dark, a- * near-black), so it can only be recoloured here — changing colors.dark would- * repaint the whole site. Text is already forced white by the banner's own- * utilities, so only the background needs overriding.+ * Mintlify has no per-tab banner: `extractBannersFromConfig` keys banners only+ * by language (navigation.languages[].banner) or `global` (the root banner+ * key), so the config-level banner is necessarily site-wide. Scoping it to the+ * Sandboxes tab therefore has to happen in CSS.*- * Violet-600 rather than a pastel: white on a genuinely light purple lands- * around 3:1 and fails WCAG AA for 14px text. This reads purple and clears AA- * at ~5.7:1.+ * `data-current-path` is maintained on <html> from usePathname(), so it tracks+ * the live route. Serverless Agents is the only other tab and every one of its+ * 29 pages sits under /agents, which makes hiding cheaper and more robust than+ * enumerating the Sandboxes tab's 13 separate prefixes.*/#banner {+ /* The banner inherits bg-primary-dark (colors.dark, near-black); recolour it+ * here rather than via colors.dark, which would repaint the whole site.+ * Violet-600 not a pastel: white on a genuinely light purple lands near 3:1+ * and fails WCAG AA for 14px text. This clears AA at ~5.7:1. */background-color: #7c3aed !important;}++html[data-current-path^="/agents"] #banner {+ display: none !important;+}++/* An inline script stamps --banner-height from the banner's offsetHeight before+ * the route is known, so without this the layout keeps reserving that space and+ * Agents pages open with an empty purple-less gap. !important is required: the+ * script writes the variable as an inline style on <html>. */+html[data-current-path^="/agents"] {+ --banner-height: 0px !important;+}