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

Layer 2 page #5656

Merged
merged 94 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
9f1948b
initial commit setting up layer-2 page
corwintines Feb 28, 2022
144d119
header setup
corwintines Feb 28, 2022
4ec816b
Merge branch 'dev' into layer-2-page
corwintines Mar 1, 2022
0de64e7
layer 2 content
corwintines Mar 11, 2022
0ba98a2
Merge branch 'dev' into layer-2-page
corwintines Mar 11, 2022
6b9a594
layer2 product cards
corwintines Mar 11, 2022
63590f5
add cex data
corwintines Mar 11, 2022
e74920c
move tips and tools into cards
corwintines Mar 13, 2022
ba0f831
Use layer 2s without apostrophe
samajammin Mar 14, 2022
f2ad221
Merge branch 'layer-2-page' of https://github.com/ethereum/ethereum-o…
corwintines Mar 14, 2022
1bc876a
sam change requests for layer-2 page
corwintines Mar 16, 2022
ee8714c
sam change requests for layer-2 page
corwintines Mar 16, 2022
7a9b9b8
copy and grammer edits to layer-2
corwintines Mar 16, 2022
2b44f26
Merge branch 'dev' into layer-2-page
corwintines Mar 16, 2022
6854c78
design change requests
corwintines Mar 18, 2022
dfcee4e
bring in layer 2 logos
corwintines Mar 18, 2022
784af62
stats box
corwintines Mar 21, 2022
510f071
exchange/bridge selection component
corwintines Mar 22, 2022
cb83c86
capitalize bullet points
corwintines Mar 22, 2022
259326b
better initial state
corwintines Mar 22, 2022
8473a66
fix bug and resize image
corwintines Mar 22, 2022
38a56a8
product card images fixed
corwintines Mar 22, 2022
06c5282
Merge branch 'dev' into layer-2-page
corwintines Mar 22, 2022
87ef7e6
add space back in
corwintines Mar 22, 2022
03ab0c7
placeholder art
corwintines Mar 22, 2022
364e9ac
play with flex
corwintines Mar 22, 2022
9ca969f
design refactor
corwintines Mar 23, 2022
c0200c2
Update src/pages/layer-2.js
corwintines Mar 23, 2022
61fc87a
new chain image with no size
nloureiro Mar 23, 2022
082cc7d
Merge branch 'layer-2-page' of https://github.com/ethereum/ethereum-o…
nloureiro Mar 23, 2022
ade308f
Update src/pages/layer-2.js
corwintines Mar 23, 2022
872307f
Update src/pages/layer-2.js
corwintines Mar 23, 2022
549f9da
Update src/pages/layer-2.js
corwintines Mar 23, 2022
1dd601b
Update src/pages/layer-2.js
corwintines Mar 23, 2022
abff774
Update src/pages/layer-2.js
corwintines Mar 23, 2022
866aa1e
Update src/pages/layer-2.js
corwintines Mar 23, 2022
08eb5d0
change from ButtonLink to Link in Layer2ProductCard
corwintines Mar 23, 2022
6ab46f4
Merge branch 'layer-2-page' of https://github.com/ethereum/ethereum-o…
corwintines Mar 23, 2022
6bdf4d7
reorder links in Layer2ProductCard
corwintines Mar 23, 2022
3580d31
Break out "how it works" and "use layer 2" sections
samajammin Mar 25, 2022
182f7b8
Tweak copy
samajammin Mar 25, 2022
124b0eb
Ori change requests for layer-2 page
corwintines Mar 28, 2022
a43a3bf
Norswap feedback layer-2 page
corwintines Mar 28, 2022
06e51a7
update l2beat url to risk view
corwintines Mar 28, 2022
9158b10
Merge branch 'layer-2-page' into layer-2-page-tweaks
corwintines Mar 28, 2022
f5d22dd
change requests
corwintines Mar 28, 2022
eb2593b
Merge pull request #5756 from ethereum/layer-2-page-tweaks
corwintines Mar 28, 2022
a05f3a8
added new image and bigger space for it
nloureiro Mar 29, 2022
84e42d8
image retouched to work a better on light theme
nloureiro Mar 29, 2022
98e838b
left column on section and missing image
nloureiro Mar 29, 2022
8356e0a
changed h2 text
nloureiro Mar 29, 2022
9abd4c3
images for layer-2 page
corwintines Mar 29, 2022
3dc2d06
import new graphics
corwintines Mar 29, 2022
fb61bfd
design change requests
corwintines Mar 29, 2022
154130c
add bridge wallets for layer 2s
corwintines Mar 30, 2022
46ca9fe
cache data
corwintines Mar 30, 2022
7672feb
added new paragraph and 2 column section
nloureiro Mar 30, 2022
03a7837
changed the order of the content
nloureiro Mar 30, 2022
fd9b09c
add event tracking
corwintines Mar 30, 2022
24b789e
center text
corwintines Mar 30, 2022
74aca95
copy changes based on feedback from taxmeifyoucan
corwintines Mar 30, 2022
11e2c35
OrderedList component
corwintines Mar 30, 2022
888c073
Merge branch 'dev' into layer-2-page
corwintines Mar 30, 2022
118a122
Update src/pages/layer-2.js
corwintines Mar 30, 2022
f304db6
Update src/pages/layer-2.js
corwintines Mar 30, 2022
365e4e9
Update src/pages/layer-2.js
corwintines Mar 30, 2022
33831a7
Update src/pages/layer-2.js
corwintines Mar 30, 2022
1f48492
Update src/pages/layer-2.js
corwintines Mar 30, 2022
0188ffd
add larger gap for TwoColumnFlex
corwintines Mar 30, 2022
3921d81
Add wallet callout
samajammin Mar 30, 2022
3ea1269
Update src/pages/layer-2.js
corwintines Mar 30, 2022
44b32e9
Update src/pages/layer-2.js
corwintines Mar 30, 2022
2164e1c
Update src/pages/layer-2.js
corwintines Mar 30, 2022
81c42f9
Update src/pages/layer-2.js
corwintines Mar 30, 2022
34fd527
Update src/pages/layer-2.js
corwintines Mar 30, 2022
2a0758a
changes
corwintines Mar 30, 2022
15b0091
Copy updates to L2 page
samajammin Mar 30, 2022
e6b78d8
Merge branch 'dev' into layer-2-page
corwintines Mar 31, 2022
f6696ed
Update src/pages/layer-2.js
corwintines Mar 31, 2022
dc5e58e
change requests
corwintines Mar 31, 2022
c9610cc
Merge branch 'layer-2-page' of https://github.com/ethereum/ethereum-o…
corwintines Mar 31, 2022
54c4314
new hero and title
corwintines Mar 31, 2022
b230e23
Update src/pages/layer-2.js
corwintines Mar 31, 2022
96ee9da
minor changes
corwintines Mar 31, 2022
8da239b
label change
corwintines Mar 31, 2022
9b30926
uncomment l2beat fetch
corwintines Mar 31, 2022
cb7f760
Update src/pages/layer-2.js
corwintines Mar 31, 2022
05b8b9d
Update src/pages/layer-2.js
corwintines Mar 31, 2022
d4c06b5
Update src/pages/layer-2.js
corwintines Mar 31, 2022
c865723
Update src/pages/layer-2.js
corwintines Mar 31, 2022
df7010e
Update src/pages/layer-2.js
corwintines Mar 31, 2022
5bb614b
Update src/pages/layer-2.js
corwintines Mar 31, 2022
c8d8156
Update src/pages/layer-2.js
corwintines Mar 31, 2022
e796b77
formatting and styling
corwintines Mar 31, 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
Binary file added src/assets/layer-2/arbitrum.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/boba.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/chainlist.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/debank.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/dydx.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/l2beat.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/loopring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/metis-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/metis-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/optimism.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/rollup-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/rollup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/zapper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/zerion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/zkspace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/layer-2/zksync.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ const Footer = () => {
to: `/dapps/`,
text: "decentralized-applications-dapps",
},
{
to: "/layer-2/",
text: "layer-2",
},
{
to: "/run-a-node/",
text: "run-a-node",
Expand Down
130 changes: 130 additions & 0 deletions src/components/Layer2ProductCard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
// Libraries
import React from "react"
import styled from "styled-components"
import { GatsbyImage } from "gatsby-plugin-image"

// Components
import ButtonLink from "./ButtonLink"

// Styles
const ImageWrapper = styled.div`
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
background: ${(props) => props.background};
box-shadow: inset 0px -1px 0px rgba(0, 0, 0, 0.1);
min-height: 200px;
`

const Image = styled(GatsbyImage)`
width: 100%;
align-self: center;
max-width: 372px;
max-height: 257px;
@media (max-width: ${(props) => props.theme.breakpoints.s}) {
max-width: 311px;
}
`

const Card = styled.div`
color: ${(props) => props.theme.colors.text};
box-shadow: 0px 14px 66px rgba(0, 0, 0, 0.07);
display: flex;
flex-direction: column;
justify-content: space-between;
background: ${(props) => props.theme.colors.searchBackground};
border-radius: 4px;
border: 1px solid ${(props) => props.theme.colors.lightBorder};
text-decoration: none;
&:hover {
transition: transform 0.1s;
transform: scale(1.02);
}
`

const Content = styled.div`
padding: 1.5rem;
text-align: left;
height: 100%;
display: flex;
flex-direction: column;
`

const Title = styled.h3`
margin-top: ${(props) => (props.gitHidden ? "2rem" : "3rem")};
margin-bottom: 0.75rem;
`

const Description = styled.p`
opacity: 0.8;
font-size: ${(props) => props.theme.fontSizes.s};
margin-bottom: 0.5rem;
line-height: 140%;
`

const StyledButtonLink = styled(ButtonLink)`
margin: 0.5rem;
`

const Children = styled.div`
margin-top: 1rem;
`

const Layer2ProductCard = ({
url,
background,
image,
name,
description,
note = "",
alt = "",
children,
bridge,
tokenLists,
ecosystemPortal,
}) => {
// Check if image is an svg as gatsby-plugin-image doesn't support svg
let isSvg = false
if (typeof image === "string") {
if (image.includes("svg")) {
isSvg = true
}
}

return (
<Card>
<ImageWrapper background={background}>
<Image image={image} alt={alt} objectFit="contain" />
</ImageWrapper>
<Content className="hover">
<div>
<Title>{name}</Title>
<Description>{description}</Description>
{note.length > 0 && <Description>Note: {note}</Description>}
</div>
{children && <Children>{children}</Children>}
</Content>
{ecosystemPortal && (
<StyledButtonLink to={bridge} hideArrow={true}>
{name} Ecosystem Portal
</StyledButtonLink>
)}
{tokenLists && (
<StyledButtonLink to={bridge} hideArrow={true}>
{name} Token Lists
</StyledButtonLink>
)}
{bridge && (
<StyledButtonLink to={bridge} hideArrow={true}>
{name} Bridge
</StyledButtonLink>
)}
<StyledButtonLink to={url} hideArrow={true}>
Explore {name}
</StyledButtonLink>
</Card>
)
}

export default Layer2ProductCard
4 changes: 4 additions & 0 deletions src/components/Nav/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ const Nav = ({ handleThemeChange, isDarkTheme, path }) => {
text: "decentralized-applications-dapps",
to: "/dapps/",
},
{
text: "layer-2",
to: "/layer-2/",
},
{
text: "run-a-node",
to: "/run-a-node/",
Expand Down
1 change: 1 addition & 0 deletions src/components/Pill.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const Primary = styled.div`
text-align: center;
display: inline-block;
padding: 0.25rem 0.5rem;
margin-right: 0.5rem;
font-size: 0.75rem;
border-radius: 0.25rem;
`
Expand Down
4 changes: 3 additions & 1 deletion src/components/ProductCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ const ProductCard = ({
image,
name,
description,
note = "",
alt = "",
children,
githubUrl = "",
Expand Down Expand Up @@ -176,7 +177,7 @@ const ProductCard = ({
{isSvg ? (
<img src={image} alt={alt} />
) : (
<Image image={image} alt={alt} />
<Image image={image} alt={alt} objectFit="contain" />
)}
</ImageWrapper>
<Content className="hover">
Expand All @@ -186,6 +187,7 @@ const ProductCard = ({
)}
<Title gitHidden={!hasRepoData}>{name}</Title>
<Description>{description}</Description>
{note.length > 0 && <Description>Note: {note}</Description>}
Copy link
Contributor

@minimalsm minimalsm Mar 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think having these notes directly on the cards makes sense. Seems far too in the weeds for the users we are targeting.

Screenshot 2022-03-14 at 12 37 13

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I think they still have a place on these cards. Does seem a bit dishonest leaving it out to me.

</div>
{children && <Children>{children}</Children>}
</Content>
Expand Down
2 changes: 0 additions & 2 deletions src/components/ProductList.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import Translation from "./Translation"

const Product = styled.div`
width: 100%;
margin-bottom: 2rem;
margin-top: 4rem;
`

const Item = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion src/components/RollupProductDevDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Link from "./Link"
import Translation from "./Translation"

// Data
import rollups from "../data/layer-2.json"
import rollups from "../data/layer-2/layer-2.json"

// Styles
const H4 = styled.h4`
Expand Down
62 changes: 0 additions & 62 deletions src/data/layer-2.json

This file was deleted.

32 changes: 32 additions & 0 deletions src/data/layer-2/cex-layer-2-support.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
[
{
"name": "Binance",
"supports_withdrawals": ["Arbitrum"],
"supports_deposits": ["Arbitrum"],
"url": "https://www.binance.com/"
},
{
"name": "Crypto.com",
"supports_withdrawals": ["Arbitrum"],
"supports_deposits": ["Arbitrum"],
"url": "https://crypto.com/"
},
{
"name": "OKX",
"supports_withdrawals": ["Arbitrum"],
"supports_deposits": ["Arbitrum"],
"url": "https://www.okx.com/"
},
{
"name": "FTX",
"supports_withdrawals": ["Arbitrum"],
"supports_deposits": ["Arbitrum"],
"url": "https://ftx.com/"
},
{
"name": "Huobi",
"supports_withdrawals": ["Arbitrum"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huobi also supports withdrawals and deposits into Optimism. https://www.huobi.com/support/en-us/detail/24902339096439?invite_code=vdcu7

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed! Thanks!

"supports_deposits": ["Arbitrum"],
"url": "https://www.huobi.com/"
}
]
Loading