diff --git a/website/screens/common/ComponentHeading.tsx b/website/screens/common/ComponentHeading.tsx index ca7f357b0..4a5f343ce 100644 --- a/website/screens/common/ComponentHeading.tsx +++ b/website/screens/common/ComponentHeading.tsx @@ -1,6 +1,6 @@ import { DxcHeading, DxcFlex } from "@dxc-technology/halstack-react"; import React from "react"; -import styled from "styled-components"; +import StatusTag from "@/common/StatusTag"; type ComponentHeadingProps = { name: string; @@ -16,41 +16,4 @@ const ComponentHeading = ({ name, status }: ComponentHeadingProps) => { ); }; -type StatusTagProps = { status: "Ready" | "Deprecated" | "Experimental" }; - -const StatusTag = styled.div` - box-sizing: border-box; - height: 24px; - border: 1px solid - ${(props) => - props.status === "Ready" - ? "#24A148" - : props.status === "Deprecated" - ? "#C59F07" - : props.status === "Experimental" - ? "#5F249F" - : ""}; - border-radius: 0.5rem; - padding: 4px 8px; - font-size: 0.75rem; - font-weight: 600; - line-height: 1.125em; - color: ${(props) => - props.status === "Ready" - ? "#135325" - : props.status === "Deprecated" - ? "#624F04" - : props.status === "Experimental" - ? "#321353" - : ""}; - background-color: ${(props) => - props.status === "Ready" - ? "#F7FDF9" - : props.status === "Deprecated" - ? "#FFFDF5" - : props.status === "Experimental" - ? "#FAF7FD" - : ""}; ; -`; - export default ComponentHeading; diff --git a/website/screens/common/StatusTag.tsx b/website/screens/common/StatusTag.tsx new file mode 100644 index 000000000..2bac8b5a9 --- /dev/null +++ b/website/screens/common/StatusTag.tsx @@ -0,0 +1,36 @@ +import styled from "styled-components"; + +type StatusTagProps = { + status?: "Ready" | "Deprecated" | "Experimental"; +}; + +const StatusTag = styled.div` + box-sizing: border-box; + height: 24px; + border: 1px solid + ${(props) => + props.status === "Ready" + ? "#24A148" + : props.status === "Deprecated" + ? "#C59F07" + : "#5F249F"}; + border-radius: 0.5rem; + padding: 4px 8px; + font-size: 0.75rem; + font-weight: 600; + line-height: 1.125em; + color: ${(props) => + props.status === "Ready" + ? "#135325" + : props.status === "Deprecated" + ? "#624F04" + : "#321353"}; + background-color: ${(props) => + props.status === "Ready" + ? "#F7FDF9" + : props.status === "Deprecated" + ? "#FFFDF5" + : "#FAF7FD"}; ; +`; + +export default StatusTag; diff --git a/website/screens/common/sidenav/SidenavLogo.tsx b/website/screens/common/sidenav/SidenavLogo.tsx index 843a66233..48e14a0c1 100644 --- a/website/screens/common/sidenav/SidenavLogo.tsx +++ b/website/screens/common/sidenav/SidenavLogo.tsx @@ -1,25 +1,41 @@ import styled from "styled-components"; import Image from "@/common/Image"; import halstackLogo from "@/common/images/halstack_logo.svg"; +import StatusTag from "@/common/StatusTag"; +import React from "react"; + +const siteVersion = process.env.SITE_VERSION + ? typeof process.env.SITE_VERSION === "number" + ? `v${process.env.SITE_VERSION}.0.0` + : process.env.SITE_VERSION + : "dev"; const SidenavLogo = () => { return ( -
- Halstack logo - Halstack -
- Design system + +
+ Halstack logo + Halstack +
+ Design system +
+ {siteVersion}
); }; const SidenavLogoContainer = styled.div` + display: flex; + align-items: center; +`; + +const LogoContainer = styled.div` margin: 0 24px; display: flex; flex-direction: column; diff --git a/website/screens/overview/introduction/IntroductionPage.tsx b/website/screens/overview/introduction/IntroductionPage.tsx index a5bea7c07..4f1bca364 100644 --- a/website/screens/overview/introduction/IntroductionPage.tsx +++ b/website/screens/overview/introduction/IntroductionPage.tsx @@ -185,6 +185,51 @@ const sections = [ ), }, + { + title: "Previous documentation sites", + content: ( + <> + + This site is new and comes to replace the existing one. However, the + old documentation is still available through the following links for + consultation: + + + + + React CDK + + + + + Angular CDK + + + + + + Please note that these sites are discontinued and may not be updated + anymore. + + + + The latest development site can be accessed through this{" "} + + link + + . Please note that this version can include bugs. For a more stable + experience check the latest release that is available{" "} + + here + + . + + + ), + }, ]; const Introduction = () => {