From 13a5cdeb7c7d0220645f1c7830aa549d67d61e8d Mon Sep 17 00:00:00 2001 From: Yuliia Horbenko Date: Tue, 16 Jul 2024 13:34:30 +0200 Subject: [PATCH 1/4] chore: Add the Further Guidance admonition --- docusaurus.config.js | 4 +-- src/css/custom.scss | 9 +++++- src/css/dark-mode.scss | 6 ++-- src/css/light-mode.scss | 4 +-- src/theme/Admonition/Icon/FurtherGuidance.js | 7 +++++ src/theme/Admonition/Type/FurtherGuidance.js | 29 ++++++++++++++++++++ src/theme/Admonition/Types.js | 2 ++ 7 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 src/theme/Admonition/Icon/FurtherGuidance.js create mode 100644 src/theme/Admonition/Type/FurtherGuidance.js diff --git a/docusaurus.config.js b/docusaurus.config.js index e7e4b47a65..9f81164442 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -103,7 +103,7 @@ const config = { }, }, admonitions: { - keywords: ["preview"], + keywords: ["preview", "further"], extendDefaults: true, }, // exclude: ["api/v1/palette-apis-3-4"], @@ -146,7 +146,7 @@ const config = { lastVersion: "current", includeCurrentVersion: true, admonitions: { - keywords: ["preview"], + keywords: ["preview", "further"], extendDefaults: true, }, versions: { diff --git a/src/css/custom.scss b/src/css/custom.scss index 2628b5a228..410abe28a1 100644 --- a/src/css/custom.scss +++ b/src/css/custom.scss @@ -39,6 +39,8 @@ html { --openapi-demo-font-size-code: 10px; --openapi-demo-font-size-input: 10px; --custom-sidebar-item-color: #aeb1be; + --custom-purple-border-color: #7d77ca; + --custom-byzantine-border-color: #b54aa1; } .markdown h1:first-child { @@ -212,10 +214,15 @@ p img.markdown-image { } .admonition-tech-preview { - border: 1px solid var(--custom-purple-important-color); + border: 1px solid var(--custom-purple-border-color); background-color: var(--custom-purple-alert-bg-color); } +.admonition-further-guidance { + border: 1px solid var(--custom-byzantine-border-color); + background-color: var(--custom-byzantine-alert-bg-color); +} + .desktop-only-display { @media (max-width: 768px) { display: none; diff --git a/src/css/dark-mode.scss b/src/css/dark-mode.scss index 3753484aef..9821c88010 100644 --- a/src/css/dark-mode.scss +++ b/src/css/dark-mode.scss @@ -28,9 +28,6 @@ html[data-theme="dark"] { --ifm-color-warning-contrast-foreground: #b5bdd4; --ifm-color-warning-dark: #ffc832; --ifm-alert-padding-horizontal: 1.5rem; - --custom-table-header-color: #1c202b; - --custom-purple-important-color: #7d77ca; - --custom-purple-alert-bg-color: #1a173b; --simpleCardPrimary: #72a8f5; --simpleCardPrimaryHover: #9cc2f8; --simpleCardSecondary: #192c47; @@ -38,6 +35,7 @@ html[data-theme="dark"] { --simpleCardSubtle: #b5bdd4; --simpleCardButtonIcon: #818ba9; --simpleCardBorder: #1f263c; + --custom-table-header-color: #1c202b; --custom-release-notes-background-color: #2b323c; --custom-release-notes-background-font-color: var(--ifm-dropdown-link-color); --custom-release-notes-active-option-hover: var(--ifm-dropdown-hover-background-color); @@ -45,6 +43,8 @@ html[data-theme="dark"] { --custom-release-notes-option-font-color: white; --custom-release-notes-menu-padding: #2b323c; --custom-sidebar-icon-color: #aeb1be; + --custom-purple-alert-bg-color: #1a173b; + --custom-byzantine-alert-bg-color: #4a1e42; .theme-last-updated { color: var(--ifm-font-color-base); diff --git a/src/css/light-mode.scss b/src/css/light-mode.scss index a850ca8cb5..e6b951150d 100644 --- a/src/css/light-mode.scss +++ b/src/css/light-mode.scss @@ -26,8 +26,6 @@ html[data-theme="light"] { --ifm-color-warning-dark: #a8882f; --ifm-alert-padding-horizontal: 1.5rem; --custom-table-header-color: #f7f7f7; - --custom-purple-important-color: #7d77ca; - --custom-purple-alert-bg-color: #dcdaf9; --simpleCardPrimary: #4a8ff1; --simpleCardPrimaryHover: #3f74be; --simpleCardSecondary: #dbecff; @@ -41,6 +39,8 @@ html[data-theme="light"] { --custom-release-notes-selected-background: #bec0c4; --custom-release-notes-option-font-color: black; --custom-release-notes-menu-padding: white; + --custom-purple-alert-bg-color: #dcdaf9; + --custom-byzantine-alert-bg-color: #f8d6f2; .theme-doc-sidebar-item-category-level-1 .menu__list-item { .menu__link:hover { diff --git a/src/theme/Admonition/Icon/FurtherGuidance.js b/src/theme/Admonition/Icon/FurtherGuidance.js new file mode 100644 index 0000000000..14a18c54a4 --- /dev/null +++ b/src/theme/Admonition/Icon/FurtherGuidance.js @@ -0,0 +1,7 @@ +import React from "react"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faGraduationCap } from "@fortawesome/free-solid-svg-icons"; + +export default function IconTechPreview() { + return ; +} diff --git a/src/theme/Admonition/Type/FurtherGuidance.js b/src/theme/Admonition/Type/FurtherGuidance.js new file mode 100644 index 0000000000..c662dfb49a --- /dev/null +++ b/src/theme/Admonition/Type/FurtherGuidance.js @@ -0,0 +1,29 @@ +import React from "react"; +import clsx from "clsx"; +import Translate from "@docusaurus/Translate"; +import AdmonitionLayout from "@theme/Admonition/Layout"; +import IconFurtherGuidance from "../Icon/FurtherGuidance"; + +const infimaClassName = "alert admonition-further-guidance"; + +const defaultProps = { + icon: , + title: ( + + further guidance + + ), + defaultText: "", +}; + +export default function AdmonitionTypeFurtherGuidance(props) { + const text = props.children || defaultProps.defaultText; + return ( + + {text} + + ); +} diff --git a/src/theme/Admonition/Types.js b/src/theme/Admonition/Types.js index fe4352786b..fd6e0390c5 100644 --- a/src/theme/Admonition/Types.js +++ b/src/theme/Admonition/Types.js @@ -1,9 +1,11 @@ import DefaultAdmonitionTypes from "@theme-original/Admonition/Types"; import AdmonitionTypeTechPreview from "../Admonition/Type/TechPreview"; +import AdmonitionTypeFurtherGuidance from "./Type/FurtherGuidance"; const AdmonitionTypes = { ...DefaultAdmonitionTypes, preview: AdmonitionTypeTechPreview, + further: AdmonitionTypeFurtherGuidance, }; export default AdmonitionTypes; From 243a6fbb05404aed9cb8cbe36aed68e17ee02495 Mon Sep 17 00:00:00 2001 From: Yuliia Horbenko Date: Tue, 16 Jul 2024 13:41:41 +0200 Subject: [PATCH 2/4] docs: Link to the VMware PCG tutorial --- docs/docs-content/clusters/pcg/deploy-pcg/vmware.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/docs-content/clusters/pcg/deploy-pcg/vmware.md b/docs/docs-content/clusters/pcg/deploy-pcg/vmware.md index 2a2fff07ba..8ab7c57f26 100644 --- a/docs/docs-content/clusters/pcg/deploy-pcg/vmware.md +++ b/docs/docs-content/clusters/pcg/deploy-pcg/vmware.md @@ -10,6 +10,13 @@ tags: ["pcg"] This guide provides you with the steps to deploy a PCG cluster to a VMware vSphere environment. Before you begin the installation, carefully review the [Prerequisites](#prerequisites) section. +:::further + +For detailed guidance on how to deploy app workdloads with a PCG, refer to our +[Deploy App Workloads with a PCG](../../../tutorials/cluster-deployment/pcg/deploy-app-pcg.md) tutorial. + +::: + ## Prerequisites :::info From 10bdd71e38679538054004828465025f6b241c2c Mon Sep 17 00:00:00 2001 From: Yuliia Horbenko Date: Tue, 16 Jul 2024 13:51:25 +0200 Subject: [PATCH 3/4] chore: Fix spelling --- docs/docs-content/clusters/pcg/deploy-pcg/vmware.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs-content/clusters/pcg/deploy-pcg/vmware.md b/docs/docs-content/clusters/pcg/deploy-pcg/vmware.md index 8ab7c57f26..c8a4ec6104 100644 --- a/docs/docs-content/clusters/pcg/deploy-pcg/vmware.md +++ b/docs/docs-content/clusters/pcg/deploy-pcg/vmware.md @@ -12,7 +12,7 @@ installation, carefully review the [Prerequisites](#prerequisites) section. :::further -For detailed guidance on how to deploy app workdloads with a PCG, refer to our +For detailed guidance on how to deploy app workloads with a PCG, refer to our [Deploy App Workloads with a PCG](../../../tutorials/cluster-deployment/pcg/deploy-app-pcg.md) tutorial. ::: From cec3f4586c05efb34698705c733a54e8c101519f Mon Sep 17 00:00:00 2001 From: Yuliia Horbenko Date: Tue, 16 Jul 2024 15:48:30 +0200 Subject: [PATCH 4/4] chore: Implement peer review --- docs/docs-content/clusters/pcg/deploy-pcg/vmware.md | 4 ++-- src/theme/Admonition/Icon/FurtherGuidance.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs-content/clusters/pcg/deploy-pcg/vmware.md b/docs/docs-content/clusters/pcg/deploy-pcg/vmware.md index c8a4ec6104..9227f885aa 100644 --- a/docs/docs-content/clusters/pcg/deploy-pcg/vmware.md +++ b/docs/docs-content/clusters/pcg/deploy-pcg/vmware.md @@ -12,8 +12,8 @@ installation, carefully review the [Prerequisites](#prerequisites) section. :::further -For detailed guidance on how to deploy app workloads with a PCG, refer to our -[Deploy App Workloads with a PCG](../../../tutorials/cluster-deployment/pcg/deploy-app-pcg.md) tutorial. +Refer to our [Deploy App Workloads with a PCG](../../../tutorials/cluster-deployment/pcg/deploy-app-pcg.md) tutorial for +detailed guidance on how to deploy app workloads with a PCG. ::: diff --git a/src/theme/Admonition/Icon/FurtherGuidance.js b/src/theme/Admonition/Icon/FurtherGuidance.js index 14a18c54a4..694cb08c24 100644 --- a/src/theme/Admonition/Icon/FurtherGuidance.js +++ b/src/theme/Admonition/Icon/FurtherGuidance.js @@ -2,6 +2,6 @@ import React from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faGraduationCap } from "@fortawesome/free-solid-svg-icons"; -export default function IconTechPreview() { +export default function IconFurtherGuidance() { return ; }