From 460d31df41c92d1ac4a1bdfefd1e31aa51175796 Mon Sep 17 00:00:00 2001 From: Radu Mojic Date: Mon, 29 Jul 2024 17:55:53 +0300 Subject: [PATCH] moved content to homepage.js --- homepage.js | 134 +++++++++++++++++++++++++++++ src/components/Community/index.jsx | 38 ++------ src/components/Features/index.jsx | 51 ++--------- src/components/Hero/index.jsx | 33 ++----- src/components/Promo/index.jsx | 22 ++--- src/components/Resources/index.jsx | 31 +++---- 6 files changed, 170 insertions(+), 139 deletions(-) create mode 100644 homepage.js diff --git a/homepage.js b/homepage.js new file mode 100644 index 00000000..9db31ea4 --- /dev/null +++ b/homepage.js @@ -0,0 +1,134 @@ +import { + faDiscord, + faTelegram, + faStackOverflow, +} from "@fortawesome/free-brands-svg-icons"; +import { faBook, faHammer, faServer } from "@fortawesome/free-solid-svg-icons"; + +const homepage = { + hero: { + title: "MultiversX Developer Docs", + subtitle: "Choose your path, you must.", + cards: [ + { + title: "Learn about MultiversX", + text: "Meet the blockchain that can offer true internet-scale performance.", + link: "/welcome/welcome-to-multiversx", + icon: faBook, + }, + { + title: "Start Building", + text: "Build your decentralized application in minutes.", + link: "/developers/overview", + icon: faHammer, + }, + { + title: "Run a validator node", + text: "Validate transactions, secure the network, and earn rewards.", + link: "/validators/overview", + icon: faServer, + }, + ], + }, + features: { + title: "Do more with MultiversX", + cards: [ + { + title: "Create a Token", + text: "Issue your own ESDT token, MultiversX's improved equivalent of ERC-20.", + link: "/tokens/intro", + }, + { + title: "Manage a Wallet", + text: "Create a wallet to send, receive and store MultiversX tokens.", + link: "/wallet/overview", + }, + { + title: "Integrate MultiversX", + text: "Follow our guide to integrate exchanges, wallets, and other platforms.", + link: "/integrators/overview", + }, + { + title: "Get the Architecture Overview", + text: "Explore MultiversX innovations.", + link: "/technology/architecture-overview", + }, + { + title: "Discover SpaceVM", + text: "A fast and secure virtual machine to power growth.", + link: "/learn/space-vm", + }, + { + title: "Get EGLD", + text: "You need EGLD or xEGLD in order to be able to interact with the MultiversX Network.", + link: "/learn/EGLD#getting-egld", + }, + { + title: "Tools & Resources", + text: "You can access the best set of tools that you may need for running your project.", + link: "https://multiversx.com/builders/builder-tools-resources", + }, + { + title: "Tutorials", + text: "A great start for anyone looking to learn.", + link: "https://multiversx.com/builders/build-your-first-multiversx-dapp-in-30-minutes", + }, + ], + }, + promo: { + title: "Build and deploy custom L2s or Appchains", + tag: "Sovereign Chains", + subtitle: + "Enable new types of use cases made possible by scalable, efficient, secure and dedicated blockchains - powered by the Sovereign Chain SDK.", + link: "sovereign/overview", + button: "Sovereign Chains Documentation", + }, + community: { + title: "Engage the developer community", + subtitle: + "Discover all places where the community gathers and the live community session happening.", + cards: [ + { + title: "Developer Discord", + text: "Connect with other developers building on MultiversX", + link: "https://discord.com/invite/multiversxbuilders", + icon: faDiscord, + }, + { + title: "Developer Telegram", + text: "Connect with other MultiversX Builders and developers", + link: "https://t.me/MultiversX", + icon: faTelegram, + }, + { + title: "Stack Overflow", + text: "Get answers to technical questions from the community", + link: "https://stackoverflow.com/questions/tagged/multiversx", + icon: faStackOverflow, + }, + ], + }, + resources: { + subtitle: "More resources:", + links: [ + { + text: "Developer Podcasts", + link: "https://open.spotify.com/show/4I6Xr5Mmd10ywvb2aj7e6Z", + }, + { + text: "Stack Overflow", + link: "https://stackoverflow.com/questions/tagged/multiversx", + }, + { + text: "Tech Talks from xDay 2023", + link: "https://www.youtube.com/watch?v=WoIa4sQuNDo", + }, + { + text: "@multiversx on X", + link: "https://twitter.com/MultiversX", + }, + ], + }, +}; + +export default homepage; diff --git a/src/components/Community/index.jsx b/src/components/Community/index.jsx index 95ae8462..1c379a5b 100644 --- a/src/components/Community/index.jsx +++ b/src/components/Community/index.jsx @@ -1,42 +1,16 @@ import React from "react"; -import { - faDiscord, - faTelegram, - faStackOverflow, -} from "@fortawesome/free-brands-svg-icons"; import Section from "../Section"; - -const TITLE = "Engage the developer community"; -const SUBTITLE = - "Discover all places where the community gathers and the live community session happening."; -const CARDS = [ - { - title: "Developer Discord", - text: "Connect with other developers building on MultiversX", - link: "https://discord.com/invite/multiversxbuilders", - icon: faDiscord, - }, - { - title: "Developer Telegram", - text: "Connect with other MultiversX Builders and developers", - link: "https://t.me/MultiversX", - icon: faTelegram, - }, - { - title: "Stack Overflow", - text: "Get answers to technical questions from the community", - link: "https://stackoverflow.com/questions/tagged/multiversx", - icon: faStackOverflow, - }, -]; +import homepage from "../../../homepage"; const Community = () => { + const { community } = homepage; + return (
); diff --git a/src/components/Features/index.jsx b/src/components/Features/index.jsx index 61a981e0..7204704c 100644 --- a/src/components/Features/index.jsx +++ b/src/components/Features/index.jsx @@ -1,56 +1,15 @@ import React from "react"; import Section from "../Section"; - -const TITLE = "Do more with MultiversX"; -const CARDS = [ - { - title: "Create a Token", - text: "Issue your own ESDT token, MultiversX's improved equivalent of ERC-20.", - link: "/tokens/intro", - }, - { - title: "Manage a Wallet", - text: "Create a wallet to send, receive and store MultiversX tokens.", - link: "/wallet/overview", - }, - { - title: "Integrate MultiversX", - text: "Follow our guide to integrate exchanges, wallets, and other platforms.", - link: "/integrators/overview", - }, - { - title: "Get the Architecture Overview", - text: "Explore MultiversX innovations.", - link: "/technology/architecture-overview", - }, - { - title: "Discover SpaceVM", - text: "A fast and secure virtual machine to power growth.", - link: "/learn/space-vm", - }, - { - title: "Get EGLD", - text: "You need EGLD or xEGLD in order to be able to interact with the MultiversX Network.", - link: "/learn/EGLD#getting-egld", - }, - { - title: "Tools & Resources", - text: "You can access the best set of tools that you may need for running your project.", - link: "https://multiversx.com/builders/builder-tools-resources", - }, - { - title: "Tutorials", - text: "A great start for anyone looking to learn.", - link: "https://multiversx.com/builders/build-your-first-multiversx-dapp-in-30-minutes", - }, -]; +import homepage from "../../../homepage"; const Features = () => { + const { features } = homepage; + return (
diff --git a/src/components/Hero/index.jsx b/src/components/Hero/index.jsx index 59655f5d..49e37668 100644 --- a/src/components/Hero/index.jsx +++ b/src/components/Hero/index.jsx @@ -1,45 +1,24 @@ import React from "react"; -import { faBook, faHammer, faServer } from "@fortawesome/free-solid-svg-icons"; import Section from "../Section"; - -const TITLE = "MultiversX Developer Docs"; -const SUBTITLE = "Choose your path, you must."; -const CARDS = [ - { - title: "Learn about MultiversX", - text: "Meet the blockchain that can offer true internet-scale performance.", - link: "/welcome/welcome-to-multiversx", - icon: faBook, - }, - { - title: "Start Building", - text: "Build your decentralized application in minutes.", - link: "/developers/overview", - icon: faHammer, - }, - { - title: "Run a validator node", - text: "Validate transactions, secure the network, and earn rewards.", - link: "/validators/overview", - icon: faServer, - }, -]; +import homepage from "../../../homepage"; const Hero = () => { + const { hero } = homepage; + return ( <>

- {TITLE} + {hero.title}

- {SUBTITLE} + {hero.subtitle}

-
+
); }; diff --git a/src/components/Promo/index.jsx b/src/components/Promo/index.jsx index b95c4b91..9d158f1c 100644 --- a/src/components/Promo/index.jsx +++ b/src/components/Promo/index.jsx @@ -4,16 +4,12 @@ import clsx from "clsx"; import { faArrowRight } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import homepage from "../../../homepage"; import "./promo.css"; -const TAG = "Sovereign Chains"; -const TITLE = "Build and deploy custom L2s or Appchains"; -const SUBTITLE = - "Enable new types of use cases made possible by scalable, efficient, secure and dedicated blockchains - powered by the Sovereign Chain SDK."; -const LINK = "sovereign/overview"; -const BUTTON = "Sovereign Chains Documentation"; - const Promo = () => { + const { promo } = homepage; + return (
- {LINK && ( + {promo.link && (
- {BUTTON} + {promo.button}
diff --git a/src/components/Resources/index.jsx b/src/components/Resources/index.jsx index 1fd8d742..4e734bdd 100644 --- a/src/components/Resources/index.jsx +++ b/src/components/Resources/index.jsx @@ -1,29 +1,18 @@ import React from "react"; import Section from "../Section"; - -const SUBTITLE = "More resources:"; -const LINKS = [ - { - text: "Developer Podcasts", - link: "https://open.spotify.com/show/4I6Xr5Mmd10ywvb2aj7e6Z", - }, - { - text: "Stack Overflow", - link: "https://stackoverflow.com/questions/tagged/multiversx", - }, - { - text: "Tech Talks from xDay 2023", - link: "https://www.youtube.com/watch?v=WoIa4sQuNDo", - }, - { - text: "@multiversx on X", - link: "https://twitter.com/MultiversX", - }, -]; +import homepage from "../../../homepage"; const Resources = () => { - return
; + const { resources } = homepage; + + return ( +
+ ); }; export default Resources;