Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy v6.11.0 #8778

Closed
wants to merge 154 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
a07ee2d
refactor all the components
pettinarip Sep 22, 2022
10a9be7
initial commit to implement gatsby-plugin-react-i18next
pettinarip Oct 28, 2022
20ba84c
fixes
pettinarip Oct 28, 2022
9ed0d41
remove analyzer
pettinarip Oct 29, 2022
bf6db9e
fix redirects on non mdx pages
pettinarip Oct 29, 2022
f4d00ee
add redirects of defaultLang pages
pettinarip Oct 31, 2022
db8d10f
add comments
pettinarip Oct 31, 2022
ba73184
enable generateDefaultLanguagePage
pettinarip Oct 31, 2022
5fb1643
add translations to languages page
pettinarip Oct 31, 2022
4737998
fix redirects
pettinarip Oct 31, 2022
d7cbb98
fix custom 404 pages
pettinarip Nov 1, 2022
69126da
use gatsby-plugin-layout to wrap the page with a component and simpli…
pettinarip Nov 1, 2022
d3cf052
Merge branch 'dev' into react-i18next
pettinarip Nov 2, 2022
6f2e080
dangerously insert html translation string in specific parts of the code
pettinarip Nov 3, 2022
2e7dc1f
fix translation function
pettinarip Nov 4, 2022
7976a5e
Merge branch 'dev' into react-i18next
pettinarip Nov 4, 2022
5ee0309
cleanup
pettinarip Nov 4, 2022
5684ccf
Merge branch 'dev' into react-i18next
pettinarip Nov 7, 2022
8514343
refactor(leaderboard): implement Chakra's `useColorModeValue`
TylerAPfledderer Nov 8, 2022
9dea744
refactor(leaderboard): add visually hidden text for accessibility
TylerAPfledderer Nov 8, 2022
cda3de3
refactor(leaderboard): convert to list with label
TylerAPfledderer Nov 8, 2022
5e26d49
refactor(leaderboard): convert `opacity` to `color`
TylerAPfledderer Nov 8, 2022
9c0d885
Update index.md
Olshansk Nov 10, 2022
df78856
refactor: migrate expanded card to chakra
jb-0 Nov 11, 2022
faceea3
document modify [Fixes #8571]
Nov 11, 2022
4466fa4
chore: move matomo const to the right place
jb-0 Nov 11, 2022
fc4f15e
chore: move fade down a level
jb-0 Nov 12, 2022
487e91e
chore: make component controlled
jb-0 Nov 12, 2022
94c917e
chore: wrap with h3 and replace btn
jb-0 Nov 12, 2022
472b6f3
Merge branch 'dev' into react-i18next
pettinarip Nov 14, 2022
ee4e9ce
replace with function
pettinarip Nov 14, 2022
8f57e73
Refactor `SkipLink.tsx` component to use ChakraUI
MahendraBishnoi29 Nov 16, 2022
3c5155c
Breadcrumbs.tsx Refactor
beamandala Nov 17, 2022
b66361a
Changed ButtonLink to Link
beamandala Nov 18, 2022
3691652
Merge branch 'dev' into react-i18next
pettinarip Nov 19, 2022
ddd42ae
refactor: tabs to chakra
amit-ksh Nov 19, 2022
bfdc48a
remove useless import
vdusart Nov 20, 2022
7f83ddf
convert container
vdusart Nov 20, 2022
12baa13
convert content to chakra
vdusart Nov 20, 2022
80f04d2
convert arrow to chakra
vdusart Nov 20, 2022
fd95a74
Convert modalReturn to chakra
vdusart Nov 20, 2022
f6506b9
Update broken Mamba links
minimalsm Nov 21, 2022
60a9701
Merge branch 'dev' into react-i18next
pettinarip Nov 21, 2022
7d62c99
update translation functions
pettinarip Nov 21, 2022
0b20b35
fix tutorials filter
pettinarip Nov 21, 2022
abc03bd
Update src/components/ExpandableCard.tsx
jb-0 Nov 22, 2022
e56bff8
Update src/components/ExpandableCard.tsx
jb-0 Nov 22, 2022
64a3422
Update src/components/ExpandableCard.tsx
jb-0 Nov 22, 2022
c7fbece
Update src/components/ExpandableCard.tsx
jb-0 Nov 22, 2022
69001bd
Update src/components/ExpandableCard.tsx
jb-0 Nov 22, 2022
1297718
Update src/components/ExpandableCard.tsx
jb-0 Nov 22, 2022
d0a5431
Update src/components/ExpandableCard.tsx
jb-0 Nov 22, 2022
78871d0
Update src/components/ExpandableCard.tsx
jb-0 Nov 22, 2022
e9d328b
Update src/components/ExpandableCard.tsx
jb-0 Nov 22, 2022
3050f21
Update src/components/ExpandableCard.tsx
jb-0 Nov 22, 2022
30ee87f
Merge branch 'ethereum:dev' into refactor/migrate_expandable_card
jb-0 Nov 22, 2022
281a902
chore: rem fade
jb-0 Nov 22, 2022
811fd2f
Update Thai (th) Essentials bucket
minimalsm Nov 22, 2022
3e98bbc
Update Russian (ru) Community bucket
minimalsm Nov 22, 2022
7e06f57
Update French (fr) Upgrades and Learn pages 2 buckets
minimalsm Nov 22, 2022
2440b9e
various cleanup
jmcook1186 Nov 22, 2022
fe21d2b
Update src/content/developers/docs/nodes-and-clients/index.md
corwintines Nov 22, 2022
758f7dd
Update src/content/developers/docs/nodes-and-clients/index.md
corwintines Nov 22, 2022
49e4015
fix glossary entries
jmcook1186 Nov 22, 2022
fa3d617
Update src/content/glossary/index.md
jmcook1186 Nov 22, 2022
212b96a
use shadow
vdusart Nov 22, 2022
003d53d
use shadow in StablecoinBoxGrid component
vdusart Nov 22, 2022
91ebe76
always fetch the default lang in order to fallback to it when the tra…
pettinarip Nov 23, 2022
b362468
Merge branch 'dev' into react-i18next
pettinarip Nov 23, 2022
e40efa8
chore: remove unused dep and replace h3 end tag
jb-0 Nov 23, 2022
2f81f53
chore: correct panel padding
jb-0 Nov 23, 2022
759398c
Fix spelling of Ethereum
lukassim Nov 23, 2022
45124c8
use htmr to parse html inside json files
pettinarip Nov 14, 2022
1becc65
update Translation comments
pettinarip Nov 23, 2022
3df272f
Update src/components/ExpandableCard.tsx
pettinarip Nov 23, 2022
23325b8
refactor(leaderboard): apply intl to list aria-label
TylerAPfledderer Nov 24, 2022
2a869ee
refactor(leaderboard): update hidden sentence in link overlay
TylerAPfledderer Nov 24, 2022
a29b188
Update src/content/developers/docs/nodes-and-clients/index.md
Olshansk Nov 24, 2022
a1f1b09
Added NFTPort to the list
mossow Nov 24, 2022
e90d693
Merge pull request #8592 from ethereum/i18n-parse-html-json
corwintines Nov 24, 2022
34ee4de
add new varaint to Tabs
amit-ksh Nov 25, 2022
c238e6f
Update src/components/SkipLink.tsx
MahendraBishnoi29 Nov 26, 2022
2fd0f03
Update src/components/SkipLink.tsx
MahendraBishnoi29 Nov 26, 2022
cc6e9f8
Update src/components/SkipLink.tsx
MahendraBishnoi29 Nov 26, 2022
e0c7674
Update SkipLink.tsx
MahendraBishnoi29 Nov 26, 2022
951462b
fix broken link to eth-docker.net
Roshan-R Nov 26, 2022
5ed0b97
Use systemic rather than systematic
aelmanaa Nov 28, 2022
6680dc3
Upped score for Chainsecurity
fredriksvantes Nov 28, 2022
0da6ba0
Merge pull request #8754 from ethereum/fredriksvantes-patch-1
minimalsm Nov 28, 2022
fd60ffd
docs: update README.md [skip ci]
allcontributors[bot] Nov 28, 2022
1030895
Merge pull request #8752 from aelmanaa/patch-1
minimalsm Nov 28, 2022
684737e
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Nov 28, 2022
9fd39b5
Merge pull request #8758 from ethereum/all-contributors/add-aelmanaa
minimalsm Nov 28, 2022
2707a35
docs: update README.md [skip ci]
allcontributors[bot] Nov 28, 2022
39adfc0
Merge pull request #8743 from Roshan-R/patch-1
minimalsm Nov 28, 2022
a35dc46
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Nov 28, 2022
98f71bd
Merge pull request #8759 from ethereum/all-contributors/add-Roshan-R
minimalsm Nov 28, 2022
e3badb0
Fix broken ethdocker link
minimalsm Nov 28, 2022
930cb24
Merge pull request #8406 from ethereum/react-i18next
pettinarip Nov 28, 2022
cc9dc7c
docs: update README.md [skip ci]
allcontributors[bot] Nov 28, 2022
bfe21da
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Nov 28, 2022
9f47cb4
Merge pull request #8728 from mossow/patch-1
minimalsm Nov 28, 2022
773bda4
Merge pull request #8761 from ethereum/all-contributors/add-mossow
minimalsm Nov 28, 2022
5611a25
Update src/content/developers/docs/consensus-mechanisms/pow/mining-al…
minimalsm Nov 28, 2022
9f143fa
Merge pull request #8713 from ethereum/jc-merge-cleanup
minimalsm Nov 28, 2022
8815921
Merge pull request #8714 from ethereum/jc-fix-glossary
minimalsm Nov 28, 2022
880cc9f
Merge pull request #8688 from ethereum/updateMambaLinks
minimalsm Nov 28, 2022
93bc814
Merge pull request #8760 from ethereum/fixEthDockerLink
minimalsm Nov 28, 2022
7f1a899
Merge pull request #8719 from ethereum/fix-ethereum-misspellings
minimalsm Nov 28, 2022
b46bd01
Merge pull request #8573 from OpenWJY/modify-document-1111
minimalsm Nov 28, 2022
2224174
docs: update README.md [skip ci]
allcontributors[bot] Nov 28, 2022
c7b2b39
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Nov 28, 2022
eaa21d3
Merge pull request #8763 from ethereum/all-contributors/add-OpenWJY
minimalsm Nov 28, 2022
33ccf6b
docs: update README.md [skip ci]
allcontributors[bot] Nov 28, 2022
4216d04
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Nov 28, 2022
45c2d5c
Merge pull request #8765 from ethereum/all-contributors/add-LuozhuZhang
minimalsm Nov 28, 2022
22bb85f
update docs
pettinarip Nov 28, 2022
bd730d9
Update src/content/developers/docs/nodes-and-clients/index.md
minimalsm Nov 28, 2022
7646fd8
docs: update README.md [skip ci]
allcontributors[bot] Nov 28, 2022
c8a36c0
docs: update .all-contributorsrc [skip ci]
allcontributors[bot] Nov 28, 2022
047d92d
Merge branch 'dev' into patch-1
minimalsm Nov 28, 2022
55486e7
Merge pull request #8554 from Olshansk/patch-1
minimalsm Nov 28, 2022
3e8fc08
fix unit in energy chart
jmcook1186 Nov 28, 2022
605c566
Merge pull request #8673 from amit-ksh/chakra/tabs
pettinarip Nov 28, 2022
08732eb
Merge pull request #8572 from jb-0/refactor/migrate_expandable_card
pettinarip Nov 28, 2022
49bd54c
fix import order
pettinarip Nov 28, 2022
56b33ab
Merge pull request #8602 from MahendraBishnoi29/patch-2
pettinarip Nov 28, 2022
5671c0f
Merge pull request #8766 from ethereum/i18n-update-docs
corwintines Nov 28, 2022
cfcf559
fixes
pettinarip Nov 28, 2022
3842b48
Merge branch 'dev' into bread-crumbs-refactor
pettinarip Nov 28, 2022
78ff086
Merge branch 'dev' into pr/TylerAPfledderer/8529
pettinarip Nov 28, 2022
2fb773b
Merge pull request #8707 from ethereum/novemberUpdateThaiEssentials
minimalsm Nov 28, 2022
d9b29a1
Merge pull request #8712 from ethereum/novemberUpdateRussianCommunity
minimalsm Nov 28, 2022
8c7c1ec
update translation functions
pettinarip Nov 28, 2022
4f01fe2
remove margins
pettinarip Nov 28, 2022
7255794
Merge branch 'dev' into feat/convert-Tooltip-component-to-ChakraUI
pettinarip Nov 28, 2022
d9b517e
Merge pull request #8768 from ethereum/all-contributors/add-Olshansk
minimalsm Nov 28, 2022
c8ebaa4
Merge pull request #8770 from ethereum/jc-fix-energy-chart
minimalsm Nov 28, 2022
0e3a319
Merge pull request #8641 from Master7130/bread-crumbs-refactor
pettinarip Nov 28, 2022
7320eb7
Apply suggestions from code review
minimalsm Nov 28, 2022
956887a
Update src/content/translations/fr/glossary/index.md
minimalsm Nov 28, 2022
c3b1321
Update src/content/translations/fr/enterprise/private-ethereum/index.md
minimalsm Nov 28, 2022
0689f26
Merge pull request #8710 from ethereum/novemberUpdateFrenchUpgradesAn…
minimalsm Nov 28, 2022
50cef12
Fix broken Emoji component
minimalsm Nov 28, 2022
c1817ab
Merge pull request #8684 from vdusart/feat/convert-Tooltip-component-…
pettinarip Nov 28, 2022
2c56d90
Merge pull request #8529 from TylerAPfledderer/refactor/leadboard-to-…
pettinarip Nov 28, 2022
a93a172
Merge pull request #8775 from ethereum/fixEmojiComponent
corwintines Nov 28, 2022
4499432
v6.11.0
corwintines Nov 28, 2022
b24db7d
Merge pull request #8777 from ethereum/v6-11-0
corwintines Nov 28, 2022
ca8546d
revert i18n PR
pettinarip Nov 29, 2022
9a1e129
fixes after revert
pettinarip Nov 29, 2022
82dd4c7
Merge pull request #8786 from ethereum/revert-i18n-pr
minimalsm Nov 29, 2022
7774957
v6.12.0
minimalsm Nov 29, 2022
0949d36
Merge pull request #8790 from ethereum/v6-12-0
minimalsm Nov 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 48 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -7313,7 +7313,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/70309026?v=4",
"profile": "https://github.com/LuozhuZhang",
"contributions": [
"doc"
"doc",
"ideas"
]
},
{
Expand Down Expand Up @@ -9671,6 +9672,52 @@
"contributions": [
"code"
]
},
{
"login": "aelmanaa",
"name": "Amine E.",
"avatar_url": "https://avatars.githubusercontent.com/u/4503543?v=4",
"profile": "https://github.com/aelmanaa",
"contributions": [
"doc"
]
},
{
"login": "Roshan-R",
"name": "Roshan R Chandar",
"avatar_url": "https://avatars.githubusercontent.com/u/43182697?v=4",
"profile": "https://roshan.ml/",
"contributions": [
"doc"
]
},
{
"login": "mossow",
"name": "mossow",
"avatar_url": "https://avatars.githubusercontent.com/u/9072132?v=4",
"profile": "https://github.com/mossow",
"contributions": [
"doc"
]
},
{
"login": "OpenWJY",
"name": "yujingwei",
"avatar_url": "https://avatars.githubusercontent.com/u/29328336?v=4",
"profile": "https://github.com/OpenWJY",
"contributions": [
"doc"
]
},
{
"login": "Olshansk",
"name": "Daniel Olshansky",
"avatar_url": "https://avatars.githubusercontent.com/u/1892194?v=4",
"profile": "http://olshansky.info",
"contributions": [
"doc",
"ideas"
]
}
],
"contributorsPerLine": 7,
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://github.com/1337-ishaan"><img src="https://avatars.githubusercontent.com/u/64636222?v=4?s=100" width="100px;" alt="Ishaan Parmar"/><br /><sub><b>Ishaan Parmar</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=1337-ishaan" title="Code">💻</a> <a href="#design-1337-ishaan" title="Design">🎨</a> <a href="#ideas-1337-ishaan" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="http://tarunbatra.com"><img src="https://avatars.githubusercontent.com/u/5329230?v=4?s=100" width="100px;" alt="Tarun Batra"/><br /><sub><b>Tarun Batra</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=tarunbatra" title="Documentation">📖</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Atarunbatra" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/max-donger"><img src="https://avatars.githubusercontent.com/u/56192627?v=4?s=100" width="100px;" alt="Max"/><br /><sub><b>Max</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=max-donger" title="Documentation">📖</a> <a href="https://github.com/ethereum/ethereum-org-website/issues?q=author%3Amax-donger" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/LuozhuZhang"><img src="https://avatars.githubusercontent.com/u/70309026?v=4?s=100" width="100px;" alt="Luozhu"/><br /><sub><b>Luozhu</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=LuozhuZhang" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/LuozhuZhang"><img src="https://avatars.githubusercontent.com/u/70309026?v=4?s=100" width="100px;" alt="Luozhu"/><br /><sub><b>Luozhu</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=LuozhuZhang" title="Documentation">📖</a> <a href="#ideas-LuozhuZhang" title="Ideas, Planning, & Feedback">🤔</a></td>
</tr>
<tr>
<td align="center"><a href="http://www.linkedin.com/in/sharma-yash"><img src="https://avatars.githubusercontent.com/u/44340561?v=4?s=100" width="100px;" alt="Yash Sharma "/><br /><sub><b>Yash Sharma </b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=yash-sharma1" title="Documentation">📖</a></td>
Expand Down Expand Up @@ -1520,6 +1520,13 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="http://sahilaujla.com"><img src="https://avatars.githubusercontent.com/u/83442423?v=4?s=100" width="100px;" alt="Sahil Aujla"/><br /><sub><b>Sahil Aujla</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=SahilAujla" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/ritave"><img src="https://avatars.githubusercontent.com/u/1614945?v=4?s=100" width="100px;" alt="Olaf Tomalka"/><br /><sub><b>Olaf Tomalka</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=ritave" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/armgp"><img src="https://avatars.githubusercontent.com/u/49094298?v=4?s=100" width="100px;" alt="Abhiram G P"/><br /><sub><b>Abhiram G P</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=armgp" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/aelmanaa"><img src="https://avatars.githubusercontent.com/u/4503543?v=4?s=100" width="100px;" alt="Amine E."/><br /><sub><b>Amine E.</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=aelmanaa" title="Documentation">📖</a></td>
<td align="center"><a href="https://roshan.ml/"><img src="https://avatars.githubusercontent.com/u/43182697?v=4?s=100" width="100px;" alt="Roshan R Chandar"/><br /><sub><b>Roshan R Chandar</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=Roshan-R" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/mossow"><img src="https://avatars.githubusercontent.com/u/9072132?v=4?s=100" width="100px;" alt="mossow"/><br /><sub><b>mossow</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=mossow" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/OpenWJY"><img src="https://avatars.githubusercontent.com/u/29328336?v=4?s=100" width="100px;" alt="yujingwei"/><br /><sub><b>yujingwei</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=OpenWJY" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="http://olshansky.info"><img src="https://avatars.githubusercontent.com/u/1892194?v=4?s=100" width="100px;" alt="Daniel Olshansky"/><br /><sub><b>Daniel Olshansky</b></sub></a><br /><a href="https://github.com/ethereum/ethereum-org-website/commits?author=Olshansk" title="Documentation">📖</a> <a href="#ideas-Olshansk" title="Ideas, Planning, & Feedback">🤔</a></td>
</tr>
</tbody>
</table>
Expand Down
13 changes: 6 additions & 7 deletions docs/best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Markdown will be translated as whole pages of content, so no specific action is

