Skip to content

Commit cae84e2

Browse files
committed
Merge branch 'dev' into fade-icons-find-wallet
2 parents 4fddb69 + 06ea9b5 commit cae84e2

File tree

241 files changed

+3161
-1758
lines changed

Some content is hidden

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

241 files changed

+3161
-1758
lines changed

.all-contributorsrc

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8319,6 +8319,61 @@
83198319
"doc",
83208320
"ideas"
83218321
]
8322+
},
8323+
{
8324+
"login": "michaelmccallam",
8325+
"name": "Michael McCallam",
8326+
"avatar_url": "https://avatars.githubusercontent.com/u/3510607?v=4",
8327+
"profile": "https://github.com/michaelmccallam",
8328+
"contributions": [
8329+
"doc"
8330+
]
8331+
},
8332+
{
8333+
"login": "PolinaShanti",
8334+
"name": "Polina G.",
8335+
"avatar_url": "https://avatars.githubusercontent.com/u/110098268?v=4",
8336+
"profile": "https://nownodes.io/",
8337+
"contributions": [
8338+
"doc"
8339+
]
8340+
},
8341+
{
8342+
"login": "Cerebro92",
8343+
"name": "Neeraj Gahlot",
8344+
"avatar_url": "https://avatars.githubusercontent.com/u/13215478?v=4",
8345+
"profile": "https://github.com/Cerebro92",
8346+
"contributions": [
8347+
"doc",
8348+
"bug"
8349+
]
8350+
},
8351+
{
8352+
"login": "vrinek",
8353+
"name": "Kostas",
8354+
"avatar_url": "https://avatars.githubusercontent.com/u/81346?v=4",
8355+
"profile": "https://github.com/vrinek",
8356+
"contributions": [
8357+
"doc"
8358+
]
8359+
},
8360+
{
8361+
"login": "rogueassasin1729",
8362+
"name": "rogueassasin1729",
8363+
"avatar_url": "https://avatars.githubusercontent.com/u/92800000?v=4",
8364+
"profile": "https://github.com/rogueassasin1729",
8365+
"contributions": [
8366+
"doc"
8367+
]
8368+
},
8369+
{
8370+
"login": "Pandapip1",
8371+
"name": "Pandapip1",
8372+
"avatar_url": "https://avatars.githubusercontent.com/u/45835846?v=4",
8373+
"profile": "https://pandapip1.com/",
8374+
"contributions": [
8375+
"doc"
8376+
]
83228377
}
83238378
],
83248379
"contributorsPerLine": 7,

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,6 +1330,14 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
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>
13311331
<td align="center"><a href="https://github.com/Unforkable"><img src="https://avatars.githubusercontent.com/u/86481149?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Unforkable</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=Unforkable" title="Documentation">📖</a></td>
13321332
<td align="center"><a href="https://github.com/Rodrigolvc"><img src="https://avatars.githubusercontent.com/u/108540208?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rodrigo vasquez</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=Rodrigolvc" title="Documentation">📖</a> <a href="#ideas-Rodrigolvc" title="Ideas, Planning, & Feedback">🤔</a></td>
1333+
<td align="center"><a href="https://github.com/michaelmccallam"><img src="https://avatars.githubusercontent.com/u/3510607?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Michael McCallam</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=michaelmccallam" title="Documentation">📖</a></td>
1334+
<td align="center"><a href="https://nownodes.io/"><img src="https://avatars.githubusercontent.com/u/110098268?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Polina G.</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=PolinaShanti" title="Documentation">📖</a></td>
1335+
<td align="center"><a href="https://github.com/Cerebro92"><img src="https://avatars.githubusercontent.com/u/13215478?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Neeraj Gahlot</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=Cerebro92" title="Documentation">📖</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3ACerebro92" title="Bug reports">🐛</a></td>
1336+
<td align="center"><a href="https://github.com/vrinek"><img src="https://avatars.githubusercontent.com/u/81346?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kostas</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=vrinek" title="Documentation">📖</a></td>
1337+
</tr>
1338+
<tr>
1339+
<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>
1340+
<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>
13331341
</tr>
13341342
</table>
13351343

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`,

package.json

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethereum-org-website",
3-
"version": "4.10.0",
3+
"version": "4.11.1",
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,29 +70,30 @@
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
},
7476
"devDependencies": {
7577
"@netlify/functions": "^1.0.0",
7678
"@types/browser-lang": "^0.1.0",
79+
"@types/github-slugger": "^1.3.0",
7780
"@types/luxon": "^2.3.2",
7881
"@types/mdx-js__react": "^1.5.5",
7982
"@types/node": "^17.0.23",
8083
"@types/react": "^17.0.39",
8184
"@types/react-dom": "^17.0.11",
8285
"@types/react-instantsearch-dom": "^6.12.3",
83-
"@types/styled-components": "^5.1.25",
8486
"@types/styled-system": "^5.1.15",
8587
"babel-preset-gatsby": "^2.14.0",
8688
"github-slugger": "^1.3.0",
89+
"gray-matter": "^4.0.3",
8790
"husky": "^4.2.5",
8891
"identity-obj-proxy": "^3.0.0",
8992
"minimist": "^1.2.6",
9093
"prettier": "^2.2.1",
9194
"pretty-quick": "^3.1.0",
9295
"react-test-renderer": "^17.0.1",
96+
"ts-node": "^10.9.1",
9397
"typescript": "^4.6.3"
9498
},
9599
"scripts": {
@@ -100,7 +104,8 @@
100104
"crowdin-clean": "rm -rf .crowdin && mkdir .crowdin",
101105
"crowdin-import": "ts-node src/scripts/crowdin-import.ts",
102106
"format": "prettier --write \"**/*.{js,jsx,json,md}\"",
103-
"generate-heading-ids": "node src/scripts/generate-heading-ids.js",
107+
"markdown-checker": "node src/scripts/markdown-checker.js",
108+
"generate-heading-ids": "ts-node --esm src/scripts/generateHeadingIds.mts",
104109
"start": "gatsby develop",
105110
"start:lambda": "netlify-lambda serve src/lambda",
106111
"start:static": "gatsby build && gatsby serve",
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)

src/components/Accordion.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import styled from "styled-components"
1+
import styled from "@emotion/styled"
22
// TODO add motion animation
33
// import { motion } from "framer-motion"
44
import { FakeLink } from "./SharedStyledComponents"

0 commit comments

Comments
 (0)