-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Layer 2 page #5656
Changes from 30 commits
9f1948b
144d119
4ec816b
0de64e7
0ba98a2
6b9a594
63590f5
e74920c
ba0f831
f2ad221
1bc876a
ee8714c
7a9b9b8
2b44f26
6854c78
dfcee4e
784af62
510f071
cb83c86
259326b
8473a66
38a56a8
06c5282
87ef7e6
03ab0c7
364e9ac
9ca969f
c0200c2
61fc87a
082cc7d
ade308f
872307f
549f9da
1dd601b
abff774
866aa1e
08eb5d0
6ab46f4
6bdf4d7
3580d31
182f7b8
124b0eb
a43a3bf
06e51a7
9158b10
f5d22dd
eb2593b
a05f3a8
84e42d8
98e838b
8356e0a
9abd4c3
3dc2d06
fb61bfd
154130c
46ca9fe
7672feb
03a7837
fd9b09c
24b789e
74aca95
11e2c35
888c073
118a122
f304db6
365e4e9
33831a7
1f48492
0188ffd
3921d81
3ea1269
44b32e9
2164e1c
81c42f9
34fd527
2a0758a
15b0091
e6b78d8
f6696ed
dc5e58e
c9610cc
54c4314
b230e23
96ee9da
8da239b
9b30926
cb7f760
05b8b9d
d4c06b5
c865723
df7010e
5bb614b
c8d8156
e796b77
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
This file was deleted.
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"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed! Thanks! |
||
"supports_deposits": ["Arbitrum"], | ||
"url": "https://www.huobi.com/" | ||
} | ||
] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.