diff --git a/docusaurus/src/components/Callout.jsx b/docusaurus/src/components/Callout.jsx new file mode 100644 index 000000000000..57151db84f83 --- /dev/null +++ b/docusaurus/src/components/Callout.jsx @@ -0,0 +1,7 @@ +import React from "react"; +import classNames from "classnames"; +import styles from "./Callout.module.css"; + +export const Callout = ({ className, ...rest }) => ( +
+); diff --git a/docusaurus/src/components/Callout.module.css b/docusaurus/src/components/Callout.module.css new file mode 100644 index 000000000000..7d428e59eaf6 --- /dev/null +++ b/docusaurus/src/components/Callout.module.css @@ -0,0 +1,6 @@ +.callout { + background: var(--color-blue-30); + border-radius: 0.3125rem; + width: 100%; + padding: 0.625rem 1.25rem; +} diff --git a/docusaurus/src/components/Chip.jsx b/docusaurus/src/components/Chip.jsx new file mode 100644 index 000000000000..dffd4ca0f9ea --- /dev/null +++ b/docusaurus/src/components/Chip.jsx @@ -0,0 +1,7 @@ +import React from "react"; +import classNames from "classnames"; +import styles from "./Chip.module.css"; + +export const Chip = ({ className, ...rest }) => ( + +); diff --git a/docusaurus/src/components/Chip.module.css b/docusaurus/src/components/Chip.module.css new file mode 100644 index 000000000000..789a1c390811 --- /dev/null +++ b/docusaurus/src/components/Chip.module.css @@ -0,0 +1,17 @@ +.chip { + display: inline-flex; + align-items: center; + justify-content: center; + padding: 0.125rem 0.375rem; + background-color: var(--color-grey-100); + border-radius: 0.625rem; + font-size: 0.625rem; + line-height: 0.8rem; + text-transform: uppercase; + font-weight: var(--ifm-font-weight-semibold); + color: var(--color-grey-900); +} +a .chip:hover { + text-decoration: none; + color: var(--ifm-link-color); +} \ No newline at end of file diff --git a/docusaurus/src/components/HeaderDecoration.jsx b/docusaurus/src/components/HeaderDecoration.jsx index 490eb1b104ed..51a434676f43 100644 --- a/docusaurus/src/components/HeaderDecoration.jsx +++ b/docusaurus/src/components/HeaderDecoration.jsx @@ -1,9 +1,7 @@ import React from "react"; import styles from "./HeaderDecoration.module.css"; - -const capitalizeFirstLetter = (string) => { - return string.charAt(0).toUpperCase() + string.slice(1); -}; +import { Chip } from "./Chip"; +import { Callout } from "./Callout"; const CHECK_ICON = ( @@ -24,6 +22,65 @@ const CROSS_ICON = ( ); + +const MetadataStat = ({ label, children }) => ( +
+
{`${label}: `}
+
{children}
+
+); + +const EnabledIcon = ({ isEnabled }) => { + return isEnabled ? CHECK_ICON : CROSS_ICON; +}; + +const ConnectorMetadataCallout = ({ isCloud, isOss, isPypiPublished, supportLevel, github_url, dockerImageTag }) => ( + +
+ +
+ + Airbyte Cloud + + + Airbyte OSS + + + PyAirbyte + +
+
+ + + {supportLevel} + + + {supportLevel !== "archived" && ( + + + {dockerImageTag} + + + )} +
+
+); + +const ConnectorTitle = ({ iconUrl, originalTitle, originalId, isArchived }) => ( +
+ +

+ {isArchived ? ( + + {originalTitle} [ARCHIVED] + + ) : ( + originalTitle + )} +

+
+); + export const HeaderDecoration = ({ isOss: isOssString, isCloud: isCloudString, @@ -42,54 +99,20 @@ export const HeaderDecoration = ({ return ( <> -
-
-
Availability
-
- - {isCloud ? CHECK_ICON : CROSS_ICON} Airbyte Cloud - - - {isOss ? CHECK_ICON : CROSS_ICON} Airbyte OSS - - - {isPypiPublished ? CHECK_ICON : CROSS_ICON} PyAirbyte - -
-
-
-
Support Level
-
- - {capitalizeFirstLetter(supportLevel)} - -
-
- {supportLevel !== "archived" && ( -
-
Latest Version
- -
- - {dockerImageTag} - -
-
- )} -
- -
- -

- {isArchived ? ( - - {originalTitle} [ARCHIVED] - - ) : ( - originalTitle - )} -

-
+ + ); }; diff --git a/docusaurus/src/components/HeaderDecoration.module.css b/docusaurus/src/components/HeaderDecoration.module.css index 191f95ca96c7..5a19f1e4c129 100644 --- a/docusaurus/src/components/HeaderDecoration.module.css +++ b/docusaurus/src/components/HeaderDecoration.module.css @@ -5,46 +5,54 @@ margin-right: 10px; } +div.connectorMetadataCallout { + margin-bottom: 15px; +} + .connectorMetadata { - background: var(--ifm-color-info-contrast-background); - border-radius: 2px; width: 100%; - font-size: smaller; margin: 0; - padding: 5px; - margin-bottom: 15px; + display: flex; + flex-direction: column; + row-gap: 2px; } -.connectorMetadata > div { +.metadataStat { display: flex; align-items: center; - gap: 0.2em; + font-size: 0.75rem; + font-weight: var(--ifm-font-weight-normal); } -.connectorMetadata dt { - display: inline; - font-weight: bold; +.metadataStatLabel { + display: inline-flex; + align-items: center; + + font-weight: var(--ifm-font-weight-semibold); + margin-right: 10px; } -.connectorMetadata dd { - display: inline; +.metadataStatValue { + display: inline-flex; + align-items: center; margin: 0; } -.connectorMetadata dt::after { - content: ": "; +.metadataStatValue > * { + display: inline-flex; + align-items: center; } .connectorMetadata .availability { display: inline-flex; - gap: 8px; - margin-left: 2px; + align-items: center; + column-gap: 8px; } .connectorMetadata .availability > span { display: inline-flex; align-items: center; - gap: 2px; + column-gap: 2px; } .connectorMetadata .availability .unavailable { diff --git a/docusaurus/src/css/custom.css b/docusaurus/src/css/custom.css index 7b108dd36b6f..f14053f3d7ec 100644 --- a/docusaurus/src/css/custom.css +++ b/docusaurus/src/css/custom.css @@ -27,8 +27,11 @@ --color-active-nav-item-text: var(--ifm-color-primary-darker); --color-grey-40: hsl(240, 25%, 98%); + --color-grey-100: hsl(240, 12%, 92%); --color-grey-400: hsl(240, 10%, 59%); + --color-grey-900: hsl(240, 19%, 18%); --color-green-50: hsl(184, 67%, 92%); + --color-blue-30: hsl(240, 100%, 98%); } /* For readability concerns, you should choose a lighter palette in dark mode. */ @@ -47,6 +50,7 @@ html[data-theme="dark"] { --color-grey-40: hsl(240, 14%, 14%); --color-grey-400: hsl(240, 13%, 72%); --color-green-50: hsl(184, 100%, 12%); + --color-blue-30: hsl(252, 25%, 18%); } .docusaurus-highlight-code-line {