Skip to content

Commit

Permalink
fix(rest-api): minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
aamir1995 committed Dec 2, 2024
1 parent d5356a8 commit 1f83da1
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 24 deletions.
60 changes: 41 additions & 19 deletions package-lock.json

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

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"prepare": "husky",
"gen-api-docs": "docusaurus gen-api-docs all",
"clean-api-docs": "docusaurus clean-api-docs all",
"re-gen-api-docs": "npm run clean-api-docs && npm run gen-api-docs"
"re-gen-api-docs": "npm run clean-api-docs && npm run gen-api-docs",
"update-api-submodule": "git submodule update --remote --merge"
},
"dependencies": {
"@cmfcmf/docusaurus-search-local": "^1.2.0",
Expand Down Expand Up @@ -57,9 +58,9 @@
"@typescript-eslint/eslint-plugin": "^8.11.0",
"@typescript-eslint/parser": "^8.11.0",
"copy-webpack-plugin": "^12.0.2",
"docusaurus-plugin-openapi-docs": "^4.1.0",
"docusaurus-plugin-openapi-docs": "^4.2.0",
"docusaurus-plugin-typedoc": "^1.0.5",
"docusaurus-theme-openapi-docs": "^4.1.0",
"docusaurus-theme-openapi-docs": "^4.2.0",
"dts-bundle": "^0.7.3",
"eslint": "^8.57.1",
"eslint-plugin-react": "^7.37.2",
Expand Down
4 changes: 2 additions & 2 deletions sidebars.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';
import dataRestApiV2Sidebar from "./docs/data_rest_api/v2/sidebar";
import apisidebar from "./docs/data_rest_api/v2/sidebar";

/**
* Creating a sidebar enables you to:
Expand Down Expand Up @@ -87,7 +87,7 @@ const sidebars: SidebarsConfig = {
description: "The Novorender REST API allows you to interact with your 3D models uploaded to Novorender.",
slug: "/category/data_rest_api/v2",
},
items: dataRestApiV2Sidebar,
items: apisidebar,
}
]
};
Expand Down
66 changes: 66 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,72 @@ svg[class*="darkToggleIcon"] {
.tut_label_hidden {
display: none !important;
}
/** Open API Docs Styling */

.api-method>.menu__link,
.schema>.menu__link {
align-items: center;
justify-content: start;
}

.api-method>.menu__link::before,
.schema>.menu__link::before {
width: 55px;
height: 20px;
font-size: 12px;
line-height: 20px;
text-transform: uppercase;
font-weight: 600;
border-radius: 0.25rem;
border: 1px solid;
margin-right: var(--ifm-spacing-horizontal);
text-align: center;
flex-shrink: 0;
border-color: transparent;
color: white;
}

.get>.menu__link::before {
content: "get";
background-color: var(--ifm-color-primary);
}

.post>.menu__link::before {
content: "post";
background-color: var(--openapi-code-green);
}

.delete>.menu__link::before {
content: "del";
background-color: var(--openapi-code-red);
}

.put>.menu__link::before {
content: "put";
background-color: var(--openapi-code-blue);
}

.patch>.menu__link::before {
content: "patch";
background-color: var(--openapi-code-orange);
}

.head>.menu__link::before {
content: "head";
background-color: var(--ifm-color-secondary-darkest);
}

.event>.menu__link::before {
content: "event";
background-color: var(--ifm-color-secondary-darkest);
}

.schema>.menu__link::before {
content: "schema";
background-color: var(--ifm-color-secondary-darkest);
}

/** Open API Docs Styling END */
@media screen and (max-width: 599px) {
.aa-DetachedSearchButton {
border-radius: 100% !important;
Expand Down

0 comments on commit 1f83da1

Please sign in to comment.