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}Ⓝ`
```
+
+
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": ""
- },
- {
- 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": ""
- },
- "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": ""
- },
- [
- "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": ""
- },
- [
- "concepts/basics/runtime",
- "concepts/advanced/specification",
- {
- "type": "link",
- "label": "Papers",
- "href": "https://near.org/papers"
- },
- ],
- {
- "type": "html",
- "value": "
"
- },
{
"type": "html",
"value": ""
@@ -126,6 +18,62 @@ const sidebar = {
"type": "html",
"value": "
"
},
+ {
+ "type": "html",
+ "value": ""
+ },
+ "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": ""
@@ -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": "",
- },
- ]
- },
- {
- "type": "html",
- "value": "
"
- },
- {
- "type": "html",
- "value": ""
- },
- "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": "",
- },
+ }
]
},
{
@@ -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": "",
+ "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": "",
- },
]
},
{
@@ -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 <>
+
+
+
+
+
+
+
{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 (
- <>
-
-
-
-
-
-
-
-
- >
- );
-}
diff --git a/website/src/theme/DocItem/Layout/index.js b/website/src/theme/DocItem/Layout/index.js
new file mode 100644
index 00000000000..243ba768d0c
--- /dev/null
+++ b/website/src/theme/DocItem/Layout/index.js
@@ -0,0 +1,64 @@
+import React from 'react';
+import clsx from 'clsx';
+import { useWindowSize } from '@docusaurus/theme-common';
+import { useDoc } from '@docusaurus/theme-common/internal';
+import DocItemPaginator from '@theme/DocItem/Paginator';
+import DocVersionBanner from '@theme/DocVersionBanner';
+import DocVersionBadge from '@theme/DocVersionBadge';
+import DocItemFooter from '@theme/DocItem/Footer';
+import DocItemTOCMobile from '@theme/DocItem/TOC/Mobile';
+import DocItemTOCDesktop from '@theme/DocItem/TOC/Desktop';
+import DocItemContent from '@theme/DocItem/Content';
+import DocBreadcrumbs from '@theme/DocBreadcrumbs';
+import Unlisted from '@theme/Unlisted';
+import styles from './styles.module.css';
+
+import { HelpComponent } from '../../../components/helpcomponent';
+import { FeedbackComponent } from '../../../components/FeedbackComponent';
+
+/**
+ * Decide if the toc should be rendered, on mobile or desktop viewports
+ */
+function useDocTOC() {
+ const { frontMatter, toc } = useDoc();
+ const windowSize = useWindowSize();
+ const hidden = frontMatter.hide_table_of_contents;
+ const canRender = !hidden && toc.length > 0;
+ const mobile = canRender ?
: undefined;
+ const desktop =
+ canRender && (windowSize === 'desktop' || windowSize === 'ssr') ? (
+
+ ) : undefined;
+ return {
+ hidden,
+ mobile,
+ desktop,
+ };
+}
+export default function DocItemLayout({ children }) {
+ const docTOC = useDocTOC();
+ const {
+ metadata: { unlisted },
+ } = useDoc();
+ return (
+
+
+ {unlisted &&
}
+
+
+
+
+
+ {docTOC.mobile}
+ {children}
+
+
+
+
+
+
+
+ {docTOC.desktop &&
{docTOC.desktop}
}
+
+ );
+}
diff --git a/website/src/theme/DocItem/Layout/styles.module.css b/website/src/theme/DocItem/Layout/styles.module.css
new file mode 100644
index 00000000000..d5aaec1322c
--- /dev/null
+++ b/website/src/theme/DocItem/Layout/styles.module.css
@@ -0,0 +1,10 @@
+.docItemContainer header + *,
+.docItemContainer article > *:first-child {
+ margin-top: 0;
+}
+
+@media (min-width: 997px) {
+ .docItemCol {
+ max-width: 75% !important;
+ }
+}
diff --git a/website/src/theme/Navbar/MobileSidebar/index.js b/website/src/theme/Navbar/MobileSidebar/index.js
deleted file mode 100644
index 1080ac63734..00000000000
--- a/website/src/theme/Navbar/MobileSidebar/index.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import React from 'react';
-import {
- useLockBodyScroll,
- useNavbarMobileSidebar,
-} from '@docusaurus/theme-common/internal';
-import NavbarMobileSidebarLayout from '@docusaurus/theme-classic/lib/theme/Navbar/MobileSidebar/Layout';
-import NavbarMobileSidebarHeader from '@docusaurus/theme-classic/lib/theme/Navbar/MobileSidebar/Header';
-import NavbarMobileSidebarPrimaryMenu from '@docusaurus/theme-classic/lib/theme/Navbar/MobileSidebar/PrimaryMenu';
-import NavbarMobileSidebarSecondaryMenu from '@docusaurus/theme-classic/lib/theme/Navbar/MobileSidebar/SecondaryMenu';
-
-export default function NavbarMobileSidebar() {
- const mobileSidebar = useNavbarMobileSidebar();
- useLockBodyScroll(mobileSidebar.shown);
-
- // @gagdiez: commented this to make sidebar always available
- // if (!mobileSidebar.shouldRender) {
- // return null;
- // }
-
- return (
-
}
- primaryMenu={
}
- secondaryMenu={
}
- />
- );
-}
diff --git a/website/src/theme/NavbarItem/DropdownNavbarItem/index.js b/website/src/theme/NavbarItem/DropdownNavbarItem/index.js
new file mode 100644
index 00000000000..2a2ac938686
--- /dev/null
+++ b/website/src/theme/NavbarItem/DropdownNavbarItem/index.js
@@ -0,0 +1,149 @@
+import React, {useState, useRef, useEffect} from 'react';
+import clsx from 'clsx';
+import {
+ isRegexpStringMatch,
+ useCollapsible,
+ Collapsible,
+} from '@docusaurus/theme-common';
+import {isSamePath, useLocalPathname} from '@docusaurus/theme-common/internal';
+import NavbarNavLink from '@theme/NavbarItem/NavbarNavLink';
+import NavbarItem from '@theme/NavbarItem';
+import styles from './styles.module.css';
+function isItemActive(item, localPathname) {
+ if (isSamePath(item.to, localPathname)) {
+ return true;
+ }
+ if (isRegexpStringMatch(item.activeBaseRegex, localPathname)) {
+ return true;
+ }
+ if (item.activeBasePath && localPathname.startsWith(item.activeBasePath)) {
+ return true;
+ }
+ return false;
+}
+function containsActiveItems(items, localPathname) {
+ return items.some((item) => isItemActive(item, localPathname));
+}
+function DropdownNavbarItemDesktop({
+ items,
+ position,
+ className,
+ onClick,
+ ...props
+}) {
+ const dropdownRef = useRef(null);
+ const [showDropdown, setShowDropdown] = useState(false);
+ useEffect(() => {
+ const handleClickOutside = (event) => {
+ if (!dropdownRef.current || dropdownRef.current.contains(event.target)) {
+ return;
+ }
+ setShowDropdown(false);
+ };
+ document.addEventListener('mousedown', handleClickOutside);
+ document.addEventListener('touchstart', handleClickOutside);
+ document.addEventListener('focusin', handleClickOutside);
+ return () => {
+ document.removeEventListener('mousedown', handleClickOutside);
+ document.removeEventListener('touchstart', handleClickOutside);
+ document.removeEventListener('focusin', handleClickOutside);
+ };
+ }, [dropdownRef]);
+
+ const active = containsActiveItems(items, useLocalPathname()) && 'navbar__link--active';
+
+ return (
+
+
tag focusable in case no link target
+ // See https://github.com/facebook/docusaurus/pull/6003
+ // There's probably a better solution though...
+ href={props.to ? undefined : '#'}
+ className={clsx(`navbar__link ${active}`, className)}
+ {...props}
+ onClick={props.to ? undefined : (e) => e.preventDefault()}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter') {
+ e.preventDefault();
+ setShowDropdown(!showDropdown);
+ }
+ }}>
+ {props.children ?? props.label}
+
+
+ {items.map((childItemProps, i) => (
+
+ ))}
+
+
+ );
+}
+function DropdownNavbarItemMobile({
+ items,
+ className,
+ position, // Need to destructure position from props so that it doesn't get passed on.
+ onClick,
+ ...props
+}) {
+ const localPathname = useLocalPathname();
+ const containsActive = containsActiveItems(items, localPathname);
+ const {collapsed, toggleCollapsed, setCollapsed} = useCollapsible({
+ initialState: () => !containsActive,
+ });
+ // Expand/collapse if any item active after a navigation
+ useEffect(() => {
+ if (containsActive) {
+ setCollapsed(!containsActive);
+ }
+ }, [localPathname, containsActive, setCollapsed]);
+ return (
+
+ {
+ e.preventDefault();
+ toggleCollapsed();
+ }}>
+ {props.children ?? props.label}
+
+
+ {items.map((childItemProps, i) => (
+
+ ))}
+
+
+ );
+}
+export default function DropdownNavbarItem({mobile = false, ...props}) {
+ const Comp = mobile ? DropdownNavbarItemMobile : DropdownNavbarItemDesktop;
+ return
;
+}
diff --git a/website/src/theme/NavbarItem/DropdownNavbarItem/styles.module.css b/website/src/theme/NavbarItem/DropdownNavbarItem/styles.module.css
new file mode 100644
index 00000000000..10ee92f520a
--- /dev/null
+++ b/website/src/theme/NavbarItem/DropdownNavbarItem/styles.module.css
@@ -0,0 +1,3 @@
+.dropdownNavbarItemMobile {
+ cursor: pointer;
+}
diff --git a/website/static/docs/assets/welcome-pages/chain-abstraction-landing.png b/website/static/docs/assets/welcome-pages/chain-abstraction-landing.png
index 850716db721..220d4f95b0f 100644
Binary files a/website/static/docs/assets/welcome-pages/chain-abstraction-landing.png and b/website/static/docs/assets/welcome-pages/chain-abstraction-landing.png differ
diff --git a/website/static/docs/assets/welcome-pages/contracts.png b/website/static/docs/assets/welcome-pages/contracts.png
index 0a72d6554ce..40f4f1090e4 100644
Binary files a/website/static/docs/assets/welcome-pages/contracts.png and b/website/static/docs/assets/welcome-pages/contracts.png differ
diff --git a/website/static/docs/assets/welcome-pages/data-lake-landing.png b/website/static/docs/assets/welcome-pages/data-lake-landing.png
new file mode 100644
index 00000000000..a3b415b0ffc
Binary files /dev/null and b/website/static/docs/assets/welcome-pages/data-lake-landing.png differ
diff --git a/website/static/docs/assets/welcome-pages/data-lake.png b/website/static/docs/assets/welcome-pages/data-lake.png
index 2cd80e7bdfa..055edca523c 100644
Binary files a/website/static/docs/assets/welcome-pages/data-lake.png and b/website/static/docs/assets/welcome-pages/data-lake.png differ
diff --git a/website/static/docs/assets/welcome-pages/drawing.svg b/website/static/docs/assets/welcome-pages/drawing.svg
index b6bc8ffaf00..3a29c7e2313 100644
--- a/website/static/docs/assets/welcome-pages/drawing.svg
+++ b/website/static/docs/assets/welcome-pages/drawing.svg
@@ -26,13 +26,13 @@
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
- inkscape:zoom="0.40417307"
- inkscape:cx="-811.53353"
- inkscape:cy="3515.8206"
- inkscape:window-width="1920"
- inkscape:window-height="1056"
+ inkscape:zoom="0.49102159"
+ inkscape:cx="-801.39043"
+ inkscape:cy="-1310.533"
+ inkscape:window-width="1352"
+ inkscape:window-height="725"
inkscape:window-x="0"
- inkscape:window-y="24"
+ inkscape:window-y="35"
inkscape:window-maximized="0"
inkscape:current-layer="layer1" />
+ inkscape:export-ydpi="391.1409" />
@@ -3218,100 +3381,101 @@
id="path60467" />
Limited Access Limited Access Keys KeysLimited Access Limited Access Keys KeysLimited Access Key
+ y="405.63644">Limited Access Key
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ hello!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/website/static/docs/assets/welcome-pages/examples-landing.png b/website/static/docs/assets/welcome-pages/examples-landing.png
new file mode 100644
index 00000000000..f56358a3030
Binary files /dev/null and b/website/static/docs/assets/welcome-pages/examples-landing.png differ
diff --git a/website/static/docs/assets/welcome-pages/examples.png b/website/static/docs/assets/welcome-pages/examples.png
index f05838acaaa..d507d9e48de 100644
Binary files a/website/static/docs/assets/welcome-pages/examples.png and b/website/static/docs/assets/welcome-pages/examples.png differ
diff --git a/website/static/docs/assets/welcome-pages/primitives-landing.png b/website/static/docs/assets/welcome-pages/primitives-landing.png
index eec448f7343..d69aacf6b19 100644
Binary files a/website/static/docs/assets/welcome-pages/primitives-landing.png and b/website/static/docs/assets/welcome-pages/primitives-landing.png differ
diff --git a/website/static/docs/assets/welcome-pages/primitives.png b/website/static/docs/assets/welcome-pages/primitives.png
new file mode 100644
index 00000000000..8edbf901d43
Binary files /dev/null and b/website/static/docs/assets/welcome-pages/primitives.png differ
diff --git a/website/static/img/near_logo.svg b/website/static/img/near_logo.svg
new file mode 100644
index 00000000000..c68a7dea0a5
--- /dev/null
+++ b/website/static/img/near_logo.svg
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/website/static/img/near_logo_white.svg b/website/static/img/near_logo_white.svg
new file mode 100644
index 00000000000..a2c2d42e258
--- /dev/null
+++ b/website/static/img/near_logo_white.svg
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+