Skip to content

Commit b68b738

Browse files
authored
Merge pull request #13827 from ethereum/deprecate-expandable-info
Migrate `ExpandableInfo` and `runNodeGradient2`
2 parents 2ef93eb + 6419e89 commit b68b738

File tree

3 files changed

+35
-177
lines changed

3 files changed

+35
-177
lines changed

src/components/ExpandableInfo.tsx

Lines changed: 0 additions & 147 deletions
This file was deleted.

src/pages/run-a-node.tsx

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import type { BasePageProps, ChildOnlyProp, Lang } from "@/lib/types"
1919
import { Button, ButtonLink } from "@/components/Buttons"
2020
import Emoji from "@/components/Emoji"
2121
import ExpandableCard from "@/components/ExpandableCard"
22-
import ExpandableInfo from "@/components/ExpandableInfo"
2322
import FeedbackCard from "@/components/FeedbackCard"
2423
import {
2524
DecentralizationGlyphIcon,
@@ -31,7 +30,7 @@ import {
3130
SovereigntyGlyphIcon,
3231
VoteGlyphIcon,
3332
} from "@/components/icons/run-a-node"
34-
import { Image } from "@/components/Image"
33+
import { Image, TwImage } from "@/components/Image"
3534
import InlineLink from "@/components/Link"
3635
import MainArticle from "@/components/MainArticle"
3736
import OldHeading from "@/components/OldHeading"
@@ -40,7 +39,9 @@ import PageHero from "@/components/PageHero"
4039
import PageMetadata from "@/components/PageMetadata"
4140
import { StandaloneQuizWidget as QuizWidget } from "@/components/Quiz/QuizWidget"
4241
import Translation from "@/components/Translation"
42+
import { Stack, VStack } from "@/components/ui/flex"
4343

44+
import { cn } from "@/lib/utils/cn"
4445
import { existsNamespace } from "@/lib/utils/existsNamespace"
4546
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
4647
import { getLocaleTimestamp } from "@/lib/utils/time"
@@ -284,10 +285,6 @@ const StakingCalloutContainer = (props: ChildOnlyProp) => (
284285
/>
285286
)
286287

287-
const StrongParagraph = (props: BoxProps) => (
288-
<Text fontSize="150%" fontWeight="semibold" {...props} />
289-
)
290-
291288
const H2 = (props: HeadingProps) => (
292289
<OldHeading
293290
fontSize={{ base: "2xl", md: "2rem" }}
@@ -474,27 +471,39 @@ const RunANodePage = () => {
474471
</Content>
475472

476473
<FlexContent>
477-
<ExpandableInfo
478-
alignSelf="center"
479-
width={{ base: "full", md: "90%" }}
480-
mb={{ base: 0, md: 4 }}
481-
image={impact}
482-
title={<Translation id="page-run-a-node:page-run-a-node-who-title" />}
483-
contentPreview={
484-
<Translation id="page-run-a-node:page-run-a-node-who-preview" />
485-
}
486-
background="runNodeGradient2"
487-
forceOpen
474+
<VStack
475+
className={cn(
476+
"relative mb-0 w-full gap-0 self-center rounded-sm border p-6 md:mb-4 md:w-[90%]",
477+
"bg-gradient-to-br from-blue-500/20 from-10% to-pink-600/20 to-90%"
478+
)}
488479
>
489-
<Text>
490-
<Translation id="page-run-a-node:page-run-a-node-who-copy-1" />
491-
</Text>
492-
<Text>{t("page-run-a-node-who-copy-2")}</Text>
493-
<Text>{t("page-run-a-node-who-copy-3")}</Text>
494-
<StrongParagraph>
495-
{t("page-run-a-node-who-copy-bold")}
496-
</StrongParagraph>
497-
</ExpandableInfo>
480+
<Stack className="flex-col items-center justify-between gap-8 md:flex-row md:gap-12">
481+
<TwImage
482+
src={impact}
483+
alt=""
484+
sizes="300px"
485+
style={{ width: "300px", height: "auto" }}
486+
/>
487+
<div className="me-4">
488+
<h2 className="mb-5 mt-4 text-2xl font-semibold leading-[1.4] md:text-[2rem]">
489+
<Translation id="page-run-a-node:page-run-a-node-who-title" />
490+
</h2>
491+
<p className="body-medium mb-0">
492+
<Translation id="page-run-a-node:page-run-a-node-who-preview" />
493+
</p>
494+
</div>
495+
</Stack>
496+
<div className="mt-8 border-t pt-6">
497+
<p className="mb-6">
498+
<Translation id="page-run-a-node:page-run-a-node-who-copy-1" />
499+
</p>
500+
<p className="mb-6">{t("page-run-a-node-who-copy-2")}</p>
501+
<p className="mb-6">{t("page-run-a-node-who-copy-3")}</p>
502+
<p className="mb-6 text-[150%] font-semibold leading-none">
503+
{t("page-run-a-node-who-copy-bold")}
504+
</p>
505+
</div>
506+
</VStack>
498507
</FlexContent>
499508

500509
<Content>

src/theme.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ const lightColors = {
151151
"linear-gradient(285.24deg, #F7CBC0 0%, #F4B1AB 29.8%, #8476D9 49.78%, #85ACF9 54.14%, #1C1CE1 61.77%, #000000 69.77%)",
152152
runNodeGradient:
153153
"linear-gradient(0deg, rgba(153, 157, 244, 0.1) 0%, rgba(153, 157, 244, 0) 100%), linear-gradient(270.72deg, #FDF0FF 0.62%, rgba(236, 195, 195, 0.557292) 32.61%, rgba(207, 189, 230, 0.296875) 49.67%, rgba(196, 196, 196, 0) 72.88%);",
154-
runNodeGradient2:
155-
"linear-gradient(135deg, rgba(79, 113, 235, 0.2) 9.8%, rgba(232, 79, 235, 0.2) 92.84%);",
156154
ghostCardBackground: white,
157155
ghostCardGhost: white600,
158156
secondaryButtonBackgroundActive: white700,
@@ -270,8 +268,6 @@ const darkColors = {
270268
"linear-gradient(285.24deg, #f7cbc0 0%, #fbeae3 17.81%, #f4b1ab 29.8%, #8476d9 49.78%, #8db4ff 69.77%);",
271269
runNodeGradient:
272270
"linear-gradient(0deg, rgba(153, 157, 244, 0.35) 0%, rgba(153, 157, 244, 0) 100%), linear-gradient(89.24deg, rgba(253, 240, 255, 0.7) -64.3%, rgba(212, 119, 119, 0.390104) -7.43%, rgba(188, 163, 220, 0.207813) 46.66%, rgba(196, 196, 196, 0) 99.16%);",
273-
runNodeGradient2:
274-
"linear-gradient(135deg, rgba(79, 113, 235, 0.2) 9.8%, rgba(232, 79, 235, 0.2) 92.84%);",
275271
primaryHover: primaryDark400,
276272
primaryActive: primaryDark200,
277273
ghostCardBackground: black300,

0 commit comments

Comments
 (0)