Skip to content

Commit

Permalink
Merge branch 'dev' into chakra-emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
pettinarip committed Sep 2, 2022
2 parents f81928a + 9e6098b commit e81cc17
Show file tree
Hide file tree
Showing 240 changed files with 3,600 additions and 2,530 deletions.
125 changes: 124 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,8 @@
"contributions": [
"translation",
"code",
"ideas"
"ideas",
"doc"
]
},
{
Expand Down Expand Up @@ -8442,6 +8443,128 @@
"doc",
"translation"
]
},
{
"login": "srhinee",
"name": "samsara",
"avatar_url": "https://avatars.githubusercontent.com/u/29331203?v=4",
"profile": "https://github.com/srhinee",
"contributions": [
"doc",
"bug",
"translation"
]
},
{
"login": "greefea",
"name": "greefea",
"avatar_url": "https://avatars.githubusercontent.com/u/106492500?v=4",
"profile": "https://github.com/greefea",
"contributions": [
"doc"
]
},
{
"login": "parotax",
"name": "parotax",
"avatar_url": "https://avatars.githubusercontent.com/u/86522055?v=4",
"profile": "https://github.com/parotax",
"contributions": [
"doc"
]
},
{
"login": "vinhloc30796",
"name": "Loc Nguyen",
"avatar_url": "https://avatars.githubusercontent.com/u/19675202?v=4",
"profile": "https://linkedin.com/in/vinhloc30796",
"contributions": [
"content"
]
},
{
"login": "north-vanhooser",
"name": "north-vanhooser",
"avatar_url": "https://avatars.githubusercontent.com/u/86130010?v=4",
"profile": "https://github.com/north-vanhooser",
"contributions": [
"doc"
]
},
{
"login": "othaime-en",
"name": "othaime-en",
"avatar_url": "https://avatars.githubusercontent.com/u/61498231?v=4",
"profile": "https://github.com/othaime-en",
"contributions": [
"code"
]
},
{
"login": "fleischi-svr",
"name": "Cronos",
"avatar_url": "https://avatars.githubusercontent.com/u/79516944?v=4",
"profile": "https://github.com/fleischi-svr",
"contributions": [
"doc",
"translation"
]
},
{
"login": "MicahZoltu",
"name": "Micah Zoltu",
"avatar_url": "https://avatars.githubusercontent.com/u/886059?v=4",
"profile": "https://github.com/MicahZoltu",
"contributions": [
"doc"
]
},
{
"login": "Aracki",
"name": "Ivan Aracki",
"avatar_url": "https://avatars.githubusercontent.com/u/6129986?v=4",
"profile": "https://www.aracki.me",
"contributions": [
"ideas"
]
},
{
"login": "always0e0w",
"name": "屠虫少年",
"avatar_url": "https://avatars.githubusercontent.com/u/64178062?v=4",
"profile": "https://alphabeta.top/",
"contributions": [
"doc",
"translation"
]
},
{
"login": "RamanSB",
"name": "Ramandeep",
"avatar_url": "https://avatars.githubusercontent.com/u/13969478?v=4",
"profile": "http://stackoverflow.com/users/5062825/ramansb",
"contributions": [
"ideas"
]
},
{
"login": "vvladd",
"name": "Vlad Kokhan",
"avatar_url": "https://avatars.githubusercontent.com/u/13506999?v=4",
"profile": "https://github.com/vvladd",
"contributions": [
"doc",
"translation"
]
},
{
"login": "SavPhill",
"name": "Phill",
"avatar_url": "https://avatars.githubusercontent.com/u/38789408?v=4",
"profile": "https://github.com/SavPhill",
"contributions": [
"content"
]
}
],
"contributorsPerLine": 7,
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,6 @@ src/gatsby-types.d.ts

# Exported Crowdin files
.crowdin

