diff --git a/gatsby-node.js b/gatsby-node.js index c70a2ca99181..bf4defcd9504 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -389,84 +389,99 @@ exports.createPages = async ({ actions, graphql, reporter }) => { const resourcePostTemplate = path.resolve("src/templates/resource-single.js"); const integrationTemplate = path.resolve("src/templates/integrations.js"); - const res = await graphql(`{ - allPosts: allMdx(filter: {frontmatter: {published: {eq: true}}}) { - nodes { - frontmatter { - program - programSlug - } - fields { - collection - slug - } - } - } - blogTags: allMdx( - filter: {fields: {collection: {eq: "blog"}}, frontmatter: {published: {eq: true}}} - ) { - group(field: {frontmatter: {tags: SELECT}}) { - nodes { - id + const res = await graphql(` + { + allPosts: allMdx(filter: { frontmatter: { published: { eq: true } } }) { + nodes { + frontmatter { + program + programSlug + } + fields { + collection + slug + } + } } - fieldValue - } - } - blogCategory: allMdx( - filter: {fields: {collection: {eq: "blog"}}, frontmatter: {published: {eq: true}}} - ) { - group(field: {frontmatter: {category: SELECT}}) { - nodes { - id + blogTags: allMdx( + filter: { + fields: { collection: { eq: "blog" } } + frontmatter: { published: { eq: true } } + } + ) { + group(field: { frontmatter: { tags: SELECT } }) { + nodes { + id + } + fieldValue + } } - fieldValue - } - } - memberBio: allMdx( - filter: {fields: {collection: {eq: "members"}}, frontmatter: {published: {eq: true}, executive_bio: {eq: true}}} - ) { - nodes { - frontmatter { - name + blogCategory: allMdx( + filter: { + fields: { collection: { eq: "blog" } } + frontmatter: { published: { eq: true } } + } + ) { + group(field: { frontmatter: { category: SELECT } }) { + nodes { + id + } + fieldValue + } } - fields { - slug - collection + memberBio: allMdx( + filter: { + fields: { collection: { eq: "members" } } + frontmatter: { published: { eq: true }, executive_bio: { eq: true } } + } + ) { + nodes { + frontmatter { + name + } + fields { + slug + collection + } + } } - } - } - singleWorkshop: allMdx( - filter: {fields: {collection: {eq: "service-mesh-workshops"}}} - ) { - nodes { - fields { - slug - collection + singleWorkshop: allMdx( + filter: { fields: { collection: { eq: "service-mesh-workshops" } } } + ) { + nodes { + fields { + slug + collection + } + } } - } - } - labs: allMdx(filter: {fields: {collection: {eq: "service-mesh-labs"}}}) { - nodes { - fields { - slug - collection + labs: allMdx( + filter: { fields: { collection: { eq: "service-mesh-labs" } } } + ) { + nodes { + fields { + slug + collection + } + } } - } - } - learncontent: allMdx(filter: {fields: {collection: {eq: "content-learn"}}}) { - nodes { - fields { - learnpath - slug - course - section - chapter - pageType - collection + learncontent: allMdx( + filter: { fields: { collection: { eq: "content-learn" } } } + ) { + nodes { + fields { + learnpath + slug + course + section + chapter + pageType + collection + } + } } } - } -}`); + `); // handle errors if (res.errors) { @@ -707,6 +722,43 @@ exports.createPages = async ({ actions, graphql, reporter }) => { } } }); + + const components = [ + "button", + "text-input", + "modal", + "paper", + "popper", + "text-field", + "link", + "container", + "button-group", + ]; + + const createComponentPages = (createPage, components) => { + const pageTypes = [ + { suffix: "", file: "index.js" }, + { suffix: "/guidance", file: "guidance.js" }, + { suffix: "/code", file: "code.js" }, + ]; + + components.forEach((name) => { + pageTypes.forEach(({ suffix, file }) => { + const path = `/projects/sistent/components/${name}${suffix}`; + const componentPath = `./src/sections/Projects/Sistent/components/${name}/${file}`; + try { + createPage({ + path, + component: require.resolve(componentPath), + }); + } catch (error) { + console.error(`Error creating page for ${path}:`, error); + } + }); + }); + }; + + createComponentPages(createPage, components); }; // slug starts and ends with '/' so parts[0] and parts[-1] will be empty diff --git a/src/pages/projects/sistent/components/button-group/code.js b/src/pages/projects/sistent/components/button-group/code.js deleted file mode 100644 index dff80d0676aa..000000000000 --- a/src/pages/projects/sistent/components/button-group/code.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import ButtonGroupCode from "../../../../../sections/Projects/Sistent/components/button-group/code"; - -const ButtonGroupCodePage = () => { - return ; -}; - -export default ButtonGroupCodePage; diff --git a/src/pages/projects/sistent/components/button-group/guidance.js b/src/pages/projects/sistent/components/button-group/guidance.js deleted file mode 100644 index c36d2d6d33f6..000000000000 --- a/src/pages/projects/sistent/components/button-group/guidance.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import ButtonGroupGuidance from "../../../../../sections/Projects/Sistent/components/button-group/guidance"; - -const ButtonGuidancePage = () => { - return ; -}; - -export default ButtonGuidancePage; diff --git a/src/pages/projects/sistent/components/button-group/index.js b/src/pages/projects/sistent/components/button-group/index.js deleted file mode 100644 index af543fb3279c..000000000000 --- a/src/pages/projects/sistent/components/button-group/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import SistentButtonGroup from "../../../../../sections/Projects/Sistent/components/button-group"; - -const SistentButtonGroupPage = () => { - return ; -}; - -export default SistentButtonGroupPage; diff --git a/src/pages/projects/sistent/components/button/code.js b/src/pages/projects/sistent/components/button/code.js deleted file mode 100644 index 87944a938565..000000000000 --- a/src/pages/projects/sistent/components/button/code.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import { ButtonCode } from "../../../../../sections/Projects/Sistent/components/button/code"; - -const ButtonCodePage = () => { - return ; -}; - -export default ButtonCodePage; diff --git a/src/pages/projects/sistent/components/button/guidance.js b/src/pages/projects/sistent/components/button/guidance.js deleted file mode 100644 index a155ae7ec5dc..000000000000 --- a/src/pages/projects/sistent/components/button/guidance.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import { ButtonGuidance } from "../../../../../sections/Projects/Sistent/components/button/guidance"; - -const ButtonGuidancePage = () => { - return ; -}; - -export default ButtonGuidancePage; diff --git a/src/pages/projects/sistent/components/button/index.js b/src/pages/projects/sistent/components/button/index.js deleted file mode 100644 index 3e56948174d2..000000000000 --- a/src/pages/projects/sistent/components/button/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import SistentButton from "../../../../../sections/Projects/Sistent/components/button"; - -const SistentButtonPage = () => { - return ; -}; - -export default SistentButtonPage; diff --git a/src/pages/projects/sistent/components/container/code.js b/src/pages/projects/sistent/components/container/code.js deleted file mode 100644 index ee5f12f95992..000000000000 --- a/src/pages/projects/sistent/components/container/code.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import { ContainerCode } from "../../../../../sections/Projects/Sistent/components/container/code"; - -const ContainerCodePage = () => { - return ; -}; - -export default ContainerCodePage; diff --git a/src/pages/projects/sistent/components/container/guidance.js b/src/pages/projects/sistent/components/container/guidance.js deleted file mode 100644 index 763ec456f972..000000000000 --- a/src/pages/projects/sistent/components/container/guidance.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import { ContainerGuidancePage } from "../../../../../sections/Projects/Sistent/components/container/guidance"; - -const LinkGuidance = () => { - return ; -}; - -export default LinkGuidance; diff --git a/src/pages/projects/sistent/components/container/index.js b/src/pages/projects/sistent/components/container/index.js deleted file mode 100644 index a7bcf30afd1f..000000000000 --- a/src/pages/projects/sistent/components/container/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import SistentContainer from "../../../../../sections/Projects/Sistent/components/container/index"; - -const SistentContainerPage = () => { - return ; -}; - -export default SistentContainerPage; diff --git a/src/pages/projects/sistent/components/link/code.js b/src/pages/projects/sistent/components/link/code.js deleted file mode 100644 index 06eae83ec9a3..000000000000 --- a/src/pages/projects/sistent/components/link/code.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import { LinkCode } from "../../../../../sections/Projects/Sistent/components/link/code"; - -const LinkCodePage = () => { - return ; -}; - -export default LinkCodePage; \ No newline at end of file diff --git a/src/pages/projects/sistent/components/link/guidance.js b/src/pages/projects/sistent/components/link/guidance.js deleted file mode 100644 index b9efe9988519..000000000000 --- a/src/pages/projects/sistent/components/link/guidance.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import { LinkGuidancePage } from "../../../../../sections/Projects/Sistent/components/link/guidance"; - -const LinkGuidance = () => { - return ; -}; - -export default LinkGuidance; \ No newline at end of file diff --git a/src/pages/projects/sistent/components/link/index.js b/src/pages/projects/sistent/components/link/index.js deleted file mode 100644 index 2e2f14e7f001..000000000000 --- a/src/pages/projects/sistent/components/link/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import SistentLink from "../../../../../sections/Projects/Sistent/components/link/index"; - -const SistentButtonPage = () => { - return ; -}; - -export default SistentButtonPage; \ No newline at end of file diff --git a/src/pages/projects/sistent/components/modal/code.js b/src/pages/projects/sistent/components/modal/code.js deleted file mode 100644 index bd7e2753bd8f..000000000000 --- a/src/pages/projects/sistent/components/modal/code.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from "react"; -import ModalCode from "../../../../../sections/Projects/Sistent/components/modal/code"; - - -const ModalCodePage = () => { - return ; -}; - -export default ModalCodePage; \ No newline at end of file diff --git a/src/pages/projects/sistent/components/modal/guidance.js b/src/pages/projects/sistent/components/modal/guidance.js deleted file mode 100644 index f57411c3ff93..000000000000 --- a/src/pages/projects/sistent/components/modal/guidance.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from "react"; -import ModalGuidance from "../../../../../sections/Projects/Sistent/components/modal/guidance"; - - -const ModalGuidancePage = () => { - return ; -}; - -export default ModalGuidancePage; \ No newline at end of file diff --git a/src/pages/projects/sistent/components/modal/index.js b/src/pages/projects/sistent/components/modal/index.js deleted file mode 100644 index 4be1ef984ac0..000000000000 --- a/src/pages/projects/sistent/components/modal/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from "react"; -import SistentModal from "../../../../../sections/Projects/Sistent/components/modal"; - - -const SistentModalPage = () => { - return ; -}; - -export default SistentModalPage; \ No newline at end of file diff --git a/src/pages/projects/sistent/components/paper/code.js b/src/pages/projects/sistent/components/paper/code.js deleted file mode 100644 index aebd216c36dc..000000000000 --- a/src/pages/projects/sistent/components/paper/code.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import PaperCode from "../../../../../sections/Projects/Sistent/components/paper/code"; - -const PaperCodePage = () => { - return ; -}; - -export default PaperCodePage; \ No newline at end of file diff --git a/src/pages/projects/sistent/components/paper/guidance.js b/src/pages/projects/sistent/components/paper/guidance.js deleted file mode 100644 index a0ae573e7c1d..000000000000 --- a/src/pages/projects/sistent/components/paper/guidance.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import PaperGuidance from "../../../../../sections/Projects/Sistent/components/paper/guidance"; - -const PaperGuidancePage = () => { - return ; -}; - -export default PaperGuidancePage; diff --git a/src/pages/projects/sistent/components/paper/index.js b/src/pages/projects/sistent/components/paper/index.js deleted file mode 100644 index cac37c7bd2c0..000000000000 --- a/src/pages/projects/sistent/components/paper/index.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from "react"; -import SistentPaper from "../../../../../sections/Projects/Sistent/components/paper"; - - -const SistentPaperPage = () => { - return ; -}; - -export default SistentPaperPage; \ No newline at end of file diff --git a/src/pages/projects/sistent/components/popper/code.js b/src/pages/projects/sistent/components/popper/code.js deleted file mode 100644 index 9327a30755d0..000000000000 --- a/src/pages/projects/sistent/components/popper/code.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import { PooperCode } from "../../../../../sections/Projects/Sistent/components/popper/code"; - -const PopperCodePage = () => { - return ; -}; - -export default PopperCodePage; diff --git a/src/pages/projects/sistent/components/popper/guidance.js b/src/pages/projects/sistent/components/popper/guidance.js deleted file mode 100644 index 70cde98837c0..000000000000 --- a/src/pages/projects/sistent/components/popper/guidance.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import { PopperGuidance } from "../../../../../sections/Projects/Sistent/components/popper/guidance"; - -const PopperGuidancePage = () => { - return ; -}; - -export default PopperGuidancePage; diff --git a/src/pages/projects/sistent/components/popper/index.js b/src/pages/projects/sistent/components/popper/index.js deleted file mode 100644 index e75d22655e5f..000000000000 --- a/src/pages/projects/sistent/components/popper/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import { SistentPopper } from "../../../../../sections/Projects/Sistent/components/popper"; - -const SistentPopperPage = () => { - return ; -}; - -export default SistentPopperPage; diff --git a/src/pages/projects/sistent/components/text-field/code.js b/src/pages/projects/sistent/components/text-field/code.js deleted file mode 100644 index ec4056851b3e..000000000000 --- a/src/pages/projects/sistent/components/text-field/code.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import { TextFieldCode } from "../../../../../sections/Projects/Sistent/components/text-field/code"; - -const TextFieldCodePage = () => { - return ; -}; - -export default TextFieldCodePage; diff --git a/src/pages/projects/sistent/components/text-field/guidance.js b/src/pages/projects/sistent/components/text-field/guidance.js deleted file mode 100644 index a18f55ebb86b..000000000000 --- a/src/pages/projects/sistent/components/text-field/guidance.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import { TextFieldGuidance } from "../../../../../sections/Projects/Sistent/components/text-field/guidance"; - -const TextFieldGuidancePage = () => { - return ; -}; - -export default TextFieldGuidancePage; diff --git a/src/pages/projects/sistent/components/text-field/index.js b/src/pages/projects/sistent/components/text-field/index.js deleted file mode 100644 index 4031dd295f6d..000000000000 --- a/src/pages/projects/sistent/components/text-field/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import SistentTextField from "../../../../../sections/Projects/Sistent/components/text-field"; - -const SistentTextFieldPage = () => { - return ; -}; - -export default SistentTextFieldPage; diff --git a/src/pages/projects/sistent/components/text-input/code.js b/src/pages/projects/sistent/components/text-input/code.js deleted file mode 100644 index b5664ac8dbf6..000000000000 --- a/src/pages/projects/sistent/components/text-input/code.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import { TextInputCode } from "../../../../../sections/Projects/Sistent/components/text-input/code"; - -const TextInputCodePage = () => { - return ; -}; - -export default TextInputCodePage; diff --git a/src/pages/projects/sistent/components/text-input/guidance.js b/src/pages/projects/sistent/components/text-input/guidance.js deleted file mode 100644 index 9b99306618ee..000000000000 --- a/src/pages/projects/sistent/components/text-input/guidance.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import { TextInputGuidance } from "../../../../../sections/Projects/Sistent/components/text-input/guidance"; - -const TextInputGuidancePage = () => { - return ; -}; - -export default TextInputGuidancePage; diff --git a/src/pages/projects/sistent/components/text-input/index.js b/src/pages/projects/sistent/components/text-input/index.js deleted file mode 100644 index dfbb28313e00..000000000000 --- a/src/pages/projects/sistent/components/text-input/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import React from "react"; -import SistentTextInput from "../../../../../sections/Projects/Sistent/components/text-input"; - -const SistentTextInputPage = () => { - return ; -}; - -export default SistentTextInputPage; diff --git a/src/sections/Projects/Sistent/components/button/code.js b/src/sections/Projects/Sistent/components/button/code.js index 89363d64a8c9..a8d4903d1978 100644 --- a/src/sections/Projects/Sistent/components/button/code.js +++ b/src/sections/Projects/Sistent/components/button/code.js @@ -35,12 +35,12 @@ const codes = [ `, ]; -export const ButtonCode = () => { +const ButtonCode = () => { const location = useLocation(); const { isDark } = useStyledDarkMode(); return ( - +

Button

@@ -177,3 +177,5 @@ export const ButtonCode = () => { ); }; + +export default ButtonCode; diff --git a/src/sections/Projects/Sistent/components/button/guidance.js b/src/sections/Projects/Sistent/components/button/guidance.js index 7c82855fb74d..8fafed9689b5 100644 --- a/src/sections/Projects/Sistent/components/button/guidance.js +++ b/src/sections/Projects/Sistent/components/button/guidance.js @@ -8,7 +8,7 @@ import { SistentLayout } from "../../sistent-layout"; import TabButton from "../../../../../reusecore/Button"; import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode"; -export const ButtonGuidance = () => { +const ButtonGuidance = () => { const location = useLocation(); const { isDark } = useStyledDarkMode(); @@ -195,3 +195,5 @@ export const ButtonGuidance = () => { ); }; + +export default ButtonGuidance; diff --git a/src/sections/Projects/Sistent/components/container/code.js b/src/sections/Projects/Sistent/components/container/code.js index dc55461dd067..5dc8eb3b9634 100644 --- a/src/sections/Projects/Sistent/components/container/code.js +++ b/src/sections/Projects/Sistent/components/container/code.js @@ -44,7 +44,7 @@ const codes = [ `, ]; -export const ContainerCode = () => { +const ContainerCode = () => { const location = useLocation(); const { isDark } = useStyledDarkMode(); @@ -217,3 +217,5 @@ export const ContainerCode = () => { ); }; + +export default ContainerCode; diff --git a/src/sections/Projects/Sistent/components/container/guidance.js b/src/sections/Projects/Sistent/components/container/guidance.js index 6578572a29f9..b1a8a0b963e6 100644 --- a/src/sections/Projects/Sistent/components/container/guidance.js +++ b/src/sections/Projects/Sistent/components/container/guidance.js @@ -8,7 +8,7 @@ import { SistentLayout } from "../../sistent-layout"; import TabButton from "../../../../../reusecore/Button"; import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode"; -export const ContainerGuidancePage = () => { +const ContainerGuidancePage = () => { const location = useLocation(); const { isDark } = useStyledDarkMode(); @@ -162,3 +162,5 @@ export const ContainerGuidancePage = () => { ); }; + +export default ContainerGuidancePage; diff --git a/src/sections/Projects/Sistent/components/link/code.js b/src/sections/Projects/Sistent/components/link/code.js index 2096cd6fd8f8..6e8b91eefff3 100644 --- a/src/sections/Projects/Sistent/components/link/code.js +++ b/src/sections/Projects/Sistent/components/link/code.js @@ -68,7 +68,7 @@ const codes = [ `, - ` + ` Visit Secure Link - ` + `, ]; -export const LinkCode = () => { +const LinkCode = () => { const location = useLocation(); const { isDark } = useStyledDarkMode(); return ( - +

Link

-

-

+

{ /> {

- Links are fundamental components in web navigation, allowing users to move between different pages or resources. Their design and implementation are crucial for creating a seamless browsing experience. + Links are fundamental components in web navigation, allowing users + to move between different pages or resources. Their design and + implementation are crucial for creating a seamless browsing + experience.

Simple Link

-

The link can be presented in a simple format, primarily as underlined text that serves as a gateway to navigate users to other pages or resources, without any prominent styling or buttons attached to it.

+

+ The link can be presented in a simple format, primarily as + underlined text that serves as a gateway to navigate users to other + pages or resources, without any prominent styling or buttons + attached to it. +

@@ -157,17 +163,23 @@ export const LinkCode = () => {

Customized Links

- Customized Links enhance user experience by adapting their design and behavior to match the app’s theme. They can include personalized styles, hover effects, or icons, ensuring both visual consistency and improved usability across the website. + Customized Links enhance user experience by adapting their design + and behavior to match the app’s theme. They can include personalized + styles, hover effects, or icons, ensuring both visual consistency + and improved usability across the website.

Colored Link

- Colored Links can help draw attention to key areas of a page. They are styled with custom colors to stand out and indicate their importance, enhancing navigation and usability. + Colored Links can help draw attention to key areas of a page. They + are styled with custom colors to stand out and indicate their + importance, enhancing navigation and usability.

- {

Underlined Link

- Underlined Links, often referred to as ghost buttons, are styled primarily with text without any fills or borders. They utilize specific text styling and color to signify different states, making them easily identifiable and enhancing user navigation. + Underlined Links, often referred to as ghost buttons, are styled + primarily with text without any fills or borders. They utilize + specific text styling and color to signify different states, making + them easily identifiable and enhancing user navigation.

@@ -197,7 +212,7 @@ export const LinkCode = () => { marginLeft: "10px", }} > - Underlined Link + Underlined Link
@@ -206,7 +221,10 @@ export const LinkCode = () => {

Customized Link

- Customized Links allow for distinct text styles and presentations that can enhance the user experience. By leveraging different styling properties, these links can be tailored to fit the design aesthetics of your application while maintaining functionality. + Customized Links allow for distinct text styles and presentations + that can enhance the user experience. By leveraging different + styling properties, these links can be tailored to fit the design + aesthetics of your application while maintaining functionality.

@@ -233,7 +251,9 @@ export const LinkCode = () => {

Security Considerations

- When utilizing links we should use them with the target="_blank" attribute, it's essential to implement rel="noopener" or rel="noreferrer" to enhance security and user privacy + When utilizing links we should use them with the target="_blank" + attribute, it's essential to implement rel="noopener" or + rel="noreferrer" to enhance security and user privacy

@@ -259,3 +279,4 @@ export const LinkCode = () => { ); }; +export default LinkCode; diff --git a/src/sections/Projects/Sistent/components/link/guidance.js b/src/sections/Projects/Sistent/components/link/guidance.js index e07030a91889..48ae032caa14 100644 --- a/src/sections/Projects/Sistent/components/link/guidance.js +++ b/src/sections/Projects/Sistent/components/link/guidance.js @@ -6,10 +6,10 @@ import { SistentThemeProvider, Link, ExternalLinkIcon } from "@layer5/sistent"; import { SistentLayout } from "../../sistent-layout"; import TabButton from "../../../../../reusecore/Button"; -import StyledButton from "../../../../../reusecore/Button"; +import StyledButton from "../../../../../reusecore/Button"; import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode"; -export const LinkGuidancePage = () => { +const LinkGuidancePage = () => { const location = useLocation(); const { isDark } = useStyledDarkMode(); @@ -20,7 +20,8 @@ export const LinkGuidancePage = () => {

Link

- A link component is a navigational element that directs users to another page or section within an application. + A link component is a navigational element that directs users to + another page or section within an application.

{ /> {

- Links are fundamental components in web navigation, allowing users to move between different pages or resources. Their design and implementation are crucial for creating a seamless browsing experience. + Links are fundamental components in web navigation, allowing users + to move between different pages or resources. Their design and + implementation are crucial for creating a seamless browsing + experience.

Function

-

- Links too have a lot many functions as: -

+

Links too have a lot many functions as:

Navigation Links

- These links help users navigate through a website, directing them to important sections or related content. They should be easily accessible and clearly labeled to enhance usability. + These links help users navigate through a website, directing them to + important sections or related content. They should be easily + accessible and clearly labeled to enhance usability.

@@ -85,11 +88,18 @@ export const LinkGuidancePage = () => {

Call to Action (CTA) Links

- CTA links encourage users to take specific actions, such as signing up for a newsletter or downloading a resource. They should stand out visually to attract user attention and drive engagement. + CTA links encourage users to take specific actions, such as signing + up for a newsletter or downloading a resource. They should stand out + visually to attract user attention and drive engagement.

- + {

External Links

- These links direct users to external websites. It’s important to provide clear indicators (like icons or different styles) that these links lead to external content, which helps users manage their navigation expectations. + These links direct users to external websites. It’s important to + provide clear indicators (like icons or different styles) that these + links lead to external content, which helps users manage their + navigation expectations.

@@ -121,7 +134,9 @@ export const LinkGuidancePage = () => { display: "inline-flex", alignItems: "center", }} - onMouseEnter={(e) => (e.target.style.textDecoration = "underline")} + onMouseEnter={(e) => + (e.target.style.textDecoration = "underline") + } onMouseLeave={(e) => (e.target.style.textDecoration = "none")} > Visit External Resource @@ -133,22 +148,37 @@ export const LinkGuidancePage = () => {

Labeling

- Link labels are vital for communicating the action associated with the link. Labels should be concise, informative, and use action-oriented language (e.g., "Download Report," "Learn More") to guide users effectively. + Link labels are vital for communicating the action associated with + the link. Labels should be concise, informative, and use + action-oriented language (e.g., "Download Report," "Learn More") to + guide users effectively.

Case Style

- Consistency in the case style of link text improves readability and enhances the overall aesthetic of the website. Using a uniform style, such as sentence case or title case, contributes to a more professional appearance. + Consistency in the case style of link text improves readability and + enhances the overall aesthetic of the website. Using a uniform + style, such as sentence case or title case, contributes to a more + professional appearance.

Font Weight

- The weight of the font in link text can signify importance and attract user attention. A bolder font can indicate a primary action, while a lighter font may denote secondary options. Legibility is essential for ensuring that links are easy to read. + The weight of the font in link text can signify importance and + attract user attention. A bolder font can indicate a primary action, + while a lighter font may denote secondary options. Legibility is + essential for ensuring that links are easy to read.

Text Decoration

- Links typically use underlines to distinguish them from regular text. However, it’s important to maintain the underline for accessibility and usability, as users often associate underlined text with clickable links. Consider hover effects to provide visual feedback. + Links typically use underlines to distinguish them from regular + text. However, it’s important to maintain the underline for + accessibility and usability, as users often associate underlined + text with clickable links. Consider hover effects to provide visual + feedback.

); }; + +export default LinkGuidancePage; diff --git a/src/sections/Projects/Sistent/components/modal/code.js b/src/sections/Projects/Sistent/components/modal/code.js index b71e2b8962bb..174e1c8b7e5d 100644 --- a/src/sections/Projects/Sistent/components/modal/code.js +++ b/src/sections/Projects/Sistent/components/modal/code.js @@ -80,7 +80,7 @@ const codes = [ `, ]; -export const ModalCode = () => { +const ModalCode = () => { const [open, setOpen] = useState(false); const [actionOpen, setActionOpen] = useState(false); const location = useLocation(); diff --git a/src/sections/Projects/Sistent/components/modal/guidance.js b/src/sections/Projects/Sistent/components/modal/guidance.js index 99dba2bd4dd7..fdb7e0bf197c 100644 --- a/src/sections/Projects/Sistent/components/modal/guidance.js +++ b/src/sections/Projects/Sistent/components/modal/guidance.js @@ -4,7 +4,7 @@ import TabButton from "../../../../../reusecore/Button"; import { navigate } from "gatsby"; import { useLocation } from "@reach/router"; -export const ModalGuidance = () => { +const ModalGuidance = () => { const location = useLocation(); return ( diff --git a/src/sections/Projects/Sistent/components/modal/index.js b/src/sections/Projects/Sistent/components/modal/index.js index f89f2e129bc7..dd7b698b98b2 100644 --- a/src/sections/Projects/Sistent/components/modal/index.js +++ b/src/sections/Projects/Sistent/components/modal/index.js @@ -8,7 +8,7 @@ import ConfirmationDarkBg from "../../../../../assets/images/app/projects/sisten import { Col, Row } from "../../../../../reusecore/Layout"; import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode"; -export const SistentModal = () => { +const SistentModal = () => { const location = useLocation(); const { isDark } = useStyledDarkMode(); return ( diff --git a/src/sections/Projects/Sistent/components/paper/index.js b/src/sections/Projects/Sistent/components/paper/index.js index 34ed637986af..519525e0d48c 100644 --- a/src/sections/Projects/Sistent/components/paper/index.js +++ b/src/sections/Projects/Sistent/components/paper/index.js @@ -6,7 +6,7 @@ import { useLocation } from "@reach/router"; import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode"; import { Paper, SistentThemeProvider } from "@layer5/sistent"; -export const SistentPaper = () => { +const SistentPaper = () => { const location = useLocation(); const { isDark } = useStyledDarkMode(); return ( diff --git a/src/sections/Projects/Sistent/components/popper/code.js b/src/sections/Projects/Sistent/components/popper/code.js index 7983121f6aeb..d34899bdf4e1 100644 --- a/src/sections/Projects/Sistent/components/popper/code.js +++ b/src/sections/Projects/Sistent/components/popper/code.js @@ -138,7 +138,7 @@ const codes = [ `, ]; -export const PooperCode = () => { +const PooperCode = () => { const { isDark } = useStyledDarkMode(); const location = useLocation(); @@ -345,3 +345,5 @@ export const PooperCode = () => { ); }; + +export default PooperCode; diff --git a/src/sections/Projects/Sistent/components/popper/guidance.js b/src/sections/Projects/Sistent/components/popper/guidance.js index 8a9e4a4c9dab..f08720d6a236 100644 --- a/src/sections/Projects/Sistent/components/popper/guidance.js +++ b/src/sections/Projects/Sistent/components/popper/guidance.js @@ -7,7 +7,7 @@ import { Row } from "../../../../../reusecore/Layout"; import TabButton from "../../../../../reusecore/Button"; import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode"; -export const PopperGuidance = () => { +const PopperGuidance = () => { const { isDark } = useStyledDarkMode(); const location = useLocation(); const [open, setOpen] = useState(false); @@ -43,7 +43,7 @@ export const PopperGuidance = () => { { ); }; + +export default PopperGuidance; diff --git a/src/sections/Projects/Sistent/components/popper/index.js b/src/sections/Projects/Sistent/components/popper/index.js index 9931d3a4381b..6f2400d02c26 100644 --- a/src/sections/Projects/Sistent/components/popper/index.js +++ b/src/sections/Projects/Sistent/components/popper/index.js @@ -7,7 +7,7 @@ import { SistentLayout } from "../../sistent-layout"; import { Row } from "../../../../../reusecore/Layout"; import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode"; -export const SistentPopper = () => { +const SistentPopper = () => { const location = useLocation(); const { isDark } = useStyledDarkMode(); @@ -46,7 +46,7 @@ export const SistentPopper = () => { { ); }; + +export default SistentPopper; diff --git a/src/sections/Projects/Sistent/components/text-field/code.js b/src/sections/Projects/Sistent/components/text-field/code.js index f1dd658f7469..ead9a2f449fc 100644 --- a/src/sections/Projects/Sistent/components/text-field/code.js +++ b/src/sections/Projects/Sistent/components/text-field/code.js @@ -316,18 +316,21 @@ const codes = [ `, ]; -export const TextFieldCode = () => { +const TextFieldCode = () => { const location = useLocation(); const { isDark } = useStyledDarkMode(); return ( - +

Text Field

- The TextField component is a versatile input field used to capture user input in forms and user interfaces. It can handle a variety of input types, such as text, numbers, emails, and passwords, and offers built-in styling and validation features. + The TextField component is a versatile input field used to capture + user input in forms and user interfaces. It can handle a variety of + input types, such as text, numbers, emails, and passwords, and offers + built-in styling and validation features.

{ { /> {

- A TextField allow user to enter and edit any text. It mostly present in Forms or dialogue box in UI. - TextField are crucial and integral elements in an interface. It allows to get data from enetered user. + A TextField allow user to enter and edit any text. It mostly present + in Forms or dialogue box in UI. TextField are crucial and integral + elements in an interface. It allows to get data from enetered user.

Form Props

- Standard form attributes are supported, for example required, disabled, type, etc. - HelperText attributes is used to give context about a field's input, - such as how the input will be used. + Standard form attributes are supported, for example required, + disabled, type, etc. HelperText attributes is used to give context + about a field's input, such as how the input will be used.

@@ -407,7 +412,11 @@ export const TextFieldCode = () => { label="Number" type="number" /> - + {

Validation

- The error property toggles the error state. The helperText prop can then be used to provide feedback to the user about the error. As shown below it can be used with variant such as outlined (default), filled, and standard. + The error property toggles the error state. The helperText prop can + then be used to provide feedback to the user about the error. As + shown below it can be used with variant such as outlined (default), + filled, and standard.

@@ -577,7 +589,10 @@ export const TextFieldCode = () => {

Multiline

- The multiline prop transforms the text field into a TextareaAutosize element. Unless the rows prop is set, the height of the text field dynamically matches its content (using TextareaAutosize). You can use the minRows and maxRows props to bound it. + The multiline prop transforms the text field into a TextareaAutosize + element. Unless the rows prop is set, the height of the text field + dynamically matches its content (using TextareaAutosize). You can + use the minRows and maxRows props to bound it.

@@ -666,7 +681,8 @@ export const TextFieldCode = () => {

Sizes

- TextField can have small or normal field sizes. According the requirement it can be adjusted. + TextField can have small or normal field sizes. According the + requirement it can be adjusted.

@@ -684,7 +700,11 @@ export const TextFieldCode = () => { defaultValue="Small" size="small" /> - +
{

Full Width

- FullWidth attribute can be used to make the input take up the full width of its container. + FullWidth attribute can be used to make the input take up the full + width of its container.

@@ -744,4 +765,4 @@ export const TextFieldCode = () => { ); }; - +export default TextFieldCode; diff --git a/src/sections/Projects/Sistent/components/text-field/guidance.js b/src/sections/Projects/Sistent/components/text-field/guidance.js index 7f07899f1fc8..bfb5cf9ef39f 100644 --- a/src/sections/Projects/Sistent/components/text-field/guidance.js +++ b/src/sections/Projects/Sistent/components/text-field/guidance.js @@ -7,7 +7,7 @@ import { SistentLayout } from "../../sistent-layout"; import TabButton from "../../../../../reusecore/Button"; import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode"; -export const TextFieldGuidance = () => { +const TextFieldGuidance = () => { const location = useLocation(); const { isDark } = useStyledDarkMode(); @@ -18,7 +18,10 @@ export const TextFieldGuidance = () => {

Text Field

- The TextField component is a versatile input field used to capture user input in forms and user interfaces. It can handle a variety of input types, such as text, numbers, emails, and passwords, and offers built-in styling and validation features. + The TextField component is a versatile input field used to capture + user input in forms and user interfaces. It can handle a variety of + input types, such as text, numbers, emails, and passwords, and offers + built-in styling and validation features.

{ { /> navigate("/projects/sistent/components/text-field/code")} + onClick={() => + navigate("/projects/sistent/components/text-field/code") + } title="Code" />

For proper application, these TextField can be used for different - purposes. It can be effectively used in any project to increase User Interaction. - Lets see how can we use TextField effectively in our project. + purposes. It can be effectively used in any project to increase User + Interaction. Lets see how can we use TextField effectively in our + project.

Basic TextField

- The TextField wrapper component is a complete form control including a label, variant, helper text etc. TextField comes with three variants: outlined (default), filled, and standard. + The TextField wrapper component is a complete form control including + a label, variant, helper text etc. TextField comes with three + variants: outlined (default), filled, and standard.

Outlined (default)

@@ -79,15 +88,19 @@ export const TextFieldGuidance = () => { noValidate autoComplete="off" > - +

Filled

- Filled TextField are TextField that consist a background color fill and - a text in it. Depending on the theme or intended action, the color - fill can range from a primary brand color to any other applicable - color in a brand’s color palette. + Filled TextField are TextField that consist a background color fill + and a text in it. Depending on the theme or intended action, the + color fill can range from a primary brand color to any other + applicable color in a brand’s color palette.

{

Standard

- Standard TextField are TextField that do not have background color fill and - a text in it. Colors can also be used to style these buttons in order to fit - into the theme align with brand guidelines. + Standard TextField are TextField that do not have background color + fill and a text in it. Colors can also be used to style these + buttons in order to fit into the theme align with brand guidelines.

{ noValidate autoComplete="off" > - +

When to use different properties?

- You might come across in a situation you needed some helper text, field with number, disabled field etc. Let's see different properties availble for TextField. + You might come across in a situation you needed some helper text, + field with number, disabled field etc. Let's see different + properties availble for TextField.

Type prop

-

- Type prop can have a value such as password, number or text. -

+

Type prop can have a value such as password, number or text.

{ type="password" autoComplete="current-password" /> - - + +

Helper Text

- Helper text also very effective for your form or for better understanding. + Helper text also very effective for your form or for better + understanding.

{

Error

- Error handling is very important for UI. User might come in sitatution where they enter invalid value or forget to enter any data in TextField. Here come error prop helps to indicate partucular field are required or user have entered invalid value. + Error handling is very important for UI. User might come in + sitatution where they enter invalid value or forget to enter any + data in TextField. Here come error prop helps to indicate partucular + field are required or user have entered invalid value.

{ ); }; + +export default TextFieldGuidance; diff --git a/src/sections/Projects/Sistent/components/text-input/code.js b/src/sections/Projects/Sistent/components/text-input/code.js index 3d2c35a33d90..7749ec23e2c0 100644 --- a/src/sections/Projects/Sistent/components/text-input/code.js +++ b/src/sections/Projects/Sistent/components/text-input/code.js @@ -5,7 +5,7 @@ import { SistentLayout } from "../../sistent-layout"; import TabButton from "../../../../../reusecore/Button"; -export const TextInputCode = () => { +const TextInputCode = () => { const location = useLocation(); return ( @@ -61,3 +61,5 @@ export const TextInputCode = () => { ); }; + +export default TextInputCode; diff --git a/src/sections/Projects/Sistent/components/text-input/guidance.js b/src/sections/Projects/Sistent/components/text-input/guidance.js index 09c455fe260d..f501f68590d0 100644 --- a/src/sections/Projects/Sistent/components/text-input/guidance.js +++ b/src/sections/Projects/Sistent/components/text-input/guidance.js @@ -8,7 +8,7 @@ import { SistentLayout } from "../../sistent-layout"; import TabButton from "../../../../../reusecore/Button"; import { useStyledDarkMode } from "../../../../../theme/app/useStyledDarkMode"; -export const TextInputGuidance = () => { +const TextInputGuidance = () => { const location = useLocation(); const { isDark } = useStyledDarkMode(); @@ -126,3 +126,5 @@ export const TextInputGuidance = () => { ); }; + +export default TextInputGuidance;