Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
version navigation now done through dropdown
0div5d921a6c0873
diff --git a/apps/web/prebuild.js b/apps/web/prebuild.jsindex 1928ab71f..4b743dc5c 100644--- a/apps/web/prebuild.js+++ b/apps/web/prebuild.js@@ -70,12 +70,18 @@ function buildRoutes(dirName, dir, basePath = '', depth = 1) {Object.keys(hierarchy[dirName]).length > 1) {const versions = Object.keys(hierarchy[dirName])- const versionLinks = `${versions- .map(- (version) =>- `<a href="/docs/api-reference/${dirName}/${version}" className="version-link">[${version}]</a>`- )- .join('\n ')}`+ const versionLinks = `<div className="versions-dropdown">+ ${versions[0]} ▼+ <div className="dropdown-content">+ ${versions+ .slice(1)+ .map(+ (version) =>+ `<a href="/docs/api-reference/${dirName}/${version}" className="version-link">${version}</a>`+ )+ .join('\n ')}+ </div>+ </div>`mdxContent = `${versionLinks}\n\n\n${mdxContent}`}diff --git a/apps/web/src/styles/tailwind.css b/apps/web/src/styles/tailwind.cssindex 086631d42..b40f7e162 100644--- a/apps/web/src/styles/tailwind.css+++ b/apps/web/src/styles/tailwind.css@@ -48,8 +48,30 @@border-radius: 10px;}+ .dropdown-content {+ display: none;+ flex-direction: column;+ position: absolute;+ background-color: rgb(30, 41, 59);+ z-index: 1;+ }++ .versions-dropdown {+ color: rgb(229, 123, 0);+ font-size: 1.3em;+ font-weight: 600;+ cursor: pointer;+ margin-bottom: 1em !important;+ p {+ margin-bottom: 0px !important;+ }+ }++ .versions-dropdown:hover .dropdown-content {+ display: flex;+ }+.version-link {- color: rgb(0, 255, 0) !important;text-decoration: none !important;}