Skip to content

Commit 3a60904

Browse files
authored
Merge pull request #7407 from ethereum/dev
Deploy v5.0.0
2 parents c4188ac + 8a11a3e commit 3a60904

File tree

328 files changed

+8569
-2166
lines changed

Some content is hidden

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

328 files changed

+8569
-2166
lines changed

.all-contributorsrc

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7767,7 +7767,8 @@
77677767
"avatar_url": "https://avatars.githubusercontent.com/u/98348072?v=4",
77687768
"profile": "https://www.linkedin.com/in/lcalixxto/",
77697769
"contributions": [
7770-
"doc"
7770+
"doc",
7771+
"content"
77717772
]
77727773
},
77737774
{
@@ -8288,7 +8289,8 @@
82888289
"avatar_url": "https://avatars.githubusercontent.com/u/39565075?v=4",
82898290
"profile": "http://www.samuelakinosho.com",
82908291
"contributions": [
8291-
"doc"
8292+
"doc",
8293+
"code"
82928294
]
82938295
},
82948296
{
@@ -8374,6 +8376,25 @@
83748376
"contributions": [
83758377
"doc"
83768378
]
8379+
},
8380+
{
8381+
"login": "Aldizh",
8382+
"name": "Aldi Zhupani",
8383+
"avatar_url": "https://avatars.githubusercontent.com/u/2282120?v=4",
8384+
"profile": "http://aldizh.github.io/",
8385+
"contributions": [
8386+
"bug",
8387+
"code"
8388+
]
8389+
},
8390+
{
8391+
"login": "linhuatan",
8392+
"name": "linhuatan",
8393+
"avatar_url": "https://avatars.githubusercontent.com/u/94831627?v=4",
8394+
"profile": "https://github.com/linhuatan",
8395+
"contributions": [
8396+
"doc"
8397+
]
83778398
}
83788399
],
83798400
"contributorsPerLine": 7,

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
12521252
<td align="center"><a href="https://www.youtube.com/c/Cryptoversidad"><img src="https://avatars.githubusercontent.com/u/107050863?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cryptoversidad</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=cryptoversidad" title="Documentation">📖</a></td>
12531253
<td align="center"><a href="https://disconnect3d.pl/"><img src="https://avatars.githubusercontent.com/u/10009354?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Disconnect3d</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=disconnect3d" title="Documentation">📖</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Adisconnect3d" title="Bug reports">🐛</a></td>
12541254
<td align="center"><a href="http://setharielgreen.com"><img src="https://avatars.githubusercontent.com/u/9850322?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Seth Ariel Green</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=setgree" title="Documentation">📖</a></td>
1255-
<td align="center"><a href="https://www.linkedin.com/in/lcalixxto/"><img src="https://avatars.githubusercontent.com/u/98348072?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Luisa Calixto</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=lcalixxto" title="Documentation">📖</a></td>
1255+
<td align="center"><a href="https://www.linkedin.com/in/lcalixxto/"><img src="https://avatars.githubusercontent.com/u/98348072?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Luisa Calixto</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=lcalixxto" title="Documentation">📖</a> <a href="#content-lcalixxto" title="Content">🖋</a></td>
12561256
</tr>
12571257
<tr>
12581258
<td align="center"><a href="https://github.com/theanneli"><img src="https://avatars.githubusercontent.com/u/106612248?v=4?s=100" width="100px;" alt=""/><br /><sub><b>theanneli</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=theanneli" title="Documentation">📖</a></td>
@@ -1324,7 +1324,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
13241324
<td align="center"><a href="https://github.com/gorondan"><img src="https://avatars.githubusercontent.com/u/97026899?v=4?s=100" width="100px;" alt=""/><br /><sub><b>gorondan</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=gorondan" title="Documentation">📖</a></td>
13251325
<td align="center"><a href="https://github.com/pruthvirajjadhav1"><img src="https://avatars.githubusercontent.com/u/73253354?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pruthviraj Jadhav</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=pruthvirajjadhav1" title="Documentation">📖</a></td>
13261326
<td align="center"><a href="https://gndx.io"><img src="https://avatars.githubusercontent.com/u/10554486?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Oscar Barajas Tavares</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=gndx" title="Documentation">📖</a></td>
1327-
<td align="center"><a href="http://www.samuelakinosho.com"><img src="https://avatars.githubusercontent.com/u/39565075?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Samuel Akinosho</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=LucidSamuel" title="Documentation">📖</a></td>
1327+
<td align="center"><a href="http://www.samuelakinosho.com"><img src="https://avatars.githubusercontent.com/u/39565075?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Samuel Akinosho</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=LucidSamuel" title="Documentation">📖</a> <a href="https://github.com/ethereum/ethereum-org-website/commits?author=LucidSamuel" title="Code">💻</a></td>
13281328
</tr>
13291329
<tr>
13301330
<td align="center"><a href="https://odair.dev"><img src="https://avatars.githubusercontent.com/u/45074733?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Odair Augusto Trujillo Orozco</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=OdairTrujillo" title="Documentation">📖</a> <a href="#ideas-OdairTrujillo" title="Ideas, Planning, & Feedback">🤔</a></td>
@@ -1338,6 +1338,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
13381338
<tr>
13391339
<td align="center"><a href="https://github.com/rogueassasin1729"><img src="https://avatars.githubusercontent.com/u/92800000?v=4?s=100" width="100px;" alt=""/><br /><sub><b>rogueassasin1729</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=rogueassasin1729" title="Documentation">📖</a></td>
13401340
<td align="center"><a href="https://pandapip1.com/"><img src="https://avatars.githubusercontent.com/u/45835846?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pandapip1</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=Pandapip1" title="Documentation">📖</a></td>
1341+
<td align="center"><a href="http://aldizh.github.io/"><img src="https://avatars.githubusercontent.com/u/2282120?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Aldi Zhupani</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3AAldizh" title="Bug reports">🐛</a> <a href="https://github.com/ethereum/ethereum-org-website/commits?author=Aldizh" title="Code">💻</a></td>
1342+
<td align="center"><a href="https://github.com/linhuatan"><img src="https://avatars.githubusercontent.com/u/94831627?v=4?s=100" width="100px;" alt=""/><br /><sub><b>linhuatan</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=linhuatan" title="Documentation">📖</a></td>
13411343
</tr>
13421344
</table>
13431345

