Skip to content

Commit e52dfdf

Browse files
authored
Merge pull request #11745 from ethereum/staging
Deploy v7.24.2
2 parents 2e13dbf + e8e918c commit e52dfdf

File tree

4 files changed

+71
-109
lines changed

4 files changed

+71
-109
lines changed
1.3 MB
Loading

src/content/roadmap/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Ethereum roadmap
33
description: The path to more scalability, security and sustainability for Ethereum.
44
lang: en
55
template: roadmap
6-
image: ../../assets/roadmap/roadmap-main.png
6+
image: ../../assets/heroes/roadmap-hub-hero.jpg
77
alt: "Ethereum roadmap"
88
summaryPoints:
99
buttons:

src/pages/developers/index.tsx

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
Box,
66
chakra,
77
Flex,
8-
Image,
98
SimpleGrid,
109
TextProps,
1110
useColorModeValue,
@@ -38,55 +37,6 @@ const Page = (props: ChildOnlyProp) => (
3837
/>
3938
)
4039

41-
const HeroContainer = (props: ChildOnlyProp) => (
42-
<Flex
43-
justifyContent="space-between"
44-
flexDirection={{ base: "column-reverse", md: "row" }}
45-
mt={8}
46-
mb={16}
47-
bg="cardGradient"
48-
{...props}
49-
/>
50-
)
51-
52-
const HeroCopyContainer = (props: ChildOnlyProp) => (
53-
<Box
54-
flex={{ base: "0 1 400px", md: "0 1 500px" }}
55-
w={{ base: "100%", md: "auto" }}
56-
maxWidth={{ base: "100%", md: "500px" }}
57-
maxHeight={{ base: "280px", md: "340px" }}
58-
{...props}
59-
/>
60-
)
61-
62-
const HeroCopy = (props: ChildOnlyProp) => (
63-
<Box
64-
p={8}
65-
m={{ base: 0, sm: 8 }}
66-
mt={{ base: -2, md: 8 }}
67-
bg="background.base"
68-
borderRadius="4px"
69-
border="1px solid border"
70-
{...props}
71-
/>
72-
)
73-
74-
const H1 = (props: ChildOnlyProp) => (
75-
<OldHeading
76-
as="h1"
77-
fontSize="2rem"
78-
fontWeight="medium"
79-
fontFamily="monospace"
80-
fontStyle="normal"
81-
textTransform="uppercase"
82-
lineHeight="110%"
83-
bg="ednBackground"
84-
p={2}
85-
mt={0}
86-
{...props}
87-
/>
88-
)
89-
9040
const GrayContainer = (props: ChildOnlyProp) => (
9141
<Box
9242
w="full"
@@ -109,19 +59,6 @@ const Subtitle = (props: TextProps) => (
10959

11060
const MonoSubtitle = (props: ChildOnlyProp) => <OldHeading mb={0} {...props} />
11161

112-
const Hero = (props: ChildOnlyProp) => (
113-
<Box
114-
flex="1 1 50%"
115-
maxW="800px"
116-
bgSize="cover"
117-
bgRepeat="no-repeat"
118-
mt={{ base: 0, md: 12 }}
119-
ml={{ base: 0, md: 8 }}
120-
alignSelf={{ base: "center", md: "" }}
121-
{...props}
122-
/>
123-
)
124-
12562
const StyledCardContainer = (props: ChildOnlyProp) => (
12663
<SimpleGrid columns={[1, 1, 2, 4]} mx={-4} mt={8} mb={12} {...props} />
12764
)

src/templates/roadmap.tsx

Lines changed: 70 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import Text from "../components/OldText"
4444
import GlossaryTooltip from "../components/Glossary/GlossaryTooltip"
4545
import MdLink from "../components/MdLink"
4646
import LeftNavBar from "../components/LeftNavBar"
47+
import { HubHero } from "../components/Hero"
4748
import {
4849
Page,
4950
ContentContainer,
@@ -143,11 +144,16 @@ const components = {
143144
}
144145

145146
const RoadmapPage = ({
146-
data: { pageData: mdx },
147+
data: { pageData: mdx, heroImage },
147148
location,
148149
}: PageProps<Queries.RoadmapPageQuery, Context>) => {
149150
// TODO: Replace with direct token implementation after UI migration is completed
150151
const lgBp = useToken("breakpoints", "lg")
152+
const parsedPathname = location.pathname
153+
.split("/")
154+
.filter((item) => item !== "")
155+
.slice(1)
156+
.join("/")
151157

152158
if (!mdx?.frontmatter)
153159
throw new Error(
@@ -213,58 +219,67 @@ const RoadmapPage = ({
213219

214220
return (
215221
<Box position="relative">
216-
<HeroContainer>
217-
<Flex w="100%" flexDirection={{ base: "column", md: "row" }}>
218-
<TitleCard>
219-
<Breadcrumbs slug={location.pathname} mb="8" />
220-
<Title>{mdx.frontmatter.title}</Title>
221-
<Text>{mdx.frontmatter.description}</Text>
222-
{mdx?.frontmatter?.buttons && (
223-
// FIXME: remove the `ul` override once removed the corresponding
224-
// global styles in `src/@chakra-ui/gatsby-plugin/styles.ts`
225-
<Wrap spacing={2} marginBottom={4} sx={{ ul: { m: 0 } }}>
226-
{mdx.frontmatter.buttons.map((button, idx) => {
227-
if (button?.to) {
222+
{parsedPathname === "roadmap" ? (
223+
<HubHero
224+
heroImgSrc={getImage(heroImage)!}
225+
header={mdx.frontmatter.title}
226+
title={""}
227+
description={mdx.frontmatter.description}
228+
/>
229+
) : (
230+
<HeroContainer>
231+
<Flex w="100%" flexDirection={{ base: "column", md: "row" }}>
232+
<TitleCard>
233+
<Breadcrumbs slug={location.pathname} mb="8" />
234+
<Title>{mdx.frontmatter.title}</Title>
235+
<Text>{mdx.frontmatter.description}</Text>
236+
{mdx?.frontmatter?.buttons && (
237+
// FIXME: remove the `ul` override once removed the corresponding
238+
// global styles in `src/@chakra-ui/gatsby-plugin/styles.ts`
239+
<Wrap spacing={2} marginBottom={4} sx={{ ul: { m: 0 } }}>
240+
{mdx.frontmatter.buttons.map((button, idx) => {
241+
if (button?.to) {
242+
return (
243+
<WrapItem>
244+
<ButtonLink
245+
key={idx}
246+
variant={button?.variant}
247+
to={button?.to}
248+
>
249+
{button.label}
250+
</ButtonLink>
251+
</WrapItem>
252+
)
253+
}
228254
return (
229255
<WrapItem>
230-
<ButtonLink
256+
<Button
231257
key={idx}
232258
variant={button?.variant}
233-
to={button?.to}
259+
toId={button?.toId}
234260
>
235-
{button.label}
236-
</ButtonLink>
261+
{button?.label}
262+
</Button>
237263
</WrapItem>
238264
)
239-
}
240-
return (
241-
<WrapItem>
242-
<Button
243-
key={idx}
244-
variant={button?.variant}
245-
toId={button?.toId}
246-
>
247-
{button?.label}
248-
</Button>
249-
</WrapItem>
250-
)
251-
})}
252-
</Wrap>
253-
)}
254-
<TableOfContents
255-
position="relative"
256-
zIndex="2"
257-
items={tocItems}
258-
isMobile
265+
})}
266+
</Wrap>
267+
)}
268+
<TableOfContents
269+
position="relative"
270+
zIndex="2"
271+
items={tocItems}
272+
isMobile
273+
/>
274+
</TitleCard>
275+
<HeroImage
276+
image={getImage(mdx.frontmatter.image)!}
277+
alt={mdx.frontmatter.alt || ""}
278+
objectFit="contain"
259279
/>
260-
</TitleCard>
261-
<HeroImage
262-
image={getImage(mdx.frontmatter.image)!}
263-
alt={mdx.frontmatter.alt || ""}
264-
objectFit="contain"
265-
/>
266-
</Flex>
267-
</HeroContainer>
280+
</Flex>
281+
</HeroContainer>
282+
)}
268283
<Page dir={isRightToLeft ? "rtl" : "ltr"}>
269284
<PageMetadata
270285
title={mdx.frontmatter.title}
@@ -309,6 +324,16 @@ export const roadmapPageQuery = graphql`
309324
}
310325
}
311326
}
327+
heroImage: file(relativePath: { eq: "heroes/roadmap-hub-hero.jpg" }) {
328+
childImageSharp {
329+
gatsbyImageData(
330+
width: 1504
331+
layout: CONSTRAINED
332+
placeholder: BLURRED
333+
quality: 100
334+
)
335+
}
336+
}
312337
pageData: mdx(fields: { relativePath: { eq: $relativePath } }) {
313338
fields {
314339
slug

0 commit comments

Comments
 (0)