From 2ca60ce6b737cdf7ae20caca2dc734f6747c45a7 Mon Sep 17 00:00:00 2001 From: marcialfps Date: Thu, 22 Sep 2022 16:30:27 +0200 Subject: [PATCH 1/8] Add major version to Sidenav header --- website/screens/common/ComponentHeading.tsx | 39 +------------------ website/screens/common/StatusTag.tsx | 36 +++++++++++++++++ .../screens/common/sidenav/SidenavLogo.tsx | 36 ++++++++++++----- 3 files changed, 63 insertions(+), 48 deletions(-) create mode 100644 website/screens/common/StatusTag.tsx 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; From c352334faea85be1028da3bfb6acc99deac1df96 Mon Sep 17 00:00:00 2001 From: marcialfps Date: Thu, 22 Sep 2022 16:31:00 +0200 Subject: [PATCH 2/8] Add older documentation section to introduction --- .../introduction/IntroductionPage.tsx | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/website/screens/overview/introduction/IntroductionPage.tsx b/website/screens/overview/introduction/IntroductionPage.tsx index a5bea7c07..76977f606 100644 --- a/website/screens/overview/introduction/IntroductionPage.tsx +++ b/website/screens/overview/introduction/IntroductionPage.tsx @@ -185,6 +185,36 @@ const sections = [ ), }, + { + title: "Older documentation", + 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. + + + + ), + }, ]; const Introduction = () => { From 4eedde5c866427aafa3a50b5906394175c0a1800 Mon Sep 17 00:00:00 2001 From: marcialfps Date: Thu, 22 Sep 2022 16:46:04 +0200 Subject: [PATCH 3/8] Add links to next and last release sites --- .../overview/introduction/IntroductionPage.tsx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/website/screens/overview/introduction/IntroductionPage.tsx b/website/screens/overview/introduction/IntroductionPage.tsx index 76977f606..2cdf11274 100644 --- a/website/screens/overview/introduction/IntroductionPage.tsx +++ b/website/screens/overview/introduction/IntroductionPage.tsx @@ -186,7 +186,7 @@ const sections = [ ), }, { - title: "Older documentation", + title: "Documentation of other releases", content: ( <> @@ -212,6 +212,17 @@ const sections = [ anymore. + + The last development site can be accessed through this{" "} + + link + + ; and the last release is available{" "} + + here + + . + ), }, From dceea9f7fbdcf0b5be667b75bf20e401fc28a03c Mon Sep 17 00:00:00 2001 From: Marcial F Parrilla Socas <35959222+marcialfps@users.noreply.github.com> Date: Mon, 26 Sep 2022 08:29:56 +0100 Subject: [PATCH 4/8] Link current release generated from env variable --- website/screens/overview/introduction/IntroductionPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/screens/overview/introduction/IntroductionPage.tsx b/website/screens/overview/introduction/IntroductionPage.tsx index 2cdf11274..744e4dbc8 100644 --- a/website/screens/overview/introduction/IntroductionPage.tsx +++ b/website/screens/overview/introduction/IntroductionPage.tsx @@ -218,7 +218,7 @@ const sections = [ link ; and the last release is available{" "} - + here . From 8e105a88c8acc99c1d05518eaeb225ac6d92f5a2 Mon Sep 17 00:00:00 2001 From: raquelarrojo Date: Mon, 26 Sep 2022 13:39:22 +0200 Subject: [PATCH 5/8] Fixes documentation --- .../overview/introduction/IntroductionPage.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/website/screens/overview/introduction/IntroductionPage.tsx b/website/screens/overview/introduction/IntroductionPage.tsx index 744e4dbc8..68b50661b 100644 --- a/website/screens/overview/introduction/IntroductionPage.tsx +++ b/website/screens/overview/introduction/IntroductionPage.tsx @@ -186,7 +186,7 @@ const sections = [ ), }, { - title: "Documentation of other releases", + title: "Previous documentation sites", content: ( <> @@ -213,12 +213,15 @@ const sections = [ - The last development site can be accessed through this{" "} + The latest development site can be accessed through this{" "} link - ; and the last release is available{" "} - + ; and the latest release is available{" "} + here . From 0bad8310cd97d4deaba2cfb09e2229d32e49f14a Mon Sep 17 00:00:00 2001 From: raquelarrojo Date: Mon, 26 Sep 2022 14:27:25 +0200 Subject: [PATCH 6/8] Change in documentation --- website/screens/overview/introduction/IntroductionPage.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/screens/overview/introduction/IntroductionPage.tsx b/website/screens/overview/introduction/IntroductionPage.tsx index 68b50661b..f4fc067ec 100644 --- a/website/screens/overview/introduction/IntroductionPage.tsx +++ b/website/screens/overview/introduction/IntroductionPage.tsx @@ -217,7 +217,8 @@ const sections = [ link - ; and the latest release is available{" "} + . Please note that this version can include bugs. For a more stable + version check the latest release that is available{" "} Date: Mon, 26 Sep 2022 14:33:54 +0200 Subject: [PATCH 7/8] Change documentation --- website/screens/overview/introduction/IntroductionPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/screens/overview/introduction/IntroductionPage.tsx b/website/screens/overview/introduction/IntroductionPage.tsx index f4fc067ec..89f3eb853 100644 --- a/website/screens/overview/introduction/IntroductionPage.tsx +++ b/website/screens/overview/introduction/IntroductionPage.tsx @@ -217,8 +217,8 @@ const sections = [ link - . Please note that this version can include bugs. For a more stable - version check the latest release that is available{" "} + . Please note that this experience can include bugs. For a more stable + one check the latest release that is available{" "} Date: Mon, 26 Sep 2022 14:35:10 +0200 Subject: [PATCH 8/8] Fix documentation --- website/screens/overview/introduction/IntroductionPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/screens/overview/introduction/IntroductionPage.tsx b/website/screens/overview/introduction/IntroductionPage.tsx index 89f3eb853..4f1bca364 100644 --- a/website/screens/overview/introduction/IntroductionPage.tsx +++ b/website/screens/overview/introduction/IntroductionPage.tsx @@ -217,8 +217,8 @@ const sections = [ link - . Please note that this experience can include bugs. For a more stable - one check the latest release that is available{" "} + . Please note that this version can include bugs. For a more stable + experience check the latest release that is available{" "}