docs/best-practices.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ export default ComponentName
104104
## Styling
105105

106106
- `src/theme.ts` - Declares site color themes, breakpoints and other constants (try to utilize these colors first)
107-
- We use [styled-components](https://styled-components.com/)
107+
- We use [emotion](https://emotion.sh/)
108108

109109
- Tagged template literals are used to style custom components
110110

111111
```tsx
112-
// Example of styling syntax using styled-components
112+
// Example of styling syntax using emotion
113113
114-
import styled from "styled-components"
114+
import styled from "@emotion/styled"
115115
116116
const GenericButton = styled.div`
117117
width: 200px;
@@ -128,14 +128,12 @@ export default ComponentName
128128
// ie: <PrimaryButton>Text</PrimaryButton>
129129
```
130130

131-
- Recommended VS Code Plugin: `vscode-styled-components` <br>To install: Open VS Code > `Ctrl+P` / `Cmd+P` > Run: <br>`ext install vscode-styled-components`
132-
133131
- Values from `src/theme.ts` are automatically passed as a prop object to styled components
134132

135133
```tsx
136134
// Example of theme.ts usage
137135
138-
import styled from "styled-components"
136+
import styled from "@emotion/styled"
139137
140138
const Container = styled.div`
141139
background: ${(props) => props.theme.colors.background};

gatsby-config.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,19 @@ const config: GatsbyConfig = {
185185
},
186186
},
187187
// CSS in JS
188-
`gatsby-plugin-styled-components`,
188+
{
189+
resolve: `gatsby-plugin-emotion`,
190+
options: {
191+
labelFormat: "[filename]--[local]",
192+
},
193+
},
194+
{
195+
resolve: "@chakra-ui/gatsby-plugin",
196+
options: {
197+
resetCSS: false,
198+
isUsingColorMode: true,
199+
},
200+
},
189201
// Source assets
190202
{
191203
resolve: `gatsby-source-filesystem`,

gatsby-node.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -435,14 +435,11 @@ export const onPostBootstrap: GatsbyNode["onPostBootstrap"] = ({ actions }) => {
435435
}
436436

437437
export const createSchemaCustomization: GatsbyNode["createSchemaCustomization"] =
438-
({ actions, schema }) => {
438+
({ actions }) => {
439439
const { createTypes } = actions
440-
const { sdls, builders } = Schema
440+
const { sdls } = Schema
441441

442-
createTypes([
443-
...Object.keys(sdls).map((sdlKey) => sdls[sdlKey]),
444-
schema.buildObjectType(builders.WalletsCsv),
445-
])
442+
createTypes([...Object.keys(sdls).map((sdlKey) => sdls[sdlKey])])
446443
}
447444

448445
export const onPreBootstrap: GatsbyNode["onPreBootstrap"] = ({ reporter }) => {

package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereum-org-website",
3-
"version": "4.11.1",
3+
"version": "5.0.0",
44
"description": "Website of ethereum.org",
55
"main": "index.js",
66
"repository": "git@github.com:ethereum/ethereum-org-website.git",
@@ -9,13 +9,16 @@
99
"private": false,
1010
"dependencies": {
1111
"@apollo/client": "^3.3.13",
12+
"@chakra-ui/gatsby-plugin": "^3.0.1",
13+
"@chakra-ui/react": "^1.0.0",
14+
"@emotion/react": "^11.9.3",
15+
"@emotion/styled": "^11.9.3",
1216
"@formatjs/intl-locale": "^2.4.14",
1317
"@formatjs/intl-numberformat": "^6.1.4",
1418
"@mdx-js/mdx": "^1.6.5",
1519
"@mdx-js/react": "^1.6.5",
1620
"algoliasearch": "^4.3.0",
1721
"axios": "^0.21.2",
18-
"babel-plugin-styled-components": "^1.10.7",
1922
"browser-lang": "^0.1.0",
2023
"browserslist": "^4.21.0",
2124
"clipboard": "^2.0.6",
@@ -24,8 +27,9 @@
2427
"embla-carousel-react": "^6.2.0",
2528
"ethereum-blockies-base64": "^1.0.2",
2629
"focus-trap-react": "^8.11.2",
27-
"framer-motion": "^4.1.3",
30+
"framer-motion": "^6.5.1",
2831
"gatsby": "^4.15.0",
32+
"gatsby-plugin-emotion": "^7.19.0",
2933
"gatsby-plugin-gatsby-cloud": "^4.3.0",
3034
"gatsby-plugin-image": "^2.0.0",
3135
"gatsby-plugin-manifest": "^4.10.1",
@@ -37,7 +41,6 @@
3741
"gatsby-plugin-react-svg": "^3.1.0",
3842
"gatsby-plugin-sharp": "^4.10.0",
3943
"gatsby-plugin-sitemap": "^5.0.0",
40-
"gatsby-plugin-styled-components": "^5.0.0",
4144
"gatsby-remark-autolink-headers": "^5.0.0",
4245
"gatsby-remark-copy-linked-files": "^5.0.0",
4346
"gatsby-remark-images": "^6.0.0",
@@ -67,7 +70,6 @@
6770
"react-intl": "^3.12.1",
6871
"react-select": "^4.3.0",
6972
"recharts": "^2.1.9",
70-
"styled-components": "^5.1.1",
7173
"styled-system": "^5.1.5",
7274
"unist-util-visit-parents": "^2.1.2"
7375
},
@@ -81,7 +83,6 @@
8183
"@types/react": "^17.0.39",
8284
"@types/react-dom": "^17.0.11",
8385
"@types/react-instantsearch-dom": "^6.12.3",
84-
"@types/styled-components": "^5.1.25",
8586
"@types/styled-system": "^5.1.15",
8687
"babel-preset-gatsby": "^2.14.0",
8788
"github-slugger": "^1.3.0",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export type Colors = typeof colors
2+
3+
const colors = {}
4+
5+
export default colors
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import colors from "./colors"
2+
3+
const foundations = {
4+
colors,
5+
}
6+
7+
export default foundations
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
const styles = {
2+
global: (_props) => ({
3+
/**
4+
* Current scenario: we have 2 places where global styles are defined.
5+
* - Our legacy global styles under `src/components/GlobalStyle.ts`
6+
* - Chakra also defines its own global styles. Check them here:
7+
* https://github.com/chakra-ui/chakra-ui/blob/main/packages/theme/src/styles.ts
8+
*
9+
* Having those 2 global styles creates some style conflicts. Here we
10+
* override some of the default Chakra globals in order to keep the same
11+
* styles as we had in the legacy one.
12+
*
13+
* TODO: remove these overrides as we adopt the new Design System and we
14+
* don't need the global styles anymore
15+
*/
16+
body: {
17+
lineHeight: "1.6rem",
18+
},
19+
}),
20+
}
21+
22+
export default styles

src/@chakra-ui/gatsby-plugin/theme.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import {
2+
extendTheme,
3+
type ThemeConfig,
4+
type ThemeOverride,
5+
} from "@chakra-ui/react"
6+
7+
// Global style overrides
8+
import styles from "./styles"
9+
10+
// Foundational style overrides
11+
import foundations from "./foundations"
12+
13+
const config: ThemeConfig = {
14+
cssVarPrefix: "eth",
15+
initialColorMode: "light",
16+
useSystemColorMode: true,
17+
}
18+
19+
const theme: ThemeOverride = {
20+
config,
21+
styles,
22+
...foundations,
23+
}
24+
25+
export default extendTheme(theme)

0 commit comments

Comments
 (0)