- _tl;dr Each individual JSON entry should be a complete phrase by itself_

- This is done using the `Translation` component. However there is an alternative method for regular JS: `gatsby-theme-i18n` with `/src/utils/translations.ts`
- This is done using the `Translation` component. However there is an alternative method for regular JS: using the `t` function from `gatsby-plugin-react-i18next`

- **Method one: `<Translation />` component (preferred if only needed in JSX)**

Expand All @@ -63,19 +63,18 @@ Markdown will be translated as whole pages of content, so no specific action is
;<Translation id="language-json-key" />
```

- **Method two: `translateMessageId()`**
- **Method two: `t()`**

```tsx
import { useIntl } from "react-intl"
import { translateMessageId } from "src/utils/translations"
import { useTranslation } from "gatsby-plugin-react-i18next"

// Utilize anywhere in JS using
const intl = useIntl()
translateMessageId("language-json-key", intl)
const { t } = useTranslation()
t("language-json-key")
```

```tsx
const siteTitle = translateMessageId("site-title", intl)
const siteTitle = t("site-title")
```

## React Hooks
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ethereum-org-website",
"version": "6.10.2",
"version": "6.12.0",
"description": "Website of ethereum.org",
"main": "index.js",
"repository": "[email protected]:ethereum/ethereum-org-website.git",
Expand Down
32 changes: 32 additions & 0 deletions src/@chakra-ui/gatsby-plugin/components/Tabs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import type { ComponentStyleConfig } from "@chakra-ui/theme"

export const Tabs: ComponentStyleConfig = {
variants: {
primary: {
tab: {
borderTopRadius: "0.3rem",
borderBottom: "1px solid",
borderBottomColor: "primary",
px: 4,
py: "0.3rem",
_selected: {
color: "background",
bg: "primary",
},
},
tabpanels: {
mt: 4,
},
tabpanel: {
p: 6,
bg: "ednBackground",
border: "1px solid",
borderColor: "lightBorder",
borderRadius: "lg",
},
},
},
defaultProps: {
variant: "primary",
},
}
2 changes: 2 additions & 0 deletions src/@chakra-ui/gatsby-plugin/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import { Link } from "./Link"
import { Tag } from "./Tag"
import { Modal } from "./Modal"
import { Checkbox } from "./Checkbox"
import { Tabs } from "./Tabs"

export default {
Button,
Link,
Tag,
Modal,
Checkbox,
Tabs,
}
89 changes: 38 additions & 51 deletions src/components/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
@@ -1,53 +1,11 @@
import React from "react"
import styled from "@emotion/styled"
import { Box, UnorderedList, ListItem } from "@chakra-ui/react"
import { useIntl } from "react-intl"

import Link from "./Link"
import { isLang, supportedLanguages } from "../utils/languages"
import { isTranslationKey, translateMessageId } from "../utils/translations"

const ListContainer = styled.nav`
margin-bottom: 2rem;
list-style-type: none;
/* Avoid header overlap: */
position: relative;
z-index: 1;
`

const List = styled.ol`
margin: 0;
list-style-type: none;
display: flex;
flex-wrap: wrap;
`

const ListItem = styled.li`
margin: 0;
margin-right: 0.5rem;
font-size: 0.875rem;
line-height: 140%;
letter-spacing: 0.04em;
`

const Slash = styled.span`
margin-left: 0.5rem;
color: ${(props) => props.theme.colors.textTableOfContents};
`

const CrumbLink = styled(Link)`
text-decoration: none;
color: ${(props) => props.theme.colors.textTableOfContents};

