forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from ethereum/homepage-mobile
Homepage mobile
- Loading branch information
Showing
70 changed files
with
1,874 additions
and
206 deletions.
There are no files selected for viewing
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { Image, Stack } from '@chakra-ui/react'; | ||
import { FC } from 'react'; | ||
|
||
export const Gopher: FC = () => { | ||
return ( | ||
<Stack alignItems='center' p={4} border='2px solid' borderColor='brand.light.primary'> | ||
<Image src='/images/pages/gopher-home-side-mobile.svg' alt='Gopher greeting' /> | ||
</Stack> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { Box, Button, Flex, Stack, Text } from '@chakra-ui/react'; | ||
import { FC } from 'react'; | ||
import NextLink from 'next/link'; | ||
|
||
import { DOCS_PAGE, DOWNLOADS_PAGE } from '../../../constants'; | ||
|
||
export const HomeHero: FC = () => { | ||
return ( | ||
<Stack border='2px solid' borderColor='brand.light.primary' px={4} py={{ base: 8, md: 5 }}> | ||
<Box mb={4}> | ||
<Box | ||
as='h1' | ||
textStyle='h1' | ||
mb={{ base: 2, md: 4 }} | ||
textAlign={{ base: 'center', md: 'left' }} | ||
> | ||
go-ethereum | ||
</Box> | ||
|
||
<Text textStyle='homepage-description'> | ||
Official Go implementation of the Ethereum protocol | ||
</Text> | ||
</Box> | ||
|
||
<Flex | ||
direction={{ base: 'column', md: 'row' }} | ||
alignItems={{ base: 'center', md: 'flex-start' }} | ||
> | ||
<Flex direction='column' alignItems='center' mr={{ md: 6 }}> | ||
<NextLink href={DOWNLOADS_PAGE} passHref> | ||
<Button variant='primary' as='a' mb={1}> | ||
<Text textStyle='homepage-primary-label'>Download</Text> | ||
</Button> | ||
</NextLink> | ||
|
||
<Text mt={1} mb={5} textStyle='hero-text-small'> | ||
Get our latest releases | ||
</Text> | ||
</Flex> | ||
|
||
<Flex direction='column' alignItems='center'> | ||
<NextLink href={DOCS_PAGE} passHref> | ||
<Button variant='primary' as='a' mb={1}> | ||
<Text textStyle='homepage-primary-label'>Documentation</Text> | ||
</Button> | ||
</NextLink> | ||
|
||
<Text mt={1} fontSize='13px' fontFamily='"Inter", sans-serif' alignSelf='center'> | ||
Read our documentation | ||
</Text> | ||
</Flex> | ||
</Flex> | ||
</Stack> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { Box, Image, Link, Stack, Text } from '@chakra-ui/react'; | ||
import { FC } from 'react'; | ||
import NextLink from 'next/link'; | ||
|
||
interface Props { | ||
imgSrc?: string; | ||
imgAltText?: string; | ||
sectionTitle: string; | ||
linkLabel: string; | ||
buttonHref: string; | ||
children?: React.ReactNode; | ||
} | ||
|
||
export const HomeSection: FC<Props> = ({ | ||
imgSrc, | ||
imgAltText, | ||
sectionTitle, | ||
linkLabel, | ||
buttonHref, | ||
children | ||
}) => { | ||
return ( | ||
<Stack border='2px solid' borderColor='brand.light.primary'> | ||
{!!imgSrc && ( | ||
<Stack alignItems='center' p={4} borderBottom='2px solid' borderColor='brand.light.primary'> | ||
{/* TODO: use NextImage */} | ||
<Image src={imgSrc} alt={imgAltText} /> | ||
</Stack> | ||
)} | ||
|
||
<Stack | ||
p={4} | ||
borderBottom='2px solid' | ||
borderColor='brand.light.primary' | ||
sx={{ mt: '0 !important' }} | ||
> | ||
<Box as='h2' textStyle='h2'> | ||
{sectionTitle} | ||
</Box> | ||
</Stack> | ||
|
||
<Stack | ||
p={4} | ||
spacing={4} | ||
borderBottom='2px solid' | ||
borderColor='brand.light.primary' | ||
sx={{ mt: '0 !important' }} | ||
> | ||
{children} | ||
</Stack> | ||
|
||
<Stack sx={{ mt: '0 !important' }}> | ||
<NextLink href={buttonHref} passHref> | ||
<Link variant='button-link-secondary' isExternal={buttonHref.startsWith('http')}> | ||
<Text textStyle='home-section-link-label'>{linkLabel}</Text> | ||
</Link> | ||
</NextLink> | ||
</Stack> | ||
</Stack> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
import { Box, Grid, GridItem, Link, Stack, Text } from '@chakra-ui/react'; | ||
import { FC } from 'react'; | ||
import NextLink from 'next/link'; | ||
|
||
import { CONTRIBUTING_PAGE, DOCS_PAGE, FAQ_PAGE } from '../../../constants'; | ||
|
||
export const QuickLinks: FC = () => { | ||
return ( | ||
<Stack border='2px solid' borderColor='brand.light.primary'> | ||
<Stack p={4} borderBottom='2px solid' borderColor='brand.light.primary'> | ||
<Box as='h2' textStyle='h2'> | ||
Quick Links | ||
</Box> | ||
</Stack> | ||
|
||
<Grid templateColumns='repeat(2, 1fr)' sx={{ mt: '0 !important' }}> | ||
{/* get started */} | ||
<GridItem | ||
borderRight='2px solid' | ||
borderBottom='2px solid' | ||
borderColor='brand.light.primary' | ||
> | ||
<Stack p={4} h='100%'> | ||
<Text textStyle='quick-link-text' mb={-1}> | ||
Don't know where to start? | ||
</Text> | ||
|
||
<Text textStyle='quick-link-text'>We can help.</Text> | ||
</Stack> | ||
</GridItem> | ||
<GridItem borderBottom='2px solid' borderColor='brand.light.primary'> | ||
<NextLink href={`${DOCS_PAGE}/getting-started`} passHref> | ||
<Link _hover={{ textDecoration: 'none' }}> | ||
<Stack | ||
data-group | ||
bg='green.50' | ||
_hover={{ textDecoration: 'none', bg: 'brand.light.primary', color: 'yellow.50' }} | ||
_focus={{ | ||
textDecoration: 'none', | ||
bg: 'brand.light.primary', | ||
color: 'yellow.50', | ||
boxShadow: 'inset 0 0 0 3px #f0f2e2 !important' | ||
}} | ||
_active={{ | ||
textDecoration: 'none', | ||
bg: 'brand.light.secondary', | ||
color: 'yellow.50' | ||
}} | ||
justifyContent='center' | ||
h='100%' | ||
p={4} | ||
> | ||
<Text textStyle='quick-link-label'>Get started</Text> | ||
</Stack> | ||
</Link> | ||
</NextLink> | ||
</GridItem> | ||
|
||
{/* faq */} | ||
<GridItem | ||
borderRight='2px solid' | ||
borderBottom='2px solid' | ||
borderColor='brand.light.primary' | ||
> | ||
<Stack p={4} h='100%'> | ||
<Text textStyle='quick-link-text' mb={-1}> | ||
Have doubts? | ||
</Text> | ||
|
||
<Text textStyle='quick-link-text'>Check the FAQ section in the documentation.</Text> | ||
</Stack> | ||
</GridItem> | ||
<GridItem borderBottom='2px solid' borderColor='brand.light.primary'> | ||
<NextLink href={FAQ_PAGE} passHref> | ||
<Link _hover={{ textDecoration: 'none' }}> | ||
<Stack | ||
data-group | ||
bg='green.50' | ||
_hover={{ textDecoration: 'none', bg: 'brand.light.primary', color: 'yellow.50' }} | ||
_focus={{ | ||
textDecoration: 'none', | ||
bg: 'brand.light.primary', | ||
color: 'yellow.50', | ||
boxShadow: 'inset 0 0 0 3px #f0f2e2 !important' | ||
}} | ||
_active={{ | ||
textDecoration: 'none', | ||
bg: 'brand.light.secondary', | ||
color: 'yellow.50' | ||
}} | ||
justifyContent='center' | ||
h='100%' | ||
p={4} | ||
> | ||
<Text textStyle='quick-link-label'>Go to the FAQ</Text> | ||
</Stack> | ||
</Link> | ||
</NextLink> | ||
</GridItem> | ||
|
||
{/* how to contribute */} | ||
<GridItem borderRight='2px solid' borderColor='brand.light.primary'> | ||
<Stack p={4} h='100%'> | ||
<Text textStyle='quick-link-text' mb={-1}> | ||
Want to know how to contribute? | ||
</Text> | ||
|
||
<Text textStyle='quick-link-text'>Get more information in the documentation.</Text> | ||
</Stack> | ||
</GridItem> | ||
<GridItem> | ||
<NextLink href={CONTRIBUTING_PAGE} passHref> | ||
<Link _hover={{ textDecoration: 'none' }}> | ||
<Stack | ||
data-group | ||
bg='green.50' | ||
_hover={{ textDecoration: 'none', bg: 'brand.light.primary', color: 'yellow.50' }} | ||
_focus={{ | ||
textDecoration: 'none', | ||
bg: 'brand.light.primary', | ||
color: 'yellow.50', | ||
boxShadow: 'inset 0 0 0 3px #f0f2e2 !important' | ||
}} | ||
_active={{ | ||
textDecoration: 'none', | ||
bg: 'brand.light.secondary', | ||
color: 'yellow.50' | ||
}} | ||
justifyContent='center' | ||
h='100%' | ||
p={4} | ||
> | ||
<Text textStyle='quick-link-label'>How to contribute</Text> | ||
</Stack> | ||
</Link> | ||
</NextLink> | ||
</GridItem> | ||
</Grid> | ||
</Stack> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * from './Gopher'; | ||
export * from './HomeHero'; | ||
export * from './HomeSection'; | ||
export * from './QuickLinks'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// internal pages | ||
export const DOWNLOADS_PAGE = '/downloads'; | ||
export const DOCS_PAGE = '/docs'; | ||
export const FAQ_PAGE = '/docs/faq'; | ||
export const CONTRIBUTING_PAGE = `${DOCS_PAGE}/developers/contributing`; | ||
|
||
// external links | ||
export const ETHEREUM_ORG_URL = 'https://ethereum.org'; | ||
export const ETHEREUM_ORG_RUN_A_NODE_URL = 'https://ethereum.org/en/run-a-node/'; | ||
export const ETHEREUM_FOUNDATION_URL = 'https://ethereum.foundation'; | ||
export const GETH_REPO_URL = 'https://github.com/ethereum/go-ethereum'; | ||
export const GO_URL = 'https://go.dev/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Html, Head, Main, NextScript } from 'next/document'; | ||
|
||
export default function Document() { | ||
return ( | ||
<Html> | ||
<Head> | ||
{/* fonts are being loaded here to enable optimization (https://nextjs.org/docs/basic-features/font-optimization) */} | ||
{/* JetBrains Mono */} | ||
<link rel='preconnect' href='https://fonts.googleapis.com' /> | ||
<link rel='preconnect' href='https://fonts.gstatic.com' crossOrigin='true' /> | ||
<link | ||
href='https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap' | ||
rel='stylesheet' | ||
/> | ||
|
||
{/* Inter */} | ||
<link | ||
href='https://fonts.googleapis.com/css2?family=Inter&display=swap' | ||
rel='stylesheet' | ||
></link> | ||
</Head> | ||
|
||
<body> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</Html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.