Skip to content

Commit

Permalink
Modify Home page, more ui
Browse files Browse the repository at this point in the history
  • Loading branch information
tonytc13579 committed Jan 3, 2024
1 parent 5f92d00 commit b7e66f3
Show file tree
Hide file tree
Showing 8 changed files with 613 additions and 21 deletions.
1 change: 1 addition & 0 deletions src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ export const isDevelop: boolean = APP_ENV === 'develop';
export const isLocal: boolean = APP_ENV === 'local';

export const CDN_URL_ICONS: string = CDN_URL + '/nbc/icons/bvm-icons';
export const CDN_APP_ICON_URL: string = CDN_URL + '/l2aas/icons';

export { MetadataConfig, ViewportConfig };
49 changes: 30 additions & 19 deletions src/modules/home/Section_4/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
import {
Box,
Center,
Divider,
Flex,
HStack,
Image,
StackDivider,
Text,
VStack,
} from '@chakra-ui/react';
Expand Down Expand Up @@ -37,46 +39,55 @@ const CONTENTS = [
const Section_4 = () => {
const renderContent = (item: IContent, index: number) => {
return (
<HStack key={item.title}>
<VStack key={item.title} spacing={['16px']} alignItems={'flex-start'}>
<Text fontSize={['16px']} fontWeight={700} color={'#00C250'}>
{`0${index + 1}.`}
</Text>
<Text fontSize={['20px']} fontWeight={500} color={'#000'}>
{index + 1}
{item.title}
</Text>
<Box>
<Text fontSize={['22px']} fontWeight={500} color={'#000'}>
{item.title}
</Text>
<Text fontSize={['20px']} color={'#000'}>
{item.description}
</Text>
</Box>
</HStack>
<Text fontSize={['16px']} fontWeight={400} color={'#000'}>
{item.description}
</Text>
</VStack>
);
};
return (
<Box bgColor={'#F3F1E8'} display={'flex'} flexDirection={'column'}>
<Box
bgColor={'#fff'}
display={'flex'}
flexDirection={'column'}
py={['120px']}
px={['160px']}
>
<HStack
display={'flex'}
flexDirection={'row'}
className="maxWidth"
alignSelf={'center'}
bgColor={'lightcyan'}
spacing={['50px']}
spacing={['70px']}
>
<Flex flex={1}>
<Image src="/images/image_section_3.png" />
</Flex>
<Flex flex={1} flexDirection={'column'}>
<Text fontSize={['38px']} color={'#000'}>
A no-code tool for building a full-featured Bitcoin L2 blockchain.
<Text fontSize={['48px']} color={'#000'}>
<Text fontSize={['48px']} color={'#00C250'} as="span">
A no-code tool
</Text>{' '}
for building a full-featured Bitcoin L2 blockchain.
</Text>
<Box height={['20px']}></Box>
<VStack
display={'flex'}
justifyContent={'flex-start'}
alignItems={'flex-start'}
spacing={['20px']}
divider={<StackDivider borderColor="gray.200" />}
>
{CONTENTS.map(renderContent)}
</VStack>
</Flex>
<Flex flex={1}>
<Image src="/images/image_section_3.png" />
</Flex>
</HStack>
</Box>
);
Expand Down
84 changes: 84 additions & 0 deletions src/modules/home/Section_5/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
'use client';

import {
Box,
Flex,
HStack,
Image,
List,
ListIcon,
ListItem,
Text,
UnorderedList,
} from '@chakra-ui/react';

const News = {
content: [
'Earn sequencer fees',
'Have dedicated throughput',
'Offer low transaction fees to your users',
'Complete control over gas fee, gas block limit, and withdrawal periods',
'And more',
],
};

const Section_5 = () => {
return (
<Box bgColor={'#fff'} display={'flex'} flexDirection={'column'}>
<HStack
display={'flex'}
flexDirection={'row'}
className="maxWidth"
alignSelf={'center'}
spacing={['80px']}
>
<Flex flex={1}>
<Image src="/images/image_section_2.png" />
</Flex>
<Flex flex={1} flexDirection={'column'}>
<Text fontSize={['48px']} color={'#000'}>
Why launch
<Text fontSize={['48px']} color={'#00C250'} as="span">
{' '}
your own blockchain?{' '}
</Text>{' '}
</Text>
<Box height={['12px']} />
<Text fontSize={['16px']} fontWeight={400} color={'#000'}>
Whatever your vision — a dapp, a fully onchain game, a DEX, or an
ecosystem — there are many benefits of running your own blockchain.
</Text>
<Box height={['32px']} />
<Box
bgColor={'#F2FCF6'}
padding={['24px']}
border={'1px solid #C2F0D5'}
color={'#000'}
>
<List spacing={['20px']}>
{News.content.map((item) => (
<ListItem
flexDir={'row'}
display={'flex'}
alignItems={'center'}
>
<Box
w={'8px'}
h={'8px'}
borderRadius={100}
bgColor={'#00C250'}
marginRight={'12px'}
></Box>
{item || ''}
</ListItem>
))}
</List>
</Box>
</Flex>
</HStack>
<Box height={['120px']} />
</Box>
);
};

export default Section_5;
119 changes: 119 additions & 0 deletions src/modules/home/Section_6/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
'use client';

import { CDN_APP_ICON_URL } from '@/config';
import {
Box,
Flex,
HStack,
Image,
ListItem,
Text,
UnorderedList,
} from '@chakra-ui/react';

interface IContent {
title: string;
icon: string;
description: string;
}

const CONTENTS: Array<IContent> = [
{
title: 'Unlimited throughput',
description:
'Hyperscale Bitcoin with an unlimited number of Bitcoin Virtual Machines as Bitcoin L2 blockchains.',
icon: 'reinvention_13.png',
},
{
title: 'Infinite applications',
description:
'Bitcoin Virtual Machines support Solidity smart contracts on Bitcoin, so you can quickly build all kinds of decentralized applications on Bitcoin.',
icon: 'reinvention_14.png',
},
{
title: 'Fast & cheap',
description:
'Bitcoin Virtual Machines implement rollups on Bitcoin. Rollups significantly reduce the block time and transaction fees.',
icon: 'reinvention_15.png',
},
];

const Section_6 = () => {
const renderItem = (item: IContent) => {
return (
<Flex
key={item.title}
flexDir={'column'}
justify={'center'}
p={['20px']}
flex={1}
bgColor={'#fff'}
>
<Image
src={`${CDN_APP_ICON_URL}/${item.icon}`}
maxW={'360px'}
w={'100%'}
alignSelf={'center'}
/>
<Box h={['20px']}></Box>
<Text
fontSize={['24px']}
align="center"
fontWeight={400}
color={'#000'}
>
{item.title}
</Text>
<Box h={['16px']}></Box>
<Text
fontSize={['16px']}
align="center"
fontWeight={400}
color={'#000'}
>
{item.description}
</Text>
</Flex>
);
};

return (
<Box
bgColor={'#F3F1E8'}
display={'flex'}
flexDirection={'column'}
py={['120px']}
>
<HStack
display={'flex'}
flexDirection={'row'}
className="maxWidth"
alignSelf={'center'}
spacing={['50px']}
>
<Flex flex={1} flexDirection={'column'} justify={'center'}>
<Text fontSize={['48px']} color={'#000'} textAlign={'center'}>
Scalable infrastructure for Bitcoin
</Text>
<Box height={['16px']} />
<Text
fontSize={['20px']}
fontWeight={400}
color={'#000'}
textAlign={'center'}
>
If Ethereum is the world’s computer, Bitcoin is the world’s
supercomputer. With Bitcoin Virtual Machine, anyone can launch their
own Bitcoin L2 blockchain.
</Text>
<Box height={['40px']} />
<Flex padding={['24px']} gap={['36px']}>
{CONTENTS.map(renderItem)}
</Flex>
</Flex>
</HStack>
</Box>
);
};

export default Section_6;
Loading

0 comments on commit b7e66f3

Please sign in to comment.