diff --git a/content/docs.page.tsx b/content/docs.page.tsx index 4248f3421a..e2fe0fddd1 100644 --- a/content/docs.page.tsx +++ b/content/docs.page.tsx @@ -2,89 +2,227 @@ import * as React from 'react'; import { useTranslate } from '@portal/hooks'; const recommendedPages = [ - { - "description": "rippled API Reference", - "link": "./manage-the-rippled-server.html", - }, - { - "description": "XRP Faucet", - "link": "./xrp-testnet-faucet.html", - }, - { - "description": "Getting Started with Python", - "link": "./get-started-using-python.html#get-started-using-python", - }, - { - "description": "Websocket API Tool", - "link": "./websocket-api-tool.html", - }, - { "description": "XRP Ledger Explorer", "link": "https://livenet.xrpl.org" }, - ] ; + { + description: 'rippled API Reference', + link: './manage-the-rippled-server.html', + }, + { + description: 'XRP Faucet', + link: './xrp-testnet-faucet.html', + }, + { + description: 'Getting Started with Python', + link: './get-started-using-python.html#get-started-using-python', + }, + { + description: 'Websocket API Tool', + link: './websocket-api-tool.html', + }, + { description: 'XRP Ledger Explorer', link: 'https://livenet.xrpl.org' }, +]; const useCases = [ - { - "title": "On-Chain Finance", - "id": "on-chain-finance-use-cases", - "imgClass": "wallet-illustration", - "subItems": [ - { - "description": "Trade on the decentralized exchange", - "link": "./trade-in-the-decentralized-exchange.html", - }, - { - "description": "Make payments", - "link": "./send-xrp.html", - }, - { - "description": "Use specialized payment types", - "link": "./use-specialized-payment-types.html" - } - ], - }, - { - "title": "Tokens", - "id": "token-use-cases", - "imgClass": "token-illustration", - "subItems": [ - { - "description": "Non-fungible Tokens", - "link": "./non-fungible-tokens.html", - }, - { - "description": "Issue a stablecoin", - "link": "./issue-a-fungible-token.html", - }, - { - "description": "Assign an authorized minter", - "link": "./assign-an-authorized-minter-using-javascript.html", - }, - ], - }, - { - "title": "Payments", - "id": "payments-use-cases", - "imgClass": "connections-illustration", - "subItems": [ - { - "description": "Peer to peer payments", - "link": "./direct-xrp-payments.html", - }, - { - "description": "Cross-currency payments", - "link": "./cross-currency-payments.html", - }, - { - "description": "Escrows", - "link": "./escrow.html", - }, - ], - }, - ] - ; + { + title: 'On-Chain Finance', + id: 'on-chain-finance-use-cases', + imgClass: 'wallet-illustration', + subItems: [ + { + description: 'Trade on the decentralized exchange', + link: './trade-in-the-decentralized-exchange.html', + }, + { + description: 'Make payments', + link: './send-xrp.html', + }, + { + description: 'Use specialized payment types', + link: './use-specialized-payment-types.html', + }, + ], + }, + { + title: 'Tokens', + id: 'token-use-cases', + imgClass: 'token-illustration', + subItems: [ + { + description: 'Non-fungible Tokens', + link: './non-fungible-tokens.html', + }, + { + description: 'Issue a stablecoin', + link: './issue-a-fungible-token.html', + }, + { + description: 'Assign an authorized minter', + link: './assign-an-authorized-minter-using-javascript.html', + }, + ], + }, + { + title: 'Payments', + id: 'payments-use-cases', + imgClass: 'connections-illustration', + subItems: [ + { + description: 'Peer to peer payments', + link: './direct-xrp-payments.html', + }, + { + description: 'Cross-currency payments', + link: './cross-currency-payments.html', + }, + { + description: 'Escrows', + link: './escrow.html', + }, + ], + }, +]; +const intermediateVideos = [ + { + src: require('./static/img/backgrounds/docs-advanced-payment-features@2x.png'), + title: 'Advanced Payment Features', + url: 'https://www.youtube.com/embed/e2Iwsk37LMk?rel=0&showinfo=0&autoplay=1', + }, + { + src: require('./static/img/backgrounds/docs-governance@2x.png'), + title: 'Governance and the Amendment Process', + url: 'https://www.youtube.com/embed/4GbRdanHoR4?rel=0&showinfo=0&autoplay=1', + }, + { + src: require('./static/img/backgrounds/docs-sidechains@2x.png'), + title: 'Federated Sidechains', + url: 'https://www.youtube.com/embed/NhH4LM8NxgY?rel=0&showinfo=0&autoplay=1', + }, +]; +const getStartedVideos = [ + { + src: require('./static/img/backgrounds/docs-intro-to-XRP-ledger@2x.png'), + title: 'Intro to XRP Ledger', + url: 'https://www.youtube.com/embed/sVTybJ3cNyo?rel=0&showinfo=0&autoplay=1', + }, + { + src: require('./static/img/backgrounds/docs-accounts@2x.png'), + title: 'Accounts', + url: 'https://www.youtube.com/embed/eO8jE6PftX8?rel=0&showinfo=0&autoplay=1', + }, + { + src: require('./static/img/backgrounds/docs-decentralized-exchange@2x.png'), + title: 'Decentralized Exchange', + url: 'https://www.youtube.com/embed/VWNrHBDfXvA?rel=0&showinfo=0&autoplay=1', + }, + { + src: require('./static/img/backgrounds/docs-tokenization@2x.png'), + title: 'Tokenization', + url: 'https://www.youtube.com/embed/Oj4cWOiWf4A?rel=0&showinfo=0&autoplay=1', + }, +]; -const test = "./assets/img/backgrounds/docs-intro-to-XRP-ledger@2x.png"; +const devTools = [ + { + title: 'Faucets', + link: './xrp-testnet-faucet.html', + description: 'Get credentials and test-XRP for XRP Ledger Testnet or Devnet.', + }, + { + title: 'WebSocket Tool', + link: './websocket-api-tool.html', + description: 'Send sample requests and get responses from the rippled API.', + }, + { + title: 'XRP Ledger Explorer', + link: 'https://livenet.xrpl.org', + description: + 'View validations of new ledger versions in real-time, chart the location of servers in the XRP Ledger.', + }, + { + title: 'Transaction Sender', + link: './tx-sender.html', + description: + 'Test how your code handles various XRP Ledger transactions by sending them over the Testnet to the address.', + }, +]; +const test = './assets/img/backgrounds/docs-intro-to-XRP-ledger@2x.png'; -const target= {prefix: ''}; // TODO: fixme +const target = { prefix: '' }; // TODO: fixme + +function UseCasesCard(props: { + useCase: { + id: string; + title: string; + imgClass: string; + subItems: { description: string; link: string }[]; + }; +}) { + const { useCase } = props; + return ( +
+ ); +} + +function FlatCard(props: { href: string; title: string; description: string; linkText: string; imgClass }) { + const { title, description, linkText, href, imgClass } = props; + return ( + +{description}
+{translate(description)}
+ + ); +} + +function PrimaryButton(props: { href: string; text: string; isArrowUp: boolean }) { + const { href, text, isArrowUp } = props; + return ( + + {text} + + ); +} export default function Docs() { const { translate } = useTranslate(); @@ -92,285 +230,197 @@ export default function Docs() { return (- $$ description $$ -
-$$ description $$
- - $$ endmacro $$ - $$ - set intermediateVideos = [ - {'{'} - "src": "./assets/img/backgrounds/docs-advanced-payment-features@2x.png", - "title": _("Advanced Payment Features"), - "url": "https://www.youtube.com/embed/e2Iwsk37LMk?rel=0&showinfo=0&autoplay=1", - {'}'}, - {'{'} - "src": "./assets/img/backgrounds/docs-governance@2x.png", - "title": _("Governance and the Amendment Process"), - "url": "https://www.youtube.com/embed/4GbRdanHoR4?rel=0&showinfo=0&autoplay=1", - {'}'}, - {'{'} - "src": "./assets/img/backgrounds/docs-sidechains@2x.png", - "title": _("Federated Sidechains"), - "url": "https://www.youtube.com/embed/NhH4LM8NxgY?rel=0&showinfo=0&autoplay=1", - {'}'}, - ] - $$ - $$ - set getStartedVideos = [ - {'{'} - "src": "./assets/img/backgrounds/docs-intro-to-XRP-ledger@2x.png", - "title": _("Intro to XRP Ledger"), - "url": "https://www.youtube.com/embed/sVTybJ3cNyo?rel=0&showinfo=0&autoplay=1", - {'}'}, - {'{'} - "src": "./assets/img/backgrounds/docs-accounts@2x.png", - "title": _("Accounts"), - "url": "https://www.youtube.com/embed/eO8jE6PftX8?rel=0&showinfo=0&autoplay=1", - {'}'}, - {'{'} - "src": "./assets/img/backgrounds/docs-decentralized-exchange@2x.png", - "title": _("Decentralized Exchange"), - "url": "https://www.youtube.com/embed/VWNrHBDfXvA?rel=0&showinfo=0&autoplay=1", - {'}'}, - {'{'} - "src": "./assets/img/backgrounds/docs-tokenization@2x.png", - "title": _("Tokenization"), - "url": "https://www.youtube.com/embed/Oj4cWOiWf4A?rel=0&showinfo=0&autoplay=1", - {'}'}, - ] - $$ - $$ - set devTools = [ - {'{'} - "title": _("Faucets"), - "link": "./xrp-testnet-faucet.html", - "description": - _("Get credentials and test-XRP for XRP Ledger Testnet or Devnet."), - {'}'}, - {'{'} - "title": _("WebSocket Tool"), - "link": "./websocket-api-tool.html", - "description": - _("Send sample requests and get responses from the rippled API."), - {'}'}, - {'{'} - "title": _("XRP Ledger Explorer"), - "link": "https://livenet.xrpl.org", - "description": - _("View validations of new ledger versions in real-time, chart the location of servers in the XRP Ledger."), - {'}'}, - {'{'} - "title": _("Transaction Sender"), - "link": "./tx-sender.html", - "description": - _("Test how your code handles various XRP Ledger transactions by sending them over the Testnet to the address."), - {'}'}, - ] - $$ -{translate('An introduction to fundamental aspects of the XRP Ledger.')}
+- {translate("Use these web-based tools to assist during all stages of development, from getting your first payment to testing your implementation for best practices.")} -
-+ {translate( + 'Use these web-based tools to assist during all stages of development, from getting your first payment to testing your implementation for best practices.' + )} +
+{translate("Connect to the XRP Ledger Testnet network to develop and test your apps built on the XRP Ledger, without risking real money or impacting production XRP Ledger users.")}
- {translate("Generate Testnet Credentials")} -+ {translate( + 'Connect to the XRP Ledger Testnet network to develop and test your apps built on the XRP Ledger, without risking real money or impacting production XRP Ledger users.' + )} +
+ + {translate('Generate Testnet Credentials')} + +