diff --git a/app/[locale]/what-is-ethereum/page.tsx b/app/[locale]/what-is-ethereum/page.tsx index eaeb86ae16b..e93b002c0b1 100644 --- a/app/[locale]/what-is-ethereum/page.tsx +++ b/app/[locale]/what-is-ethereum/page.tsx @@ -1,168 +1,110 @@ -import { pick } from "lodash" -import { Info } from "lucide-react" import { - getMessages, - getTranslations, - setRequestLocale, -} from "next-intl/server" + ArrowRight, + Castle, + Landmark, + LockKeyhole, + Shield, + SquareCode, + User, +} from "lucide-react" +import { getLocale, getTranslations } from "next-intl/server" -import type { ChildOnlyProp, CommitHistory, Lang } from "@/lib/types" +import type { CommitHistory, Lang, ToCItem } from "@/lib/types" -import AdoptionChart from "@/components/AdoptionChart/server" -import { - Banner, - BannerBody, - BannerGrid, - BannerGridCell, - BannerImage, -} from "@/components/BannerGrid" -import Callout from "@/components/Callout" -import Card from "@/components/Card" -import EnergyConsumptionChart from "@/components/EnergyConsumptionChart/server" +import DocLink from "@/components/DocLink" import FeedbackCard from "@/components/FeedbackCard" import FileContributors from "@/components/FileContributors" -import I18nProvider from "@/components/I18nProvider" -import { Image, ImageProps } from "@/components/Image" +import ContentHero, { ContentHeroProps } from "@/components/Hero/ContentHero" +import { Image } from "@/components/Image" +import { Emphasis, Strong } from "@/components/IntlStringElements" import ListenToPlayer from "@/components/ListenToPlayer/server" import MainArticle from "@/components/MainArticle" -import { StandaloneQuizWidget } from "@/components/Quiz/QuizWidget" -import StatErrorMessage from "@/components/StatErrorMessage" -import Tooltip from "@/components/Tooltip" -import Translation from "@/components/Translation" -import { Button } from "@/components/ui/buttons/Button" +import TableOfContents from "@/components/TableOfContents" import { ButtonLink } from "@/components/ui/buttons/Button" -import { Center, Flex, HStack, Stack } from "@/components/ui/flex" -import InlineLink from "@/components/ui/Link" +import { Card, CardContent, CardTitle } from "@/components/ui/card" +import Link, { LinkProps } from "@/components/ui/Link" +import { ListItem, OrderedList, UnorderedList } from "@/components/ui/list" +import { Section } from "@/components/ui/section" import { cn } from "@/lib/utils/cn" import { getAppPageContributorInfo } from "@/lib/utils/contributors" -import { dataLoader } from "@/lib/utils/data/dataLoader" +import { getDirection } from "@/lib/utils/direction" import { getMetadata } from "@/lib/utils/metadata" -import { - getLocaleForNumberFormat, - getRequiredNamespacesForPage, -} from "@/lib/utils/translations" - -import WhatTabs from "./_components/WhatTabs/lazy" -import WhySwiper from "./_components/WhySwiper/lazy" - -import { fetchGrowThePie } from "@/lib/api/fetchGrowThePie" -import dogeComputerImg from "@/public/images/doge-computer.png" -import ethImg from "@/public/images/eth.png" -import diffEthAndBtc from "@/public/images/eth.png" -import criminalActivity from "@/public/images/finance_transparent.png" -import ethCoin from "@/public/images/impact_transparent.png" -import whatAreSmartContracts from "@/public/images/infrastructure_transparent.png" -import whoRunsEthereum from "@/public/images/run-a-node/ethereum-inside.png" -import stats from "@/public/images/upgrades/newrings.png" -import hero from "@/public/images/what-is-ethereum.png" - -const Summary = ({ +import { screens } from "@/lib/utils/screen" + +import contributionBanner from "@/public/images/doge-computer.png" +import whatBanner from "@/public/images/eth.png" +import howBanner from "@/public/images/hackathon_transparent.png" +import startBanner from "@/public/images/heroes/guides-hub-hero.jpg" +import networksBanner from "@/public/images/heroes/learn-hub-hero.png" +import etherBanner from "@/public/images/impact_transparent.png" +import whenWhoBanner from "@/public/images/translatathon/walking.png" +import heroImg from "@/public/images/what-is-ethereum.png" + +const IconBox = ({ className, - ...rest + ...props }: React.HTMLAttributes) => (
) -const TwoColumnContent = ({ +const HighlightStack = ({ className, - ...rest + ...props }: React.HTMLAttributes) => ( - div:first-child]:pt-0 [&>div:last-child]:pb-0 [&>div]:py-8", className )} - {...rest} + {...props} /> ) -const Section = ({ +const HighlightCard = ({ className, - ...rest + ...props }: React.HTMLAttributes) => ( -
-) - -const Width60 = ({ - className, - children, -}: React.HTMLAttributes) => ( -
{children}
-) - -const Width40 = (props: ChildOnlyProp) => ( -
-) - -const H2 = ({ className, ...rest }: React.HTMLAttributes) => ( -

) -const CardContainer = ({ - className, - ...rest -}: React.HTMLAttributes) => ( - -) - -const Column = (props: ChildOnlyProp) => ( -
-) - -const StatPrimary = (props: ChildOnlyProp) => ( -
-) - -const StatDescription = (props: ChildOnlyProp) => ( -
-) - -const ButtonRow = ({ +const HighlightCardContent = ({ className, - ...rest + ...props }: React.HTMLAttributes) => ( - +
) -const NoWrapText = (props: ChildOnlyProp) => ( - -) - -const Image400 = ({ src }: Pick) => ( - -) - -const loadData = dataLoader([["growThePieData", fetchGrowThePie]]) +const LinkWithArrow = async ({ href, className, children }: LinkProps) => { + const locale = await getLocale() + const { twFlipForRtl } = getDirection(locale as Lang) + return ( + + +   + {children} + + ) +} const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => { const { locale } = await params - const localeForNumberFormat = getLocaleForNumberFormat(locale as Lang) - const t = await getTranslations({ locale, namespace: "page-what-is-ethereum", }) - const tCommon = await getTranslations({ - locale, - namespace: "common", - }) - setRequestLocale(locale) - - // Get i18n messages - const allMessages = await getMessages({ locale }) - const requiredNamespaces = getRequiredNamespacesForPage("/what-is-ethereum") - const messages = pick(allMessages, requiredNamespaces) const commitHistoryCache: CommitHistory = {} const { contributors, lastEditLocaleTimestamp } = @@ -172,578 +114,999 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => { commitHistoryCache ) - // Load data - const [loadedData] = await loadData() - const data = loadedData.txCount - - const formatNumber = ( - value: number, - minSignificantDigits: number, - maxSignificantDigits: number, - style?: Intl.NumberFormatOptions["style"], - currency?: string - ) => - new Intl.NumberFormat(localeForNumberFormat, { - notation: "compact", - minimumSignificantDigits: minSignificantDigits, - maximumSignificantDigits: maxSignificantDigits, - style: style, - currency: currency, - currencyDisplay: "narrowSymbol", - }).format(value) - - const txStat = "error" in data ? "" : formatNumber(data.value, 3, 4) - - const cards = [ - { - emoji: ":bank:", - title: t("page-what-is-ethereum-banking-card"), - description: t("page-what-is-ethereum-banking-card-desc"), - }, - - { - emoji: ":detective:", - title: t("page-what-is-ethereum-internet-card"), - description: t("page-what-is-ethereum-internet-card-desc"), - }, - { - emoji: ":busts_in_silhouette:", - title: t("page-what-is-ethereum-p2p-card"), - description: t("page-what-is-ethereum-p2p-card-desc"), - }, - { - emoji: ":shield:", - title: t("page-what-is-ethereum-censorless-card"), - description: t("page-what-is-ethereum-censorless-card-desc"), - }, + const tocItems: ToCItem[] = [ + { title: t("page-what-is-ethereum-toc-ethereum"), url: "#ethereum" }, + { title: t("page-what-is-ethereum-toc-network"), url: "#network" }, + { title: t("page-what-is-ethereum-toc-ether"), url: "#ether" }, + { title: t("page-what-is-ethereum-toc-how"), url: "#how" }, + { title: t("page-what-is-ethereum-toc-what"), url: "#what" }, + { title: t("page-what-is-ethereum-toc-start"), url: "#start" }, { - emoji: ":shopping_bags:", - title: t("page-what-is-ethereum-commerce-card"), - description: t("page-what-is-ethereum-commerce-card-desc"), + title: t("page-what-is-ethereum-toc-bitcoin"), + url: "#bitcoin", }, { - emoji: ":handshake:", - title: t("page-what-is-ethereum-composable-card"), - description: t("page-what-is-ethereum-composable-card-desc"), + title: t("page-what-is-ethereum-toc-when-who"), + url: "#when-who", }, + { title: t("page-what-is-ethereum-toc-roadmap"), url: "#roadmap" }, ] - const tooltipContent = ({ apiUrl, apiProvider, ariaLabel }) => ( -
- {tCommon("data-provided-by")}{" "} - - {apiProvider} - -
- ) + const heroProps: ContentHeroProps = { + breadcrumbs: { slug: "learn/what-is-ethereum", startDepth: 1 }, + heroImg, + title: tocItems[0].title, + description: ( + <> +

{t("page-what-is-ethereum-hero-description-1")}

+

{t("page-what-is-ethereum-hero-description-2")}

+ + ), + } + const getId = (input: string) => { + const parts = input.split("#") + return parts.length > 1 ? parts[1] : "" + } return ( - - - - -
-

- {t("page-what-is-ethereum-title")} -

- -

- {t("page-what-is-ethereum-desc")} -

-

- {t("page-what-is-ethereum-subtitle")} -

- - - -
-
-
-
+
+ + + +
+ + + +
+ +
+ + +
+ +
+
+

+ {t.rich("page-what-is-ethereum-ethereum-intro-1", { + strong: Strong, + })} +

+

+ {t.rich("page-what-is-ethereum-ethereum-intro-2", { + a: (chunks) => {chunks}, + })} +

+

+ {t.rich("page-what-is-ethereum-ethereum-intro-3", { + strong: Strong, + })} +

+

+ {t.rich("page-what-is-ethereum-ethereum-intro-4", { + strong: Strong, + })} +

+

+ {t.rich("page-what-is-ethereum-ethereum-intro-5", { + strong: Strong, + })} +

+

+ {t.rich("page-what-is-ethereum-ethereum-intro-6", { + millions: (chunks) => ( + + {chunks} + + ), + billions: (chunks) => ( + + {chunks} + + ), + trillions: (chunks) => ( + + {chunks} + + ), + })} +

+

+ {t.rich("page-what-is-ethereum-ethereum-intro-7", { + strong: Strong, + })} +

+
+ +
{t("page-what-is-ethereum-alt-img-bazaar")} -
- -
-
-
- +
+

+ {tocItems[1].title} +

+ +

+ {t.rich("page-what-is-ethereum-network-intro-1", { + strong: Strong, + })} +

+ +

+ {t.rich("page-what-is-ethereum-network-intro-2", { + strong: Strong, + })} +

+ +

+ {t.rich("page-what-is-ethereum-network-intro-3", { + strong: Strong, + })} +

- - - - - -

- {t("page-what-is-ethereum-summary-title")} -

- -

{t("page-what-is-ethereum-summary-desc-1")}

-

{t("page-what-is-ethereum-summary-desc-2")}

-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
-
-
-
- -
- + + + + + +
-

{t("page-what-is-ethereum-what-can-eth-do-title")}

- - {cards.map((card, idx) => ( - - ))} - + + {t("page-what-is-ethereum-network-censorship-title")} + + +

+ {t("page-what-is-ethereum-network-censorship-desc-1")} +

+

+ {t("page-what-is-ethereum-network-censorship-desc-2")} +

+
+
+ + + + +
+ + {t("page-what-is-ethereum-network-security-title")} + + +

{t("page-what-is-ethereum-network-security-desc-1")}

+

{t("page-what-is-ethereum-network-security-desc-2")}

+
+
+
+ + + + +
+ + {t("page-what-is-ethereum-network-reliability-title")} + + +

+ {t.rich( + "page-what-is-ethereum-network-reliability-desc-1", + { + a: (chunks) => {chunks}, + } + )} +

+

+ {t("page-what-is-ethereum-network-reliability-desc-2")} +

+
+
+
+
+ +
+

+ {t("page-what-is-ethereum-network-layer2-title")} +

- - - - - - - - +
+

{t("page-what-is-ethereum-network-layer2-desc-1")}

+ +

+ {t.rich("page-what-is-ethereum-network-layer2-desc-2", { + optimism: (chunks) => ( + {chunks} + ), + arbitrum: (chunks) => ( + {chunks} + ), + zksync: (chunks) => ( + {chunks} + ), + base: (chunks) => ( + {chunks} + ), + })} +

+
+
+ + + {t("page-what-is-ethereum-network-learn-more")} +
-
- - -

- {t("page-what-is-ethereum-why-would-i-use-ethereum-title")} -

- -

{t("page-what-is-ethereum-why-would-i-use-ethereum-1")}

-

{t("page-what-is-ethereum-why-would-i-use-ethereum-2")}

- -
- -
-
-
- - - -
+
+
+ {t("page-what-is-ethereum-banner-ether-alt")} +

+ {tocItems[2].title} +

+
+ +
+

{t("page-what-is-ethereum-ether-intro-1")}

+

+ {t.rich("page-what-is-ethereum-ether-intro-2", { + strong: Strong, + })} +

+

+ {t.rich("page-what-is-ethereum-ether-intro-3", { + strong: Strong, + })} +

+

+ {t.rich("page-what-is-ethereum-ether-intro-4", { + strong: Strong, + })} +

+

+ {t.rich("page-what-is-ethereum-ether-intro-5", { + strong: Strong, + })} +

+

{t("page-what-is-ethereum-ether-intro-6")}

+
+ + + {t("page-what-is-ethereum-ether-learn-more")} +
-
- - -

{t("page-what-is-ethereum-ethereum-in-numbers-title")}

- - - {formatNumber(4000, 1, 1)}+ - - {t( - "page-what-is-ethereum-ethereum-in-numbers-stat-1-desc" - )} - -   - - - - - - - - - - {formatNumber(96_000_000, 2, 2)}+ - - {t( - "page-what-is-ethereum-ethereum-in-numbers-stat-2-desc" - )} - -   - - - - - - - - - - {formatNumber(53_300_000, 3, 3)}+ - - {t( - "page-what-is-ethereum-ethereum-in-numbers-stat-3-desc" - )} - -   - - - - - - - - - - - {formatNumber(410_000_000_000, 3, 3, "currency", "USD")} - - - {t( - "page-what-is-ethereum-ethereum-in-numbers-stat-4-desc" - )} - -   - - - - - - - - - - - {formatNumber(3_500_000_000, 2, 2, "currency", "USD")} - - - {t( - "page-what-is-ethereum-ethereum-in-numbers-stat-5-desc" - )} - -   - - - - - - - - - - - {txStat || } - - {/* TODO: Extract strings for translation */} - - {t( - "page-what-is-ethereum-ethereum-in-numbers-stat-6-desc" +
+
+ {t("page-what-is-ethereum-banner-how-alt")} +

+ {tocItems[3].title} +

+
+ +
+

+ {t.rich("page-what-is-ethereum-how-intro-1", { + strong: Strong, + })} +

+

{t("page-what-is-ethereum-how-intro-2")}

+

+ {t.rich("page-what-is-ethereum-how-intro-3", { + strong: Strong, + a: (chunks) => ( + {chunks} + ), + })} +

+

{t("page-what-is-ethereum-how-intro-4")}

+

{t("page-what-is-ethereum-how-intro-5")}

+

+ {t("page-what-is-ethereum-how-example-1-title")} +

+ + + {t("page-what-is-ethereum-how-example-1-step-1")} + + + {t("page-what-is-ethereum-how-example-1-step-2")} + + + {t("page-what-is-ethereum-how-example-1-step-3")} + + + {t("page-what-is-ethereum-how-example-1-step-4")} + + + {t("page-what-is-ethereum-how-example-1-step-5")} + + + {t("page-what-is-ethereum-how-example-1-step-6")} + + +

+ {t("page-what-is-ethereum-how-example-2-title")} +

+ + + {t("page-what-is-ethereum-how-example-2-step-1")} + + + {t("page-what-is-ethereum-how-example-2-step-2")} + + + {t("page-what-is-ethereum-how-example-2-step-3")} + + + {t("page-what-is-ethereum-how-example-2-step-4")} + + + {t("page-what-is-ethereum-how-example-2-step-5")} + + +

{t("page-what-is-ethereum-how-outro-1")}

+

+ {t.rich("page-what-is-ethereum-how-outro-2", { + strong: Strong, + })} +

+
+ + {t("page-what-is-ethereum-how-learn-more-1")} + + + {t("page-what-is-ethereum-how-learn-more-2")} + +
+
+
+ +
+ {t("page-what-is-ethereum-banner-what-alt")} +

+ {tocItems[4].title} +

+
+

{t("page-what-is-ethereum-what-intro-1")}

+

+ {t.rich("page-what-is-ethereum-what-intro-2", { + strong: Strong, + insurance: (chunks) => ( + + {chunks} + + ), + payment: (chunks) => ( + + {chunks} + + ), + aid: (chunks) => ( + + {chunks} + + ), + })} +

+

{t("page-what-is-ethereum-what-intro-3")}

+

{t("page-what-is-ethereum-what-intro-4")}

+
+ + + + + +
+ + {t("page-what-is-ethereum-what-consumers-title")} + + +

{t("page-what-is-ethereum-what-consumers-desc-1")}

+

{t("page-what-is-ethereum-what-consumers-desc-2")}

+ + + {t.rich( + "page-what-is-ethereum-what-consumers-benefit-1", + { + strong: Strong, + } + )} + + + {t.rich( + "page-what-is-ethereum-what-consumers-benefit-2", + { + strong: Strong, + } + )} + + + {t.rich( + "page-what-is-ethereum-what-consumers-benefit-3", + { + strong: Strong, + } + )} + + + {t("page-what-is-ethereum-what-consumers-benefit-4")} + + +
+
+
+ + + + +
+ + {t("page-what-is-ethereum-what-businesses-title")} + + + + + {t("page-what-is-ethereum-what-businesses-benefit-1")} + + + {t.rich( + "page-what-is-ethereum-what-businesses-benefit-2", + { + strong: Strong, + } + )} + + + {t("page-what-is-ethereum-what-businesses-benefit-3")} + + +

+ {t.rich("page-what-is-ethereum-what-businesses-example", { + a: (chunks) => ( + + {chunks} + + ), + })} +

+
+
+
+ + + + +
+ + {t("page-what-is-ethereum-what-governments-title")} + + +

{t("page-what-is-ethereum-what-governments-intro")}

+ + + {t.rich( + "page-what-is-ethereum-what-governments-benefit-1", + { + strong: Strong, + } + )} + + + {t.rich( + "page-what-is-ethereum-what-governments-benefit-2", + { + strong: Strong, + } + )} + + + {t.rich( + "page-what-is-ethereum-what-governments-benefit-3", + { + strong: Strong, + } + )} + + +

+ {t.rich( + "page-what-is-ethereum-what-governments-example-1", + { + a: (chunks) => ( + + {chunks} + + ), + } )} - -   - - - - - - - - - - - - - - +

+

+ {t("page-what-is-ethereum-what-governments-example-2")} +

+
+
+
+
+ + {/* // TODO: Re-enable when page ready */} + {/* + {t("page-what-is-ethereum-what-learn-more")} + */}
-
- - - - - -

{t("page-what-is-ethereum-who-runs-ethereum-title")}

- +
+ {t("page-what-is-ethereum-banner-start-alt")} +
+

+ {tocItems[5].title} +

+
+

{t("page-what-is-ethereum-start-intro-1")}

+

{t("page-what-is-ethereum-start-intro-2")}

+
+
+ + + + +

+ {t("page-what-is-ethereum-start-individuals-title")} +

+
+ +

- + + {t("page-what-is-ethereum-start-individuals-desc-1")} +

+

- + {t.rich("page-what-is-ethereum-start-individuals-desc-3", { + zerion: (chunks) => ( + {chunks} + ), + rainbow: (chunks) => ( + {chunks} + ), + coinbase: (chunks) => ( + + {chunks} + + ), + })}

- - - {t("page-what-is-ethereum-run-a-node")} - - - - - -
-
- - - - - -

{t("page-what-is-ethereum-smart-contract-title")}

- + + + {t("page-what-is-ethereum-start-individuals-step-1")} + + + {t("page-what-is-ethereum-start-individuals-step-2")} + + + {t.rich( + "page-what-is-ethereum-start-individuals-step-3", + { + zora: (chunks) => ( + {chunks} + ), + uniswap: (chunks) => ( + + {chunks} + + ), + farcaster: (chunks) => ( + {chunks} + ), + } + )} + + + +

{t("page-what-is-ethereum-start-individuals-desc-4")}

+

{t("page-what-is-ethereum-start-individuals-desc-5")}

+
+ +
+ + {t("page-what-is-ethereum-start-individuals-cta-1")} + + + {t("page-what-is-ethereum-start-individuals-cta-2")} + +
+ + + + + + +

+ {t("page-what-is-ethereum-start-developers-title")} +

+
+ +
+

{t("page-what-is-ethereum-start-developers-desc-1")}

+

+ {t.rich("page-what-is-ethereum-start-developers-desc-2", { + a: (chunks) => ( + {chunks} + ), + })} +

- + {t.rich("page-what-is-ethereum-start-developers-desc-3", { + hardhat: (chunks) => ( + {chunks} + ), + foundry: (chunks) => ( + {chunks} + ), + ethers: (chunks) => ( + {chunks} + ), + thirdweb: (chunks) => ( + {chunks} + ), + moralis: (chunks) => ( + {chunks} + ), + })}

+

{t("page-what-is-ethereum-start-developers-desc-4")}

+
+ + {t("page-what-is-ethereum-start-developers-cta")} + +
+
+ + + + +

+ {t("page-what-is-ethereum-start-business-title")} +

+
+ +
+

{t("page-what-is-ethereum-start-business-desc-1")}

+

{t("page-what-is-ethereum-start-business-desc-2")}

- + {t("page-what-is-ethereum-start-business-desc-3")} + + + {t("page-what-is-ethereum-start-business-benefit-1")} + + + {t("page-what-is-ethereum-start-business-benefit-2")} + + + {t("page-what-is-ethereum-start-business-benefit-3")} + +

- + {t.rich("page-what-is-ethereum-start-business-example", { + a: (chunks) => ( + + {chunks} + + ), + })}

- - - {t("page-what-is-ethereum-more-on-smart-contracts")} - - - {t("page-what-is-ethereum-explore-dapps")} - - - - - +
+ + {t("page-what-is-ethereum-start-business-cta")} + +
+

-
- - - - - -

{t("page-what-is-ethereum-meet-ether-title")}

- -

{t("page-what-is-ethereum-meet-ether-desc-1")}

-

{t("page-what-is-ethereum-meet-ether-desc-2")}

- - - {t("page-what-is-ethereum-what-is-ether")} - - - {t("page-what-is-ethereum-get-eth")} - - -
-
-
-
+
+

+ {tocItems[6].title} +

+ +
+

{t("page-what-is-ethereum-bitcoin-intro-1")}

+ +

+ {t.rich("page-what-is-ethereum-bitcoin-intro-2", { + strong: Strong, + })} +

+ +
+

+ {t("page-what-is-ethereum-bitcoin-comparison-1-title")} +

+

{t("page-what-is-ethereum-bitcoin-comparison-1-desc")}

+
+ +
+

+ {t("page-what-is-ethereum-bitcoin-comparison-2-title")} +

+

{t("page-what-is-ethereum-bitcoin-comparison-2-desc")}

+
-
- - - - - -

{t("page-what-is-ethereum-energy-title")}

- +
+

+ {t("page-what-is-ethereum-bitcoin-comparison-3-title")} +

+

- + {t("page-what-is-ethereum-bitcoin-comparison-3-desc-1")}

- + {t("page-what-is-ethereum-bitcoin-comparison-3-desc-2")}

- - - {t("page-what-is-ethereum-more-on-energy-consumption")} - - - {t("page-what-is-ethereum-the-merge-update")} - - - - - -
+
+
-
- - - - - -

{t("page-what-is-ethereum-criminal-activity-title")}

- -

{t("page-what-is-ethereum-criminal-activity-desc-1")}

-

{t("page-what-is-ethereum-criminal-activity-desc-2")}

+
+

+ {t("page-what-is-ethereum-bitcoin-comparison-4-title")} +

+
+

+ {t.rich( + "page-what-is-ethereum-bitcoin-comparison-4-desc-1", + { strong: Strong } + )} +

- - {t("page-what-is-ethereum-criminal-activity-desc-3")} - + {t("page-what-is-ethereum-bitcoin-comparison-4-desc-2")}

-
    -
  • - - Europol Spotlight - Cryptocurrencies - Tracing the - evolution of criminal finances.pdf - {" "} - EN (1.4 MB) -
  • -
- - - +

+ {t("page-what-is-ethereum-bitcoin-comparison-4-desc-3")} +

+
+
+ + {/* // TODO: Re-enable when page ready */} + {/* + {t("page-what-is-ethereum-bitcoin-learn-more")} + */} +
-
- - - - - -

{t("page-what-is-ethereum-btc-eth-diff-title")}

- -

{t("page-what-is-ethereum-btc-eth-diff-1")}

+
+ {t("page-what-is-ethereum-banner-when-who-alt")} + +
+

+ {tocItems[7].title} +

+
+
+

{t("page-what-is-ethereum-when-who-intro-1")}

+

{t("page-what-is-ethereum-when-who-intro-2")}

+

{t("page-what-is-ethereum-when-who-intro-3")}

+

{t("page-what-is-ethereum-when-who-intro-4")}

+
+
+

+ {t("page-what-is-ethereum-when-who-history-title")} +

+ + + 2013:{" "} + {t("page-what-is-ethereum-when-who-history-2013")} + + + 2014:{" "} + {t("page-what-is-ethereum-when-who-history-2014")} + + + 2015:{" "} + {t.rich("page-what-is-ethereum-when-who-history-2015", { + em: Emphasis, + })} + + + 2016:{" "} + {t("page-what-is-ethereum-when-who-history-2016")}{" "} + + + 2020:{" "} + {t("page-what-is-ethereum-when-who-history-2020")}{" "} + + + 2021:{" "} + {t.rich("page-what-is-ethereum-when-who-history-2021", { + em: Emphasis, + })}{" "} + + + 2022:{" "} + {t.rich("page-what-is-ethereum-when-who-history-2022", { + em: Emphasis, + })}{" "} + + + 2025:{" "} + {t.rich("page-what-is-ethereum-when-who-history-2025", { + em: Emphasis, + })}{" "} + + +

{t("page-what-is-ethereum-when-who-governance-1")}

+
+ {t("page-what-is-ethereum-banner-contributing-alt")} +
+

+ {t("page-what-is-ethereum-when-who-contributors-title")} +

+ + + {t("page-what-is-ethereum-when-who-contributors-1")} + + + {t("page-what-is-ethereum-when-who-contributors-2")} + + + {" "} + {t("page-what-is-ethereum-when-who-contributors-3")} + + + {t("page-what-is-ethereum-when-who-contributors-4")} + + + {t.rich("page-what-is-ethereum-when-who-contributors-5", { + strong: Strong, + })} + + +

+ {t.rich("page-what-is-ethereum-when-who-governance-2", { + strong: Strong, + })} +

- + {t.rich("page-what-is-ethereum-when-who-governance-3", { + eips: (chunks) => ( + {chunks} + ), + governance: (chunks) => ( + {chunks} + ), + })}

-

{t("page-what-is-ethereum-btc-eth-diff-3")}

-

{t("page-what-is-ethereum-btc-eth-diff-4")}

- - - +

{t("page-what-is-ethereum-when-who-governance-4")}

+
+ + {t("page-what-is-ethereum-when-who-learn-more")} + +
+
- -
-

{t("page-what-is-ethereum-additional-reading")}

- -

- - {t("page-what-is-ethereum-week-in-ethereum")} - {" "} - {t("page-what-is-ethereum-week-in-ethereum-desc")} -

-

- - {t("page-what-is-ethereum-atoms-institutions-blockchains")} - {" "} - {t("page-what-is-ethereum-atoms-institutions-blockchains-desc")} -

+
+

+ {tocItems[8].title} +

+
+
+

{t("page-what-is-ethereum-roadmap-intro-1")}

+

{t("page-what-is-ethereum-roadmap-intro-2")}

+

+ {t.rich("page-what-is-ethereum-roadmap-intro-3", { + a: (chunks) => ( + {chunks} + ), + })} +

+

+ {t.rich("page-what-is-ethereum-roadmap-priorities-intro", { + a: (chunks) => ( + + {chunks} + + ), + })} +

-

- - {t("page-what-is-ethereum-kernel-dreamers")} - {" "} - {t("page-what-is-ethereum-kernel-dreamers-desc")} -

- -
- -
- -

{t("page-what-is-ethereum-explore")}

-
- - -
- - {t("page-what-is-ethereum-get-eth")} - -
-
- -
- - {t("page-what-is-ethereum-explore-dapps")} - + + + {t("page-what-is-ethereum-roadmap-priority-1")} + + + {t("page-what-is-ethereum-roadmap-priority-2")} + + + +

{t("page-what-is-ethereum-roadmap-outro-1")}

+

+ {t.rich("page-what-is-ethereum-roadmap-outro-2", { + a: (chunks) => {chunks}, + })} +

-
-
-
-
- -
+ + {t("page-what-is-ethereum-roadmap-learn-more")} + + +
+ +
+

+ {t("page-what-is-ethereum-further-reading-title")} +

+ + + + {t("page-what-is-ethereum-further-reading-wallets")} + + + + + {t("page-what-is-ethereum-further-reading-eth")} + + + + + {t("page-what-is-ethereum-further-reading-web3")} + + + + + {t("page-what-is-ethereum-further-reading-networks")} + + + +
-
- -
+ - + ) } diff --git a/public/images/translatathon/walking.png b/public/images/translatathon/walking.png index c08981a9a04..7e31ca4e9fb 100644 Binary files a/public/images/translatathon/walking.png and b/public/images/translatathon/walking.png differ diff --git a/src/components/EnergyConsumptionChart/index.tsx b/src/components/EnergyConsumptionChart/index.tsx index 89ba0017f87..fc8f979545b 100644 --- a/src/components/EnergyConsumptionChart/index.tsx +++ b/src/components/EnergyConsumptionChart/index.tsx @@ -36,7 +36,7 @@ ChartJS.register( ) const EnergyConsumptionChart = () => { - const { t } = useTranslation("page-what-is-ethereum") + const { t } = useTranslation("page-energy-consumption") const locale = useLocale() const isClient = useIsClient() const isRtl = isLangRightToLeft(locale as Lang) @@ -247,7 +247,7 @@ const EnergyConsumptionChart = () => {

- {t("page-what-is-ethereum-energy-consumption-chart-legend")} + {t("energy-consumption-chart-legend")}

) diff --git a/src/components/IntlStringElements.tsx b/src/components/IntlStringElements.tsx new file mode 100644 index 00000000000..61d1ecbe6bd --- /dev/null +++ b/src/components/IntlStringElements.tsx @@ -0,0 +1,3 @@ +export const Emphasis = (chunks: React.ReactNode) => {chunks} + +export const Strong = (chunks: React.ReactNode) => {chunks} diff --git a/src/components/TableOfContents/ItemsList.tsx b/src/components/TableOfContents/ItemsList.tsx index 0bab7a8791a..6cbd44664e5 100644 --- a/src/components/TableOfContents/ItemsList.tsx +++ b/src/components/TableOfContents/ItemsList.tsx @@ -1,19 +1,35 @@ +import { cva, type VariantProps } from "class-variance-authority" + import type { ToCItem } from "@/lib/types" import ToCLink from "@/components/TableOfContents/TableOfContentsLink" +const variants = cva("mb-2 last:mb-0", { + variants: { + variant: { + default: "", + beginner: + "[&:has([data-state-active='true'])]:text-primary hover:text-primary-hover list-item", + }, + }, + defaultVariants: { + variant: "default", + }, +}) + export type ItemsListProps = { items: Array depth: number maxDepth: number activeHash?: string -} +} & VariantProps const ItemsList = ({ items, depth, maxDepth, activeHash, + variant, ...rest }: ItemsListProps) => { if (depth > maxDepth) return null @@ -23,8 +39,13 @@ const ItemsList = ({ {items.map((item, index) => { const { title, items } = item return ( -
  • - +
  • + {items && (
      const Link = ({ depth, item: { title, url }, activeHash, + variant, }: TableOfContentsLinkProps) => { const isActive = activeHash === url return (