Skip to content

Commit 02c0485

Browse files
authored
Merge pull request #6977 from ethereum/dev
Deploy v4.5.0
2 parents c38209f + 60cf880 commit 02c0485

File tree

783 files changed

+22759
-5202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

783 files changed

+22759
-5202
lines changed

.all-contributorsrc

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7973,6 +7973,54 @@
79737973
"doc",
79747974
"bug"
79757975
]
7976+
},
7977+
{
7978+
"login": "didoshotev",
7979+
"name": "Deyan Shotev",
7980+
"avatar_url": "https://avatars.githubusercontent.com/u/62618421?v=4",
7981+
"profile": "https://github.com/didoshotev",
7982+
"contributions": [
7983+
"code"
7984+
]
7985+
},
7986+
{
7987+
"login": "PraneshASP",
7988+
"name": "Pranesh A S",
7989+
"avatar_url": "https://avatars.githubusercontent.com/u/42379522?v=4",
7990+
"profile": "https://github.com/PraneshASP",
7991+
"contributions": [
7992+
"doc",
7993+
"bug"
7994+
]
7995+
},
7996+
{
7997+
"login": "shir22",
7998+
"name": "shir22",
7999+
"avatar_url": "https://avatars.githubusercontent.com/u/33841818?v=4",
8000+
"profile": "https://github.com/shir22",
8001+
"contributions": [
8002+
"doc",
8003+
"bug"
8004+
]
8005+
},
8006+
{
8007+
"login": "nikashitsa",
8008+
"name": "Nikita Verkhovin",
8009+
"avatar_url": "https://avatars.githubusercontent.com/u/1029908?v=4",
8010+
"profile": "https://github.com/nikashitsa",
8011+
"contributions": [
8012+
"bug"
8013+
]
8014+
},
8015+
{
8016+
"login": "pushkar2112",
8017+
"name": "Pushkar Verma",
8018+
"avatar_url": "https://avatars.githubusercontent.com/u/50198312?v=4",
8019+
"profile": "https://pushkarverma.dev",
8020+
"contributions": [
8021+
"doc",
8022+
"ideas"
8023+
]
79768024
}
79778025
],
79788026
"contributorsPerLine": 7,

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,6 +1282,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
12821282
</tr>
12831283
<tr>
12841284
<td align="center"><a href="https://github.com/RanchHowards"><img src="https://avatars.githubusercontent.com/u/69303624?v=4?s=100" width="100px;" alt=""/><br /><sub><b>RanchHowards</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=RanchHowards" title="Documentation">📖</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3ARanchHowards" title="Bug reports">🐛</a></td>
1285+
<td align="center"><a href="https://github.com/didoshotev"><img src="https://avatars.githubusercontent.com/u/62618421?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Deyan Shotev</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=didoshotev" title="Code">💻</a></td>
1286+
<td align="center"><a href="https://github.com/PraneshASP"><img src="https://avatars.githubusercontent.com/u/42379522?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pranesh A S</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=PraneshASP" title="Documentation">📖</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3APraneshASP" title="Bug reports">🐛</a></td>
1287+
<td align="center"><a href="https://github.com/shir22"><img src="https://avatars.githubusercontent.com/u/33841818?v=4?s=100" width="100px;" alt=""/><br /><sub><b>shir22</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=shir22" title="Documentation">📖</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Ashir22" title="Bug reports">🐛</a></td>
1288+
<td align="center"><a href="https://github.com/nikashitsa"><img src="https://avatars.githubusercontent.com/u/1029908?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nikita Verkhovin</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Anikashitsa" title="Bug reports">🐛</a></td>
1289+
<td align="center"><a href="https://pushkarverma.dev"><img src="https://avatars.githubusercontent.com/u/50198312?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pushkar Verma</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=pushkar2112" title="Documentation">📖</a> <a href="#ideas-pushkar2112" title="Ideas, Planning, & Feedback">🤔</a></td>
12851290
</tr>
12861291
</table>
12871292

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereum-org-website",
3-
"version": "4.4.0",
3+
"version": "4.5.0",
44
"description": "Website of ethereum.org",
55
"main": "index.js",
66
"repository": "[email protected]:ethereum/ethereum-org-website.git",
@@ -20,6 +20,7 @@
2020
"clipboard": "^2.0.6",
2121
"cross-fetch": "^3.1.5",
2222
"dotenv": "^8.2.0",
23+
"embla-carousel-react": "^6.2.0",
2324
"ethereum-blockies-base64": "^1.0.2",
2425
"focus-trap-react": "^8.11.2",
2526
"framer-motion": "^4.1.3",
@@ -62,7 +63,7 @@
6263
"react-icons": "^4.3.1",
6364
"react-instantsearch-dom": "^6.6.0",
6465
"react-select": "^4.3.0",
65-
"recharts": "1.8.5",
66+
"recharts": "^2.1.9",
6667
"styled-components": "^5.1.1",
6768
"styled-system": "^5.1.5",
6869
"unist-util-visit-parents": "^2.1.2"
@@ -88,6 +89,7 @@
8889
"scripts": {
8990
"build": "gatsby build",
9091
"build:lambda": "netlify-lambda build src/lambda",
92+
"build:10gb": "NODE_OPTIONS=--max-old-space-size=10240 gatsby build",
9193
"clean": "gatsby clean",
9294
"copy-contributors": "node src/scripts/copy-contributors.js",
9395
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",

src/assets/wallets/coinwallet.png

255 Bytes
Loading

src/assets/what-is-eth/eth.png

228 KB
Loading

src/components/AdoptionChart.tsx

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import React from "react"
2+
import styled, { useTheme } from "styled-components"
3+
4+
const Container = styled.div`
5+
display: flex;
6+
flex-direction: row;
7+
`
8+
9+
const Column = styled.div`
10+
display: flex;
11+
flex-direction: column-reverse;
12+
margin-left: 0.5rem;
13+
14+
&:first-child {
15+
margin-left: 0;
16+
}
17+
18+
@media (min-width: ${(props) => props.theme.breakpoints.m}) {
19+
margin-left: 1rem;
20+
}
21+
`
22+
23+
const Cell = styled.div<{ color?: string }>`
24+
border: 1px solid ${({ theme, color }) => (color ? color : theme.colors.text)};
25+
color: ${({ theme, color }) => (color ? color : theme.colors.text)};
26+
padding: 0.8rem 0.5rem;
27+
font-size: 0.9rem;
28+
font-weight: 700;
29+
line-height: 1;
30+
text-align: center;
31+
32+
&:last-child {
33+
border-top-left-radius: 1rem;
34+
border-top-right-radius: 1rem;
35+
}
36+
37+
&:nth-child(-n + 2) {
38+
border-bottom-left-radius: 1rem;
39+
border-bottom-right-radius: 1rem;
40+
}
41+
42+
@media (min-width: ${(props) => props.theme.breakpoints.m}) {
43+
padding: 0.8rem 1.2rem;
44+
}
45+
`
46+
47+
const ColumnName = styled(Cell)`
48+
border: 0;
49+
padding-top: 1.5rem;
50+
`
51+
52+
interface IProps {}
53+
54+
const AdoptionChart: React.FC<IProps> = () => {
55+
const { isDark } = useTheme()
56+
57+
return (
58+
<Container>
59+
<Column>
60+
<ColumnName>2010</ColumnName>
61+
<Cell color={isDark ? "#FBF9A5" : "#95935B"}>Investors</Cell>
62+
</Column>
63+
64+
<Column>
65+
<ColumnName>2014</ColumnName>
66+
<Cell color={isDark ? "#FBF9A5" : "#95935B"}>Investors</Cell>
67+
<Cell color={isDark ? "#9EC885" : "#67954C"}>Developers</Cell>
68+
<Cell color={isDark ? "#E78F6E" : "#CB7C5E"}>Companies</Cell>
69+
</Column>
70+
71+
<Column>
72+
<ColumnName>Now</ColumnName>
73+
<Cell color={isDark ? "#FBF9A5" : "#95935B"}>Investors</Cell>
74+
<Cell color={isDark ? "#9EC885" : "#67954C"}>Developers</Cell>
75+
<Cell color={isDark ? "#E78F6E" : "#CB7C5E"}>Companies</Cell>
76+
<Cell color={isDark ? "#8EA8CA" : "#5E7492"}>Artists</Cell>
77+
<Cell color={isDark ? "#AC85C2" : "#88669B"}>Musicians</Cell>
78+
<Cell color={isDark ? "#CA928E" : "#985955"}>Writers</Cell>
79+
<Cell color={isDark ? "#B9B9B9" : "#9E9E9E"}>Gamers</Cell>
80+
<Cell color={isDark ? "#E2B79E" : "#E78A54"}>Refugees</Cell>
81+
</Column>
82+
</Container>
83+
)
84+
}
85+
86+
export default AdoptionChart

src/components/BannerGrid/index.tsx

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
import styled from "styled-components"
2+
3+
export const Banner = styled.div`
4+
width: 100%;
5+
display: flex;
6+
background: ${(props) => props.theme.colors.bannerGridGradient};
7+
8+
h2 {
9+
margin-top: 0;
10+
}
11+
12+
ul {
13+
margin-bottom: 0;
14+
}
15+
16+
flex-flow: column nowrap;
17+
18+
@media (min-width: ${(props) => props.theme.breakpoints.l}) {
19+
flex-flow: row nowrap;
20+
}
21+
`
22+
23+
export const BannerBody = styled.div`
24+
flex: 4;
25+
padding: 40px;
26+
`
27+
28+
export const BannerImage = styled.div`
29+
display: flex;
30+
justify-content: end;
31+
flex: 2;
32+
align-self: end;
33+
`
34+
35+
export const BannerGrid = styled.div`
36+
display: grid;
37+
grid-template-columns: repeat(1, 1fr);
38+
grid-column-gap: 0px;
39+
grid-row-gap: 0px;
40+
41+
@media (min-width: ${(props) => props.theme.breakpoints.m}) {
42+
grid-template-columns: repeat(2, 1fr);
43+
grid-template-rows: repeat(3, 1fr);
44+
}
45+
46+
@media (min-width: ${(props) => props.theme.breakpoints.l}) {
47+
grid-template-columns: repeat(3, 1fr);
48+
grid-template-rows: repeat(2, 1fr);
49+
}
50+
`
51+
52+
export const BannerGridCell = styled.div`
53+
padding: 2rem 3rem;
54+
display: flex;
55+
flex-direction: column;
56+
57+
border-top: 1px solid ${({ theme }) => theme.colors.searchBackground};
58+
59+
border-left: none;
60+
&:first-child {
61+
border-top: none;
62+
}
63+
64+
@media (min-width: ${(props) => props.theme.breakpoints.m}) {
65+
border-left: 1px solid ${({ theme }) => theme.colors.searchBackground};
66+
&:nth-child(-n + 2) {
67+
border-top: none;
68+
}
69+
&:nth-child(2n + 1) {
70+
border-left: none;
71+
}
72+
}
73+
74+
@media (min-width: ${(props) => props.theme.breakpoints.l}) {
75+
&:nth-child(-n + 2) {
76+
border-top: 1px solid ${({ theme }) => theme.colors.searchBackground};
77+
}
78+
&:nth-child(2n + 1) {
79+
border-left: 1px solid ${({ theme }) => theme.colors.searchBackground};
80+
}
81+
82+
&:nth-child(-n + 3) {
83+
border-top: none;
84+
justify-content: start;
85+
padding-top: 0;
86+
}
87+
&:first-child,
88+
&:nth-child(3n + 1) {
89+
padding-left: 0;
90+
border-left: none;
91+
}
92+
&:nth-child(n + 4) {
93+
justify-content: start;
94+
padding-bottom: 0;
95+
}
96+
}
97+
`

src/components/Breadcrumbs.js renamed to src/components/Breadcrumbs.tsx

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import styled from "styled-components"
33
import { useIntl } from "gatsby-plugin-intl"
44

55
import Link from "./Link"
6-
import { supportedLanguages } from "../utils/languages"
7-
import { translateMessageId } from "../utils/translations"
6+
import { isLang, supportedLanguages } from "../utils/languages"
7+
import { isTranslationKey, translateMessageId } from "../utils/translations"
88

99
const ListContainer = styled.nav`
1010
margin-bottom: 2rem;
@@ -47,6 +47,11 @@ const CrumbLink = styled(Link)`
4747
}
4848
`
4949

50+
export interface IProps {
51+
slug: string
52+
startDepth?: number
53+
}
54+
5055
// Generate crumbs from slug
5156
// e.g. "/en/eth2/proof-of-stake/" will generate:
5257
// [
@@ -60,20 +65,27 @@ const CrumbLink = styled(Link)`
6065
// { fullPath: "/en/eth2/", text: "ETH2" },
6166
// { fullPath: "/en/eth2/proof-of-stake/", text: "PROOF OF STAKE" },
6267
// ]
63-
const Breadcrumbs = ({ slug, startDepth = 0, ...restProps }) => {
68+
const Breadcrumbs: React.FC<IProps> = ({
69+
slug,
70+
startDepth = 0,
71+
...restProps
72+
}) => {
6473
const intl = useIntl()
6574

66-
const split = slug.split("/")
67-
const sliced = split.filter((item) => !!item).slice(startDepth)
75+
const slugChunk = slug.split("/")
76+
const sliced = slugChunk.filter((item) => !!item).slice(startDepth)
6877

6978
const crumbs = sliced.map((path, idx) => {
7079
// If homepage (e.g. "en"), set text to "home" translation
71-
const text = supportedLanguages.includes(path)
72-
? translateMessageId("page-index-meta-title", intl)
73-
: translateMessageId(path, intl)
80+
const text =
81+
isLang(path) && supportedLanguages.includes(path)
82+
? translateMessageId("page-index-meta-title", intl)
83+
: isTranslationKey(path)
84+
? translateMessageId(path, intl)
85+
: ""
7486

7587
return {
76-
fullPath: split.slice(0, idx + 2 + startDepth).join("/") + "/",
88+
fullPath: slugChunk.slice(0, idx + 2 + startDepth).join("/") + "/",
7789
text: text.toUpperCase(),
7890
}
7991
})

src/components/ButtonLink.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from "react"
22
import styled from "styled-components"
3-
import { margin } from "styled-system"
3+
import { margin, MarginProps } from "styled-system"
44

55
import { scrollIntoView } from "../utils/scrollIntoView"
66

@@ -85,7 +85,7 @@ const SecondaryScrollLink = styled(StyledScrollButton)`
8585
}
8686
`
8787

88-
interface IProps extends ILinkProps {
88+
interface IProps extends ILinkProps, MarginProps {
8989
toId?: string
9090
isSecondary?: boolean
9191
}

src/components/Card.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,17 @@ const StyledCard = styled.div`
1111
padding: 1.5rem;
1212
`
1313

14+
const Title = styled.h3`
15+
margin-top: 0;
16+
`
17+
1418
const Description = styled.p`
1519
opacity: 0.8;
20+
margin: 0;
21+
`
22+
23+
const StyledEmoji = styled(Emoji)`
24+
margin-bottom: 1rem;
1625
`
1726

1827
const TopContent = styled.div``
@@ -33,8 +42,8 @@ const Card: React.FC<IProps> = ({
3342
}) => (
3443
<StyledCard className={className}>
3544
<TopContent>
36-
{emoji && <Emoji size={3} text={emoji} mb="1rem" />}
37-
{title && <h3>{title}</h3>}
45+
{emoji && <StyledEmoji size={3} text={emoji} />}
46+
{title && <Title>{title}</Title>}
3847
{description && <Description>{description}</Description>}
3948
</TopContent>
4049
{children}

0 commit comments

Comments
 (0)