# vscode workplace configuration
.vscode
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
</tr>
<tr>
<td align="center"><a href="https://github.com/DjangoM"><img src="https://avatars2.githubusercontent.com/u/35060411?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jaroslav Macej</b></sub></a><br /><a href="#translation-DjangoM" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/EmanHerawy"><img src="https://avatars3.githubusercontent.com/u/10674070?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Eman Herawy</b></sub></a><br /><a href="#translation-EmanHerawy" title="Translation">🌍</a> <a href="https://github.com/ethereum/ethereum-org-website/commits?author=EmanHerawy" title="Code">💻</a> <a href="#ideas-EmanHerawy" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/EmanHerawy"><img src="https://avatars3.githubusercontent.com/u/10674070?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Eman Herawy</b></sub></a><br /><a href="#translation-EmanHerawy" title="Translation">🌍</a> <a href="https://github.com/ethereum/ethereum-org-website/commits?author=EmanHerawy" title="Code">💻</a> <a href="#ideas-EmanHerawy" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/ethereum/ethereum-org-website/commits?author=EmanHerawy" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/Bellinas"><img src="https://avatars0.githubusercontent.com/u/45827044?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bellinas</b></sub></a><br /><a href="#translation-Bellinas" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/amchercashin"><img src="https://avatars3.githubusercontent.com/u/8727497?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alexander Cherkashin</b></sub></a><br /><a href="#translation-amchercashin" title="Translation">🌍</a></td>
<td align="center"><a href="http://www.soarontech.com.ng"><img src="https://avatars0.githubusercontent.com/u/29120867?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Enoch Mbaebie</b></sub></a><br /><a href="#translation-EnochMbaebie" title="Translation">🌍</a></td>
Expand Down Expand Up @@ -1347,6 +1347,23 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<tr>
<td align="center"><a href="https://github.com/lonelyotter"><img src="https://avatars.githubusercontent.com/u/57280827?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Haochen Song</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=lonelyotter" title="Documentation">📖</a> <a href="#translation-lonelyotter" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/opensourcex123"><img src="https://avatars.githubusercontent.com/u/73230562?v=4?s=100" width="100px;" alt=""/><br /><sub><b>N Fx</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=opensourcex123" title="Documentation">📖</a> <a href="#translation-opensourcex123" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/srhinee"><img src="https://avatars.githubusercontent.com/u/29331203?v=4?s=100" width="100px;" alt=""/><br /><sub><b>samsara</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=srhinee" title="Documentation">📖</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Asrhinee" title="Bug reports">🐛</a> <a href="#translation-srhinee" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/greefea"><img src="https://avatars.githubusercontent.com/u/106492500?v=4?s=100" width="100px;" alt=""/><br /><sub><b>greefea</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=greefea" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/parotax"><img src="https://avatars.githubusercontent.com/u/86522055?v=4?s=100" width="100px;" alt=""/><br /><sub><b>parotax</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=parotax" title="Documentation">📖</a></td>
<td align="center"><a href="https://linkedin.com/in/vinhloc30796"><img src="https://avatars.githubusercontent.com/u/19675202?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Loc Nguyen</b></sub></a><br /><a href="#content-vinhloc30796" title="Content">🖋</a></td>
<td align="center"><a href="https://github.com/north-vanhooser"><img src="https://avatars.githubusercontent.com/u/86130010?v=4?s=100" width="100px;" alt=""/><br /><sub><b>north-vanhooser</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=north-vanhooser" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/othaime-en"><img src="https://avatars.githubusercontent.com/u/61498231?v=4?s=100" width="100px;" alt=""/><br /><sub><b>othaime-en</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=othaime-en" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/fleischi-svr"><img src="https://avatars.githubusercontent.com/u/79516944?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cronos</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=fleischi-svr" title="Documentation">📖</a> <a href="#translation-fleischi-svr" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/MicahZoltu"><img src="https://avatars.githubusercontent.com/u/886059?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Micah Zoltu</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=MicahZoltu" title="Documentation">📖</a></td>
<td align="center"><a href="https://www.aracki.me"><img src="https://avatars.githubusercontent.com/u/6129986?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ivan Aracki</b></sub></a><br /><a href="#ideas-Aracki" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://alphabeta.top/"><img src="https://avatars.githubusercontent.com/u/64178062?v=4?s=100" width="100px;" alt=""/><br /><sub><b>屠虫少年</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=always0e0w" title="Documentation">📖</a> <a href="#translation-always0e0w" title="Translation">🌍</a></td>
<td align="center"><a href="http://stackoverflow.com/users/5062825/ramansb"><img src="https://avatars.githubusercontent.com/u/13969478?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ramandeep</b></sub></a><br /><a href="#ideas-RamanSB" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/vvladd"><img src="https://avatars.githubusercontent.com/u/13506999?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Vlad Kokhan</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=vvladd" title="Documentation">📖</a> <a href="#translation-vvladd" title="Translation">🌍</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/SavPhill"><img src="https://avatars.githubusercontent.com/u/38789408?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Phill</b></sub></a><br /><a href="#content-SavPhill" title="Content">🖋</a></td>
</tr>
</table>

