From 2bb70b2015a22c48e88d9334c653518340e7cb13 Mon Sep 17 00:00:00 2001 From: Elliot Voris Date: Fri, 20 Dec 2024 10:40:57 -0600 Subject: [PATCH] rename explore and learn more link functions --- .../Homepage/DeveloperResources/index.tsx | 10 +-- .../Homepage/NavigatingTheDocs/index.tsx | 20 ++--- .../Homepage/WayfindingBoxes/index.tsx | 80 +++++-------------- 3 files changed, 33 insertions(+), 77 deletions(-) diff --git a/src/components/Homepage/DeveloperResources/index.tsx b/src/components/Homepage/DeveloperResources/index.tsx index cc525fadc..8c5936c7f 100644 --- a/src/components/Homepage/DeveloperResources/index.tsx +++ b/src/components/Homepage/DeveloperResources/index.tsx @@ -2,7 +2,7 @@ import React, { type ReactNode } from 'react' import Heading from '@theme/Heading'; import Link from '@docusaurus/Link'; import clsx from 'clsx'; -import { learnMoreLink, partitionBoxes, type NavigatingDocsItem as DeveloperResourcesItem } from '@site/src/components/Homepage/NavigatingTheDocs' +import { exploreLink, partitionBoxes, type NavigatingDocsItem as DeveloperResourcesItem } from '@site/src/components/Homepage/NavigatingTheDocs' import Translate, { translate } from '@docusaurus/Translate' import styles from './styles.module.css' @@ -19,7 +19,7 @@ const DeveloperResourcesBoxes: DeveloperResourcesItem[] = [ Ask questions and engage with other Stellar devs. ), - link: learnMoreLink('https://discord.gg/st7Mxd58BV'), + link: exploreLink('https://discord.gg/st7Mxd58BV'), }, { title: translate({ @@ -33,7 +33,7 @@ const DeveloperResourcesBoxes: DeveloperResourcesItem[] = [ Get the latest news and insights about building on Stellar. ), - link: learnMoreLink('https://stellar.org/developers'), + link: exploreLink('https://stellar.org/developers'), }, { title: translate({ @@ -47,7 +47,7 @@ const DeveloperResourcesBoxes: DeveloperResourcesItem[] = [ A question and answer site for Stellar developers; if you can’t find what you’re looking for in the docs, try searching the Stack Exchange to see if your question has been addressed. If it hasn't, feel free to ask! ), - link: learnMoreLink('https://stellar.stackexchange.com/'), + link: exploreLink('https://stellar.stackexchange.com/'), }, { title: translate({ @@ -61,7 +61,7 @@ const DeveloperResourcesBoxes: DeveloperResourcesItem[] = [ Discuss Core Advancement Proposals (CAPs) and Stellar Ecosystem Proposals (SEPs), talk about the development of Stellar Core and Horizon, and stay informed about important network upgrades. ), - link: learnMoreLink('https://groups.google.com/g/stellar-dev'), + link: exploreLink('https://groups.google.com/g/stellar-dev'), }, ] diff --git a/src/components/Homepage/NavigatingTheDocs/index.tsx b/src/components/Homepage/NavigatingTheDocs/index.tsx index 5ebfa8f17..038828800 100644 --- a/src/components/Homepage/NavigatingTheDocs/index.tsx +++ b/src/components/Homepage/NavigatingTheDocs/index.tsx @@ -11,11 +11,11 @@ export type NavigatingDocsItem = { link: ReactNode; } -export const learnMoreLink = (target: string) => ( +export const exploreLink = (target: string) => ( + id='component.Homepage.ExploreButton.Text' + description='The text that will be displayed on the "Explore" buttons'> Explore @@ -43,7 +43,7 @@ const NavigatingDocsBoxes: NavigatingDocsItem[] = [ Contains tutorials and how-to guides for writing smart contracts, building applications, interacting with the network, and more. ), - link: learnMoreLink('/docs/build'), + link: exploreLink('/docs/build'), }, { title: translate({ @@ -57,7 +57,7 @@ const NavigatingDocsBoxes: NavigatingDocsItem[] = [ Find all informational and conceptual content here. Learn about Stellar fundamentals like how accounts and transactions function, dive deeper into the functionality of each operation, discover how fees work, and more. ), - link: learnMoreLink('/docs/learn/fundamentals'), + link: exploreLink('/docs/learn/fundamentals'), }, { title: translate({ @@ -71,7 +71,7 @@ const NavigatingDocsBoxes: NavigatingDocsItem[] = [ Information on how to issue assets on the Stellar network and create custom smart contract tokens. ), - link: learnMoreLink('/docs/tokens'), + link: exploreLink('/docs/tokens'), }, { title: translate({ @@ -85,7 +85,7 @@ const NavigatingDocsBoxes: NavigatingDocsItem[] = [ Discover various data availability options: RPC, Hubble, Horizon, Galexie, and data indexers. ), - link: learnMoreLink('/docs/data'), + link: exploreLink('/docs/data'), }, { title: translate({ @@ -99,7 +99,7 @@ const NavigatingDocsBoxes: NavigatingDocsItem[] = [ Learn about all the available tools for building on, interacting with, or just watching the Stellar network. Also, find information on how to use the Anchor Platform or Stellar Disbursement Platform. ), - link: learnMoreLink('/docs/tools'), + link: exploreLink('/docs/tools'), }, { title: translate({ @@ -113,7 +113,7 @@ const NavigatingDocsBoxes: NavigatingDocsItem[] = [ Information about deployed networks (Mainnet, Testnet, and Futurenet), current software versions, resource limitations, and fees. ), - link: learnMoreLink('/docs/networks'), + link: exploreLink('/docs/networks'), }, { title: translate({ @@ -127,7 +127,7 @@ const NavigatingDocsBoxes: NavigatingDocsItem[] = [ Everything you'll need to know if you want to run, operate, and maintain a core validator node on the Stellar network. ), - link: learnMoreLink('/docs/validators'), + link: exploreLink('/docs/validators'), }, ] diff --git a/src/components/Homepage/WayfindingBoxes/index.tsx b/src/components/Homepage/WayfindingBoxes/index.tsx index fdf825390..9d81f65b3 100644 --- a/src/components/Homepage/WayfindingBoxes/index.tsx +++ b/src/components/Homepage/WayfindingBoxes/index.tsx @@ -12,6 +12,16 @@ type WayfindingItem = { link: ReactNode; } +export const learnMoreLink = (target: string) => ( + + + LearnMore + + +) + const WayfindingWays: WayfindingItem[] = [ { title: translate({ @@ -26,16 +36,7 @@ const WayfindingWays: WayfindingItem[] = [ Issue an asset or create a custom smart contract token. ), - link: ( - - - Learn more - - - ), + link: learnMoreLink("#asset-issuers"), }, { title: translate({ @@ -50,16 +51,7 @@ const WayfindingWays: WayfindingItem[] = [ Write smart contracts on the Stellar network. ), - link: ( - - - Learn more - - - ), + link: learnMoreLink("#smart-contract-developers"), }, { title: translate({ @@ -74,16 +66,7 @@ const WayfindingWays: WayfindingItem[] = [ Learn about and set up an anchor. ), - link: ( - - - Learn more - - - ), + link: learnMoreLink("#ramps-anchors"), }, { title: translate({ @@ -95,19 +78,10 @@ const WayfindingWays: WayfindingItem[] = [ - Build a traditional wallet, dapp, or list Stellar assets on an exchange. + Build a traditional wallet, dapp, or list Stellar assets on an exchange. ), - link: ( - - - Learn more - - - ), + link: learnMoreLink("#applications"), }, { title: translate({ @@ -119,19 +93,10 @@ const WayfindingWays: WayfindingItem[] = [ - Set up a Horizon or RPC service. + Set up a Horizon or RPC service. ), - link: ( - - - Learn more - - - ), + link: learnMoreLink("#infrastructure-providers"), }, { title: translate({ @@ -146,16 +111,7 @@ const WayfindingWays: WayfindingItem[] = [ Use Hubble to perform analysis on Stellar network data. ), - link: ( - - - Learn more - - - ), + link: learnMoreLink("#analytics"), }, ];