&:hover {
text-decoration: none;
color: ${(props) => props.theme.colors.primary};
}

&.active {
color: ${(props) => props.theme.colors.primary};
}
`

export interface IProps {
slug: string
startDepth?: number
Expand Down Expand Up @@ -91,21 +49,50 @@ const Breadcrumbs: React.FC<IProps> = ({
})

return (
<ListContainer aria-label="Breadcrumb" dir="auto" {...restProps}>
<List>
<Box
aria-label="Breadcrumb"
dir="auto"
{...restProps}
as="nav"
marginBottom={8}
listStyleType="none"
position="relative"
zIndex={1}
>
<UnorderedList
display="flex"
flexWrap="wrap"
listStyleType="none"
margin={0}
>
{crumbs.map((crumb, idx) => (
<ListItem key={idx}>
<CrumbLink
<ListItem
key={idx}
margin={0}
marginRight={2}
fontSize="sm"
lineHeight="140%"
letterSpacing="wider"
>
<Link
to={crumb.fullPath}
isPartiallyActive={slug === crumb.fullPath}
textDecoration="none"
color="textTableOfContents"
_hover={{ color: "primary", textDecor: "none" }}
_active={{ color: "primary" }}
>
{crumb.text}
</CrumbLink>
{idx < crumbs.length - 1 && <Slash>/</Slash>}
</Link>
{idx < crumbs.length - 1 && (
<Box as="span" marginLeft={2} color="textTableOfContents">
/
</Box>
)}
</ListItem>
))}
</List>
</ListContainer>
</UnorderedList>
</Box>
)
}

Expand Down
Loading