Expand Down
57 changes: 57 additions & 0 deletions docs/chakra-migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,63 @@ This is part of our [UI library implementation epic](https://github.com/ethereum

All `styled` components need to be removed and replaced with the corresponded Chakra component. [See the list of components](https://chakra-ui.com/docs/components).

Use as much native Chakra components as possible.

### Wrappers or layout divs

Use the [native layouts components](https://chakra-ui.com/docs/components/box)

```tsx
// before
const Wrapper = styled.div`
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
`

// now
<Stack direction='row'>
```

Center things using the `<Center />` component

```tsx
// before
const Center = styled.div`
height: 100px;
display: flex;
justify-content: center;
align-items: center;
`

// now
<Center h="100px">
```

Group buttons using `<ButtonGroup />` or `<Wrap />`

```tsx
// before
const ButtonRow = styled.div`
display: flex;
align-items: center;
flex-wrap: wrap;
`

// now
<ButtonGroup variant='outline' spacing={2}>
<Button>Button 1</Button>
<Button>Button 2</Button>
</ButtonGroup>

// or
<Wrap spacing={2}>
<WrapItem><Button variant="outline">Button 1</Button></WrapItem>
<WrapItem><Button variant="outline">Button 2</Button></WrapItem>
</Wrap>
```

## Override styles using style props

- You can see how to use the different style props here: [https://chakra-ui.com/docs/styled-system/style-props](https://chakra-ui.com/docs/styled-system/style-props#margin-and-padding)
Expand Down
15 changes: 12 additions & 3 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const config: GatsbyConfig = {
icon: `src/assets/favicon.png`,
},
},
// Sitemap generator (ethereum.org/sitemap.xml)
// Sitemap generator (ethereum.org/sitemap/sitemap-index.xml)
{
resolve: `gatsby-plugin-sitemap`,
options: {
Expand Down Expand Up @@ -104,6 +104,15 @@ const config: GatsbyConfig = {
},
},
},
// robots.txt creation
{
resolve: "gatsby-plugin-robots-txt",
options: {
host: siteUrl,
sitemap: `${siteUrl}/sitemap/sitemap-index.xml`,
policy: [{ userAgent: "*", allow: "/" }],
},
},
// Ability to set custom IDs for headings (for translations)
// i.e. https://www.markdownguide.org/extended-syntax/#heading-ids
`gatsby-remark-autolink-headers`,
Expand Down Expand Up @@ -134,8 +143,8 @@ const config: GatsbyConfig = {
// See: https://www.gatsbyjs.org/docs/mdx/plugins/
gatsbyRemarkPlugins: [
{
// Local plugin to adjust the images urls of the translated md files
resolve: path.resolve(`./plugins/gatsby-remark-image-urls`),
// Local plugin to adjust the images & links urls of the translated md files
resolve: path.resolve(`./plugins/gatsby-remark-fix-static-urls`),
},
{
resolve: `gatsby-remark-autolink-headers`,
Expand Down
4 changes: 4 additions & 0 deletions gatsby-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,10 @@ export const onCreatePage: GatsbyNode<any, Context>["onCreatePage"] = async ({
}
}

if (!page.context) {
return
}

const isTranslated = page.context.locale !== defaultLanguage
const hasNoContext = page.context.isOutdated === undefined

Expand Down
48 changes: 24 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ethereum-org-website",
"version": "5.1.0",
"version": "6.0.0",
"description": "Website of ethereum.org",
"main": "index.js",
"repository": "[email protected]:ethereum/ethereum-org-website.git",
Expand All @@ -10,7 +10,7 @@
"dependencies": {
"@apollo/client": "^3.3.13",
"@chakra-ui/gatsby-plugin": "^3.0.1",
"@chakra-ui/react": "^1.0.0",
"@chakra-ui/react": "^2.2.8",
"@emotion/react": "^11.9.3",
"@emotion/styled": "^11.9.3",
"@formatjs/intl-locale": "^2.4.14",
Expand All @@ -24,49 +24,50 @@
"clipboard": "^2.0.6",
"cross-fetch": "^3.1.5",
"dotenv": "^8.2.0",
"embla-carousel-react": "^6.2.0",
"embla-carousel-react": "^7.0.0",
"ethereum-blockies-base64": "^1.0.2",
"focus-trap-react": "^8.11.2",
"focus-trap-react": "^10.0.0",
"framer-motion": "^6.5.1",
"gatsby": "^4.15.0",
"gatsby": "^4.21.1",
"gatsby-plugin-emotion": "^7.19.0",
"gatsby-plugin-gatsby-cloud": "^4.3.0",
"gatsby-plugin-image": "^2.0.0",
"gatsby-plugin-manifest": "^4.10.1",
"gatsby-plugin-gatsby-cloud": "^4.20.0",
"gatsby-plugin-image": "^2.21.0",
"gatsby-plugin-manifest": "^4.21.0",
"gatsby-plugin-matomo": "^0.9.0",
"gatsby-plugin-mdx": "^2.14.1",
"gatsby-plugin-netlify": "^3.14.0",
"gatsby-plugin-mdx": "^3.0.0",
"gatsby-plugin-netlify": "^5.0.1",
"gatsby-plugin-react-helmet": "^5.0.0",
"gatsby-plugin-react-helmet-canonical-urls": "^1.4.0",
"gatsby-plugin-react-svg": "^3.1.0",
"gatsby-plugin-sharp": "^4.10.0",
"gatsby-plugin-sitemap": "^5.0.0",
"gatsby-remark-autolink-headers": "^5.0.0",
"gatsby-remark-copy-linked-files": "^5.0.0",
"gatsby-remark-images": "^6.0.0",
"gatsby-plugin-robots-txt": "^1.7.1",
"gatsby-plugin-sharp": "^4.21.0",
"gatsby-plugin-sitemap": "^5.21.0",
"gatsby-remark-autolink-headers": "^5.21.0",
"gatsby-remark-copy-linked-files": "^5.21.0",
"gatsby-remark-images": "^6.21.0",
"gatsby-remark-reading-time": "^1.1.0",
"gatsby-source-filesystem": "^4.0.0",
"gatsby-source-filesystem": "^4.21.1",
"gatsby-theme-i18n": "^3.0.0",
"gatsby-theme-i18n-react-intl": "^3.0.0",
"gatsby-transformer-csv": "^4.0.0",
"gatsby-transformer-gitinfo": "^1.1.0",
"gatsby-transformer-json": "^4.11.0",
"gatsby-transformer-remark": "^3.0.0",
"gatsby-transformer-sharp": "^4.10.0",
"gatsby-transformer-sharp": "^4.21.0",
"is-relative-url": "^3.0.0",
"lodash": "^4.17.21",
"luxon": "^1.24.1",
"netlify-lambda": "^2.0.3",
"polished": "^4.1.4",
"prism-react-renderer": "^1.1.1",
"prismjs": "^1.27.0",
"react": "17.0.2",
"react": "^18.0.0",
"react-countdown": "^2.3.2",
"react-dom": "17.0.2",
"react-dom": "^18.0.0",
"react-emoji-render": "^1.2.4",
"react-helmet": "^6.1.0",
"react-icons": "^4.3.1",
"react-instantsearch-dom": "^6.6.0",
"react-instantsearch-dom": "^6.32.0",
"react-intl": "^3.12.1",
"react-select": "^4.3.0",
"recharts": "^2.1.9",
Expand All @@ -80,9 +81,9 @@
"@types/luxon": "^2.3.2",
"@types/mdx-js__react": "^1.5.5",
"@types/node": "^17.0.23",
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"@types/react-instantsearch-dom": "^6.12.3",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@types/react-instantsearch-core": "^6.26.2",
"@types/styled-system": "^5.1.15",
"babel-preset-gatsby": "^2.14.0",
"github-slugger": "^1.3.0",
Expand All @@ -92,7 +93,6 @@
"minimist": "^1.2.6",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
"react-test-renderer": "^17.0.1",
"ts-node": "^10.9.1",
"typescript": "^4.6.3"
},
Expand Down
Loading

0 comments on commit e81cc17

Please sign in to comment.