Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update OpenAPI docs plugin to v2.0.0 #349

Merged
merged 20 commits into from
Nov 10, 2023
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
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@
},
"dependencies": {
"@docsearch/react": "^3.3.0",
"@docusaurus/core": "2.2.0",
"@docusaurus/plugin-client-redirects": "2.2.0",
"@docusaurus/preset-classic": "2.2.0",
"@docusaurus/theme-classic": "2.2.0",
"@docusaurus/theme-mermaid": "^2.2.0",
"@docusaurus/core": "2.4.3",
"@docusaurus/plugin-client-redirects": "2.4.3",
"@docusaurus/preset-classic": "2.4.3",
"@docusaurus/theme-classic": "2.4.3",
"@docusaurus/theme-mermaid": "2.4.3",
"algoliasearch": "^4.14.2",
"clsx": "^1.2.1",
"docusaurus-plugin-openapi-docs": "0.0.0-616",
"docusaurus-plugin-openapi-docs": "0.0.0-beta.677",
"docusaurus-plugin-sass": "^0.2.2",
"docusaurus-theme-openapi-docs": "0.0.0-616",
"docusaurus-theme-openapi-docs": "0.0.0-beta.677",
"esbuild-loader": "^2.20.0",
"fast-xml-parser": "^4.0.10",
"firebase": "^9.14.0",
"plugin-sitemap-coveo": "./plugin-sitemap-coveo",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-responsive": "^9.0.0",
"react-slick": "^0.29.0",
"sass": "^1.54.1",
Expand Down
5 changes: 3 additions & 2 deletions src/components/Featured/Featured.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

html[data-theme="light"] {
.featured-card-container {
border-color: var(--ifm-color-emphasis-100);
background-color: var(--ifm-color-emphasis-0);
&.network-security a:hover {
color: var(--ifm-color-panos-dark);
}
Expand Down Expand Up @@ -43,8 +45,7 @@ html[data-theme="light"] {
.featured-card-container {
padding: 1.5rem;
border-radius: 1rem;
background-color: var(--ifm-color-emphasis-0);
border: 2px solid var(--ifm-color-emphasis-100);
border: 2px solid var(--ifm-toc-border-color);
transition: 500ms all;

a {
Expand Down
6 changes: 6 additions & 0 deletions src/components/HomepageBanner/HomepageBanner.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
html[data-theme="dark"] {
.homepage-banner-container {
border-color: var(--ifm-toc-border-color);
}
}

.homepage-banner-container {
padding: 3rem;
text-align: center;
Expand Down
10 changes: 8 additions & 2 deletions src/components/HompageHero/HomepageHero.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
html[data-theme="dark"] .hero-image__logo {
content: url("/img/PANW_Parent_Logo_White.svg");
html[data-theme="dark"] {
.hero-image__logo {
content: url("/img/PANW_Parent_Logo_White.svg");
}

.hero-background-wrapper {
border-color: var(--ifm-toc-border-color);
}
}

/* The typing effect */
Expand Down
4 changes: 4 additions & 0 deletions src/components/Medium/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
html[data-theme="dark"] .showcaseBlog {
background-color: var(--ifm-pre-background);
}

.showcaseBlog {
height: 500px;
background-color: var(--ifm-color-emphasis-100);
Expand Down
82 changes: 77 additions & 5 deletions src/css/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,13 @@ html:has(body):has(div):has(div):has(.homepage) {
/* END SIDEBAR VARS */

/* START FONTS */
--ifm-font-family-base: "Inter", sans-serif, system-ui, -apple-system;
--ifm-font-family-base: "Plus Jakarta Sans", ui-sans-serif, system-ui,
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol", "Noto Color Emoji";
--ifm-heading-font-family: "Metropolis Semi Bold", sans-serif;
--ifm-font-family-monospace: "Source Code Pro", monospace;
--ifm-font-family-monospace: "Fira Code", SFMono-Regular, Menlo, Monaco,
Consolas, "Liberation Mono", "Courier New", monospace;
--ifm-font-size-base: 95%;
/* END FONTS */

Expand Down Expand Up @@ -171,6 +175,12 @@ html[data-theme="dark"] {
/* START BACKGROUND COLOR */
--ifm-background-surface-color: var(--ifm-color-gray-1000);
--ifm-background-color: var(--ifm-color-gray-1000);
--ifm-pre-background: var(--ifm-color-gray-900);
--ifm-toc-border-color: rgba(84, 84, 84, 0.48);
--ifm-navbar-background-color: var(--ifm-color-gray-1000);
--ifm-card-background-color: var(--ifm-color-gray-900);
--prism-background-color: var(--ifm-background-color) !important;
--ifm-footer-background-color: var(--ifm-pre-background);
/* END BACKGROUND COLOR */

/* START SIDEBAR COLORS */
Expand Down Expand Up @@ -279,6 +289,10 @@ html[data-theme="dark"] {
color: black;
}
/* END VERSION BADGES */

.openapi-demo__server-container {
background: var(--ifm-pre-background);
}
}

/* START CODE TABS */
Expand Down Expand Up @@ -341,7 +355,6 @@ html[data-theme="dark"] {
/* START DOCUSAURUS OVERALL */
.main-wrapper {
width: 100%;
max-width: 1400px;
align-self: center;
overflow: visible;
}
Expand All @@ -350,12 +363,12 @@ html[data-theme="dark"] {

/* START NAVBAR */
.navbar {
border-bottom: 1px solid var(--ifm-color-emphasis-100);
border-bottom: 1px solid var(--ifm-toc-border-color);
box-shadow: none;
}

.navbar .navbar__inner {
margin: 0 auto;
max-width: 1360px;
}

.dropdown {
Expand Down Expand Up @@ -638,6 +651,39 @@ a {
}
}
}

.openapi-demo__request-form {
.openapi-demo__request-btn {
opacity: 0.75;
background-color: var(--ifm-color-success);

&:hover {
opacity: 1;
background-color: var(--ifm-color-success);
}
}
}

.openapi-demo__response-container {
> div:nth-child(2) {
padding: 1rem;
background-color: var(--ifm-pre-background) !important;
}

.openapi-tabs__schema-container {
margin-top: 0;
}
}

.openapi-demo__response-container .openapi-demo__code-block code {
padding-top: var(--ifm-pre-padding) !important;
}

.openapi-demo__playground-editor {
.prism-code {
font-size: var(--openapi-demo-font-size-input);
}
}
/* END OPENAPI */

/* START NAVBAR ICONS */
Expand Down Expand Up @@ -709,3 +755,29 @@ a {
transform: rotate(180deg) !important;
}
/* END DETAILS MARKERS */

/* API Explorer send button */
.openapi-explorer__request-btn {
background-color: var(--ifm-color-success) !important;
}

.openapi-explorer__request-btn:hover {
background-color: var(--ifm-color-success-light) !important;
}

.openapi-explorer__response-placeholder-message {
color: var(--ifm-color-gray-100) !important;
text-align: left !important;
}

.openapi-explorer__response-placeholder-message code {
background-color: unset !important;
}

code {
background-color: var(--ifm-pre-background) !important;
}

.openapi-explorer__form-item {
font-size: 0.9rem !important;
}
7 changes: 6 additions & 1 deletion src/pages/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,13 @@ html[data-theme="dark"] .heroImage {
transition: 500ms all;
}

html[data-theme="dark"] .toolCardContainer {
background-color: transparent;
border: 2px solid var(--ifm-toc-border-color);
}

.toolCardContainer:hover {
border-color: var(--ifm-color-main);
border: 2px solid var(--ifm-color-main) !important;
}

.toolCardDescription {
Expand Down
8 changes: 4 additions & 4 deletions src/theme/NavbarDocItems/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function NavbarDocItems({ apiDocs, docs, colorClass, productTitle }) {
<div className="navbar-doc-items">
<span className="navbar-doc-items__title">API Reference</span>
<div className="navbar-doc-items__links">
{Object.values(apiDocs).map((apiDoc) => (
<li>
{Object.values(apiDocs).map((apiDoc, i) => (
<li key={i}>
<NavbarNavLink
className="dropdown__link"
to={apiDoc.to}
Expand All @@ -28,8 +28,8 @@ function NavbarDocItems({ apiDocs, docs, colorClass, productTitle }) {
<div className="navbar-doc-items">
<span className="navbar-doc-items__title">Developer Guides</span>
<div className="navbar-doc-items__links">
{Object.values(docs).map((doc) => (
<li>
{Object.values(docs).map((doc, i) => (
<li key={i}>
<NavbarNavLink
className="dropdown__link"
to={doc.to}
Expand Down
Loading
Loading