From d88470ceb42e58154bca5d096d27de0acf3e8b7c Mon Sep 17 00:00:00 2001 From: Guille Date: Thu, 11 Jul 2024 21:33:58 +0200 Subject: [PATCH] Consolidating Docs into a single page (#2082) * wip: migrating concepts to build * wip * wip * re-organized into single page * fix: widget-editor components * fix: add back gas widget * change on welcome * change order of buttons * minor changes to figures * fix: swapped components by mistake * fix: minor css * fix: css navbar --------- Co-authored-by: Den --- docs/1.concepts/3.advanced/specification.md | 10 - docs/1.concepts/basics/protocol.md | 1 - docs/1.concepts/protocol/gas.md | 7 + docs/2.build/4.web3-apps/quickstart.md | 2 +- docs/2.build/5.primitives/what-is.md | 2 +- docs/2.build/welcome.md | 52 +- docs/index.md | 190 - docs/welcome.md | 146 + website/docusaurus.config.js | 52 +- website/sidebars.js | 297 +- website/src/components/FeedbackComponent.js | 30 +- website/src/components/cards.js | 45 + website/src/components/near-widget.js | 4 +- website/src/components/widget-editor.js | 2 +- website/src/css/custom.scss | 43 +- website/src/theme/DocItem/Footer/index.js | 19 - website/src/theme/DocItem/Layout/index.js | 64 + .../theme/DocItem/Layout/styles.module.css | 10 + .../src/theme/Navbar/MobileSidebar/index.js | 27 - .../NavbarItem/DropdownNavbarItem/index.js | 149 + .../DropdownNavbarItem/styles.module.css | 3 + .../chain-abstraction-landing.png | Bin 121648 -> 155565 bytes .../docs/assets/welcome-pages/contracts.png | Bin 135930 -> 186862 bytes .../welcome-pages/data-lake-landing.png | Bin 0 -> 36884 bytes .../docs/assets/welcome-pages/data-lake.png | Bin 35553 -> 43250 bytes .../docs/assets/welcome-pages/drawing.svg | 4906 +++++++++++------ .../assets/welcome-pages/examples-landing.png | Bin 0 -> 81812 bytes .../docs/assets/welcome-pages/examples.png | Bin 82628 -> 81361 bytes .../welcome-pages/primitives-landing.png | Bin 134774 -> 111843 bytes .../docs/assets/welcome-pages/primitives.png | Bin 0 -> 116071 bytes website/static/img/near_logo.svg | 10 + website/static/img/near_logo_white.svg | 58 + 32 files changed, 3826 insertions(+), 2303 deletions(-) delete mode 100644 docs/1.concepts/3.advanced/specification.md delete mode 100644 docs/index.md create mode 100644 docs/welcome.md create mode 100644 website/src/components/cards.js delete mode 100644 website/src/theme/DocItem/Footer/index.js create mode 100644 website/src/theme/DocItem/Layout/index.js create mode 100644 website/src/theme/DocItem/Layout/styles.module.css delete mode 100644 website/src/theme/Navbar/MobileSidebar/index.js create mode 100644 website/src/theme/NavbarItem/DropdownNavbarItem/index.js create mode 100644 website/src/theme/NavbarItem/DropdownNavbarItem/styles.module.css create mode 100644 website/static/docs/assets/welcome-pages/data-lake-landing.png create mode 100644 website/static/docs/assets/welcome-pages/examples-landing.png create mode 100644 website/static/docs/assets/welcome-pages/primitives.png create mode 100644 website/static/img/near_logo.svg create mode 100644 website/static/img/near_logo_white.svg diff --git a/docs/1.concepts/3.advanced/specification.md b/docs/1.concepts/3.advanced/specification.md deleted file mode 100644 index 962ab526891..00000000000 --- a/docs/1.concepts/3.advanced/specification.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: specification -title: NEAR Protocol Specification -sidebar_label: Specification ---- - -NEAR Protocol Specifications and Standards are tracked in two places: - -- NEAR Protocol Specification Documentation: [ [Nomicon.io](https://nomicon.io) ] -- NEAR Enhancement Proposals GitHub Repository: [ [NEAR NEPs](https://github.com/near/NEPs) ] diff --git a/docs/1.concepts/basics/protocol.md b/docs/1.concepts/basics/protocol.md index 1e0fb6913ed..cf400a6cb3c 100644 --- a/docs/1.concepts/basics/protocol.md +++ b/docs/1.concepts/basics/protocol.md @@ -1,7 +1,6 @@ --- id: protocol title: What is NEAR? -sidebar_label: ⭐ What is NEAR? --- NEAR is a **user-friendly** and [**carbon-neutral**](https://near.org/blog/near-climate-neutral-product/) blockchain, built to be [fast, secure, and able to grow without limits](https://www.leewayhertz.com/comparison-of-blockchain-protocols#Parallel-comparison-of-various-blockchain-networks). diff --git a/docs/1.concepts/protocol/gas.md b/docs/1.concepts/protocol/gas.md index 7548c4b0e02..a4215eb2f87 100644 --- a/docs/1.concepts/protocol/gas.md +++ b/docs/1.concepts/protocol/gas.md @@ -3,6 +3,8 @@ id: gas title: Gas (Execution Fees) --- +import {NearWidget} from "@site/src/components/near-widget" + On every transaction the NEAR network charges a tiny fee known as **gas**. This fee is a simple mechanism that allows us to: 1. **Prevent** bad actors from **spamming** the network with useless transactions @@ -49,6 +51,9 @@ If the previous block is **more than half full** the price goes up by 1%, otherw You can query how much a gas unit costs in `yoctoNEAR` (1Ⓝ = `1e24` yocto) through the [`RPC`](/api/rpc/gas#gas-price). To convert in `Tgas` per `NEAR` simply divide by `1e12`. + + + ```js const query = fetch('https://rpc.near.org', { method: 'POST', @@ -67,6 +72,8 @@ const yocto = query.body.result.gas_price return `Right now, 1 Tgas costs ${Number(yocto) / 1e12}Ⓝ` ``` + +
diff --git a/docs/2.build/4.web3-apps/quickstart.md b/docs/2.build/4.web3-apps/quickstart.md index 97ce7b4702b..13b8a02fc04 100644 --- a/docs/2.build/4.web3-apps/quickstart.md +++ b/docs/2.build/4.web3-apps/quickstart.md @@ -1,7 +1,7 @@ --- id: quickstart title: Hello WebApp -sidebar_label: ⭐ Quickstart a WebApp +sidebar_label: Quickstart ✨ --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; diff --git a/docs/2.build/5.primitives/what-is.md b/docs/2.build/5.primitives/what-is.md index 60b31d78b1c..b83cc598116 100644 --- a/docs/2.build/5.primitives/what-is.md +++ b/docs/2.build/5.primitives/what-is.md @@ -8,7 +8,7 @@ import {CodeTabs, Language, Github} from "@site/src/components/codetabs" Primitives are fundamental building blocks that can be combined to create a fully functional application. Blockchain primitives include [Fungible Tokens (FT)](#fungible-tokens-ft), [Non Fungible Tokens (NFT)](#non-fungible-tokens-nft), [Decentralized Autonomous organizations (DAO)](#decentralized-autonomous-organizations-dao), [Link Drops](#linkdrops) and more. -![img](/docs/assets/welcome-pages/primitives-landing.png) +![img](/docs/assets/welcome-pages/primitives.png) --- diff --git a/docs/2.build/welcome.md b/docs/2.build/welcome.md index 83fb733fd31..06abb8561fb 100644 --- a/docs/2.build/welcome.md +++ b/docs/2.build/welcome.md @@ -1,55 +1,11 @@ --- id: welcome -title: Build on NEAR +title: Welcome to NEAR sidebar_label: Home hide_table_of_contents: true -hide_breadcrumb: true +slug: / --- -import {FeatureList, Column, Feature} from "@site/src/components/featurelist" +import Home from '../welcome.md'; -Welcome! Here you will find all the information on what you can **build** on NEAR and **how to** build it. Do not worry if you are new to Web3 or Blockchain, we are here to **guide you** through the process of learning. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 692add21f1b..00000000000 --- a/docs/index.md +++ /dev/null @@ -1,190 +0,0 @@ ---- -id: welcome -title: NEAR - Your Gateway to an Open Web -hide_table_of_contents: true ---- -import {FeatureList, Column, Feature} from "@site/src/components/featurelist" - -Welcome, this is the starting point for all NEAR documentation. Learn to build and publish blockchain applications. Embrace the power of Web3. - -
-
- -
-
- Learn -
-
-

Understanding NEAR

- Learn what NEAR is and how it works -
-
-
-
-
- -
-
- Contracts -
-
-

Smart Contracts

- Learn to build smart contracts in NEAR -
-
-
-
-
- -
-
- Web3 Components -
-
-

Web3 Components

- The building blocks for multi-chain apps -
-
-
-
-
- -
-
- Solutions -
-
-

Web3 Applications

- Supercharge your App using NEAR -
-
-
-
-
- -
-
- Tools -
-
-

NEAR Tools

- Discover our SDK, API, CLI, and more -
-
-
-
-
- -
-
- Data Lake -
-
-

Query On-Chain Information

- Learn about indexers and our data lake -
-
-
-
-
- -
- -

Browse the Docs By Topic

- - - - - - - - - - - - - - - - - - - - - - - - - - - - ---- - -## External Resources - -Here are more sources from our ecosystem that can help you to learn more about NEAR. - -
-
- - -
-
- Discover -
-
-

- Discover -

- Discover awesome apps in the Near ecosystem. -
-
-
-
-
- -
-
- Nomicon -
-
-

- Nomicon -

- See how NEAR is implemented in the official protocol specification. -
-
-
-
-
- -
-
- Validate -
-
-

- Running a Node -

- Documentation on becoming a validator to help keeping the blockchain safe -
-
-
-
-
- -
-
- Templates -
-
-

Templates

- Templates for creating web3 applications -
-
-
-
-
diff --git a/docs/welcome.md b/docs/welcome.md new file mode 100644 index 00000000000..a5a6aac4e66 --- /dev/null +++ b/docs/welcome.md @@ -0,0 +1,146 @@ +--- +id: welcome +title: Welcome to NEAR +sidebar_label: Home +hide_table_of_contents: true +--- + +import {FeatureList, Column, Feature} from "@site/src/components/featurelist"; +import {Container, Card} from "@site/src/components/cards"; + +Imagine a place were you can build Web3 apps with the simplicity of Web2. Imagine a place were you can give data, empower communities, supercharge AI and easily integrate with other chains. Welcome to NEAR, you're gonna like it here. + + + + + + + + + + +--- + +## External Resources + +Here are more sources from our ecosystem that can help you to learn more about NEAR. + +
+
+ + +
+
+ Discover +
+
+

+ Discover +

+ Discover awesome apps in the Near ecosystem +
+
+
+
+
+ +
+
+ NEAR Core +
+
+

+ NEAR Core +

+ Learn the official protocol documentation +
+
+
+
+
+ +
+
+ Validate +
+
+

+ Running a Node +

+ Become a validator, help keeping the blockchain safe +
+
+
+
+
+ +
+
+ Templates +
+
+

+ Templates +

+ Templates for creating web3 applications +
+
+
+
+
diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 30ba0422e5c..8b86ea5badd 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -120,51 +120,40 @@ const config = { navbar: { logo: { alt: 'NEAR Logo', - src: 'img/docs_logo.svg', - srcDark: 'img/docs_logo_white.svg', + src: 'img/near_logo.svg', + srcDark: 'img/near_logo_white.svg', }, items: [ { - to: '/concepts/welcome', - label: 'Concepts', - position: 'left', - }, - { - to: '/build/welcome', - label: 'Build', + to: '/', + label: 'Docs', position: 'left', + activeBaseRegex: '(^/$)|(/build|concepts)', }, { to: '/tutorials/welcome', label: 'Tutorials', position: 'left', - }, - { - href: '/api/rpc/introduction', - label: 'RPC', - }, - { - type: 'html', - value: '', + activeBaseRegex: '/tutorials/', }, { type: 'dropdown', label: 'Tools', position: 'left', items: [ - { label: '🧰 All Tools', href: '/tools/welcome' }, + { label: '🧰 All Tools', to: '/tools/welcome'}, { type: 'html', value: '
Essentials ', }, - { label: 'NEAR API', href: '/tools/near-api-js/quick-reference' }, - { label: 'NEAR SDK', href: '/tools/sdk' }, - { label: 'NEAR CLI', href: '/tools/near-cli' }, + { label: 'NEAR API', to: '/tools/near-api-js/quick-reference' }, + { label: 'NEAR SDK', to: '/tools/sdk' }, + { label: 'NEAR CLI', to: '/tools/near-cli' }, { type: 'html', value: '
Wallet Integration ', }, - { label: 'Wallet Selector', href: '/tools/wallet-selector' }, + { label: 'Wallet Selector', to: '/tools/wallet-selector' }, { type: 'html', value: '
IDEs ', @@ -177,6 +166,10 @@ const config = { }, ], }, + { + type: 'html', + value: '', + }, { type: 'dropdown', label: 'Resources', @@ -216,7 +209,11 @@ const config = { value: '
Other Docs ', }, { - href: 'https://nomicon.io', + href: 'https://github.com/near/NEPs', + label: 'NEPs', + }, + { + href: 'https://near.github.io/nearcore/', label: 'Protocol Docs', }, { @@ -224,12 +221,17 @@ const config = { label: 'Validator Docs', }, { - href: '/integrations/exchange-integration', + to: '/integrations/exchange-integration', label: 'Exchange Integrations', }, ], }, - { label: 'Blog', href: '/blog' }, + { + to: '/api/rpc/introduction', + label: 'RPC', + activeBaseRegex: '/api/rpc', + }, + { label: 'Blog', to: '/blog', activeBaseRegex: '/blog' }, { type: 'localeDropdown', position: 'right', diff --git a/website/sidebars.js b/website/sidebars.js index 914cb4e8cab..2077886750e 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -1,113 +1,5 @@ const sidebar = { "concepts": [ - "concepts/welcome", - "concepts/basics/protocol", - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " The NEAR Protocol " - }, - { - type: 'category', - label: 'Accounts / Contracts', - link: { type: 'doc', id: 'concepts/protocol/account-model' }, - items: [ - "concepts/protocol/account-id", - "concepts/protocol/access-keys", - "concepts/protocol/smartcontract", - ] - }, - { - type: 'category', - label: 'Transactions', - link: { type: 'doc', id: 'concepts/protocol/transactions' }, - items: [ - "concepts/protocol/transaction-anatomy", - "concepts/protocol/gas", - "concepts/protocol/transaction-execution", - ] - }, - { - "Data Flow": [ - "concepts/data-flow/near-data-flow", - "concepts/data-flow/token-transfer-flow" - ] - }, - { - "Tokens": ["concepts/basics/tokens", "concepts/basics/token-loss"] - }, - { - "Storage": [ - "concepts/storage/storage-staking", - "concepts/storage/storage-solutions" - ] - }, - { - "Network": [ - "concepts/basics/validators", - "concepts/basics/networks", - "concepts/basics/epoch", - ] - }, - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " Chain Abstraction ✨" - }, - "concepts/abstraction/introduction", - "concepts/abstraction/meta-transactions", - "concepts/abstraction/relayers", - { - "Chain Signatures": [ - "concepts/abstraction/chain-signatures", - "concepts/abstraction/signatures/use-cases", - ] - }, - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " Blockchain Data & Indexing " - }, - [ - "concepts/data-flow/data-storage", - { - "Data Indexing": [ - "concepts/advanced/indexers", - "concepts/advanced/near-indexer-framework", - "concepts/advanced/near-lake-framework" - ] - } - ], - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " Advanced Topics " - }, - [ - "concepts/basics/runtime", - "concepts/advanced/specification", - { - "type": "link", - "label": "Papers", - "href": "https://near.org/papers" - }, - ], - { - "type": "html", - "value": "
" - }, { "type": "html", "value": " From Web 2 to Web 3 " @@ -126,6 +18,62 @@ const sidebar = { "type": "html", "value": "
" }, + { + "type": "html", + "value": " NEAR Protocol " + }, + "concepts/basics/protocol", + { + "Understand the Protocol": [ + { + type: 'category', + label: 'Accounts / Contracts', + link: { type: 'doc', id: 'concepts/protocol/account-model' }, + items: [ + "concepts/protocol/account-id", + "concepts/protocol/access-keys", + "concepts/protocol/smartcontract", + ] + }, + { + type: 'category', + label: 'Transactions', + link: { type: 'doc', id: 'concepts/protocol/transactions' }, + items: [ + "concepts/protocol/transaction-anatomy", + "concepts/protocol/gas", + "concepts/protocol/transaction-execution", + ] + }, + { + "Data Flow": [ + "concepts/data-flow/near-data-flow", + "concepts/data-flow/token-transfer-flow" + ] + }, + { + "Tokens": ["concepts/basics/tokens", "concepts/basics/token-loss"] + }, + { + "Storage": [ + "concepts/storage/storage-staking", + "concepts/storage/storage-solutions" + ] + }, + { + "Network": [ + "concepts/basics/validators", + "concepts/basics/networks", + "concepts/basics/epoch", + "concepts/basics/runtime", + ] + }, + ] + }, + { + "type": "html", + "value": "
" + }, { "type": "html", "value": " Chain Abstraction ✨ " @@ -133,11 +81,23 @@ const sidebar = { 'build/chain-abstraction/what-is', { "Chain Abstraction Services": [ - "build/chain-abstraction/meta-transactions", - 'build/chain-abstraction/fastauth-sdk', - 'build/chain-abstraction/chain-signatures', - 'build/chain-abstraction/wallet', - 'build/chain-abstraction/nft-chain-keys', + "concepts/abstraction/introduction", + { + "Meta Transactions": [ + "concepts/abstraction/meta-transactions", + "concepts/abstraction/relayers", + "build/chain-abstraction/meta-transactions", + ] + }, + { + "Chain Signatures": [ + "concepts/abstraction/chain-signatures", + "concepts/abstraction/signatures/use-cases", + 'build/chain-abstraction/chain-signatures', + 'build/chain-abstraction/nft-chain-keys', + ] + }, + // 'build/chain-abstraction/wallet', { "Multichain Gas Relayer": [ "build/chain-abstraction/multichain-gas-relayer/overview", @@ -146,6 +106,7 @@ const sidebar = { "build/chain-abstraction/multichain-gas-relayer/relayer-gas-example", ] }, + 'build/chain-abstraction/fastauth-sdk', "build/chain-abstraction/data-availability", ] }, @@ -176,11 +137,15 @@ const sidebar = { "type": "html", "value": "
" }, - "build/smart-contracts/anatomy/best-practices", - "build/smart-contracts/anatomy/serialization", - "build/smart-contracts/anatomy/serialization-protocols", - "build/smart-contracts/anatomy/reduce-size", - "build/smart-contracts/anatomy/reproducible-builds", + { + "Advanced": [ + "build/smart-contracts/anatomy/best-practices", + "build/smart-contracts/anatomy/serialization", + "build/smart-contracts/anatomy/serialization-protocols", + "build/smart-contracts/anatomy/reduce-size", + "build/smart-contracts/anatomy/reproducible-builds", + ] + } ] }, { @@ -224,49 +189,7 @@ const sidebar = { }, "build/smart-contracts/security/bounty" ] - }, - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " 📖 Tutorials ", - }, - ] - }, - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " Multi-Chain Components " - }, - "build/near-components/what-is", - { - "Building Web3 Components": [ - "build/near-components/dev-environment", - { - "Anatomy of a Component": [ - "build/near-components/anatomy/state", - "build/near-components/anatomy/web-methods", - "build/near-components/anatomy/builtin-components", - "build/near-components/anatomy/near", - "build/near-components/anatomy/social", - "build/near-components/anatomy/notifications", - "build/near-components/anatomy/bos-components" - ] - }, - "build/near-components/bos-gateway", - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " 📖 Tutorials ", - }, + } ] }, { @@ -281,23 +204,39 @@ const sidebar = { { "Building Web3 Applications": [ "build/web3-apps/quickstart", - "build/web3-apps/frontend", - "build/web3-apps/integrate-contracts", - "build/web3-apps/integrate-components", { - "Backend": [ - "build/web3-apps/backend/backend-login", + type: 'category', + label: 'Frontends', + link: { type: 'doc', id: 'build/web3-apps/frontend' }, + items: [ + "build/web3-apps/integrate-contracts", + { + "Social Components (BOS)": [ + "build/near-components/what-is", + "build/near-components/dev-environment", + { + "Anatomy of a Component": [ + "build/near-components/anatomy/state", + "build/near-components/anatomy/web-methods", + "build/near-components/anatomy/builtin-components", + "build/near-components/anatomy/near", + "build/near-components/anatomy/social", + "build/near-components/anatomy/notifications", + "build/near-components/anatomy/bos-components" + ] + }, + "build/near-components/bos-gateway", + "build/web3-apps/integrate-components", + ] + } ] }, { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " 📖 Tutorials ", + "Backend": [ + "build/web3-apps/backend/backend-login", + ] }, - ], + ] }, { "type": "html", @@ -316,14 +255,6 @@ const sidebar = { "build/primitives/oracles", "build/primitives/dao", "build/primitives/dex", - { - "type": "html", - "value": "
" - }, - { - "type": "html", - "value": " 📖 Tutorials ", - }, ] }, { @@ -337,6 +268,7 @@ const sidebar = { "build/data-infrastructure/what-is", { "NEAR Data Infrastructure": [ + "concepts/data-flow/data-storage", "build/data-infrastructure/big-query", { "QueryAPI": [ @@ -352,6 +284,7 @@ const sidebar = { }, { "Lake Framework": [ + "concepts/advanced/near-lake-framework", "build/data-infrastructure/lake-framework/near-lake", "build/data-infrastructure/lake-framework/near-lake-state-changes-indexer", "build/data-infrastructure/lake-framework/migrating-to-near-lake-framework", @@ -504,7 +437,7 @@ const sidebar = { "tutorials/nfts/minting", "tutorials/nfts/upgrade-contract", "tutorials/nfts/enumeration", - "tutorials/nfts/core", ] + "tutorials/nfts/core",] }, "tutorials/nfts/events", { diff --git a/website/src/components/FeedbackComponent.js b/website/src/components/FeedbackComponent.js index 3c8ad77f43c..e1db77b753e 100644 --- a/website/src/components/FeedbackComponent.js +++ b/website/src/components/FeedbackComponent.js @@ -24,20 +24,22 @@ export function FeedbackComponent() { const [choice, setChoice] = useState(); return ( -
- {!choice - ? - : - } +
+
+ {!choice + ? + : + } +
); } diff --git a/website/src/components/cards.js b/website/src/components/cards.js new file mode 100644 index 00000000000..903aedfcc45 --- /dev/null +++ b/website/src/components/cards.js @@ -0,0 +1,45 @@ +import styled from 'styled-components'; + +const List = styled.div` +` + +const Element = styled.div` + margin: .8rem 0; + border-bottom: 1px solid var(--bs-border-color-translucent); + + &::last-child{ + border-bottom: none; + } +` + +const Text = styled.p` + font-size: small; + bottom-padding: .5rem; +` + +export function Container({children}){ + return
{children}
+} + +export function Card({ img, text, title, links }) { + return <> +
+
+
+ Learn +
+
+

{title}

+ {text} + + {Object.keys(links).map( + label => {label} + )} + +
+
+
+ +} + +export default { Card }; \ No newline at end of file diff --git a/website/src/components/near-widget.js b/website/src/components/near-widget.js index e101c0cae4f..c69bbbbf1dc 100644 --- a/website/src/components/near-widget.js +++ b/website/src/components/near-widget.js @@ -19,8 +19,8 @@ export function NearWidget({ children, id = 1, height = "160px", networkId = 'te const { initNear } = useInitNear(); useEffect(() => { - initNear && initNear({ networkId, selector: new Promise(() => {}) }); - }, [initNear, selector]); + initNear && initNear({ networkId, selector: new Promise(() => { }) }); + }, [initNear]); return <>
diff --git a/website/src/components/widget-editor.js b/website/src/components/widget-editor.js index 54ba52393a4..f7682d3a2a6 100644 --- a/website/src/components/widget-editor.js +++ b/website/src/components/widget-editor.js @@ -20,7 +20,7 @@ export function WidgetEditor({ children, id = 1, networkId = "testnet", height = const { initNear } = useInitNear(); useEffect(() => { - initNear && initNear({ networkId, selector: new Promise(() => {}) }); + initNear && initNear({ networkId, selector: new Promise(() => { }) }); }, [initNear]); return
diff --git a/website/src/css/custom.scss b/website/src/css/custom.scss index c6724d850db..0bd7a8363a9 100644 --- a/website/src/css/custom.scss +++ b/website/src/css/custom.scss @@ -81,8 +81,6 @@ strong { /* Cards */ .card { margin: 2em 0em; - border: 0; - border-radius: 0; } .cards a[href^="http"]::after { @@ -104,7 +102,7 @@ a:hover { .card__image { overflow: hidden; border: 0; - max-height: 215px; + max-height: 168px; } .card__image img { @@ -181,6 +179,13 @@ table+p em, border: 1px #999 solid; } +.navbar .subtitle { + padding: 0.25rem 0.5rem; + font-size: 0.75rem; + font-weight: 600; + color: #999; +} + /* fonts and headers */ h1, h2, @@ -222,7 +227,7 @@ h4 { } article { - margin: 1.8rem 1.4rem 1.8rem 3rem; + margin: 2rem 1.5rem 2rem 3rem; } .menu { @@ -358,40 +363,10 @@ iframe+em { background: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='white' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E") no-repeat; } -// Navbar collapse before -@media (max-width: 1140px) { - - .navbar>.container, - .navbar>.container-fluid { - padding: 0 - } - - .navbar__toggle { - display: inherit - } - - .navbar__item { - display: none - } - - .navbar__search-input { - width: 9rem - } - - .navbar .separator { - display: none; - } -} - @media (max-width: 1140px) { article { margin: 0.5rem 1.5rem; } - - .col { - flex-basis: max-content !important; - padding: 0 calc(var(--ifm-spacing-horizontal)/2); - } } /* BOOTSTRAP */ diff --git a/website/src/theme/DocItem/Footer/index.js b/website/src/theme/DocItem/Footer/index.js deleted file mode 100644 index a7d2852a395..00000000000 --- a/website/src/theme/DocItem/Footer/index.js +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import Footer from '@theme-original/DocItem/Footer'; -import {FeedbackComponent} from "../../../components/FeedbackComponent"; -import {HelpComponent} from "../../../components/helpcomponent"; - -export default function FooterWrapper(props) { - return ( - <> -