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

update add dapp page #201

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
77 changes: 10 additions & 67 deletions features/AddDapp/Hero/Hero.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
import {
Stack,
Link as CharkaLink,
Flex,
Box,
Heading,
Button,
Image,
Icon,
IconProps,
Text,
} from '@chakra-ui/react';
import Link from 'next/link';
import { FaGithub } from 'react-icons/fa';
import { Stack, Flex, Box, Heading, Image, Icon, IconProps } from '@chakra-ui/react';

export default function Hero() {
return (
Expand All @@ -21,7 +8,7 @@ export default function Hero() {
spacing={{ base: 2, md: 10 }}
direction={{ base: 'column', md: 'row' }}
>
<Stack flex={1} spacing={{ base: 3 }} pt={{ base: 4, md: 14 }}>
<Stack flex={1} spacing={{ base: 5 }} pt={{ base: 4, md: 40 }}>
<Heading
fontWeight={700}
fontSize="18px"
Expand All @@ -32,59 +19,15 @@ export default function Hero() {
Become a part of our community
</Heading>
<Stack spacing={{ base: 8, md: 10 }}>
<Stack spacing={{ base: 8, md: 6 }}>
<Heading
lineHeight={1.2}
fontWeight={700}
fontSize={{ base: '5xl', lg: '64px' }}
textAlign={{ base: 'center', md: 'initial' }}
mt={0}
>
Add your dApp
</Heading>
<Text
fontSize={{ base: 'md', md: 'lg' }}
color="whiteAlpha.700"
textAlign={{ base: 'center', md: 'left' }}
>
We have a step-by-step guide for non tech-savvy users of how to do the dapp
submition. Just user follow the instructions down below. It's really simple. Pro
users can jump directly to Sigmaverse's Github repo.
</Text>
</Stack>
<Stack
spacing={{ base: 4, sm: 6 }}
direction={{ base: 'column', md: 'row' }}
display="flex"
justifyContent={{ base: 'center', md: 'flex-start' }}
align={{ base: 'center', md: 'flex-start' }}
<Heading
lineHeight={1.2}
fontWeight={700}
fontSize={{ base: '5xl', lg: '64px' }}
textAlign={{ base: 'center', md: 'initial' }}
mt={0}
>
<Link href="/all-projects">
<Button
size={'lg'}
color="black"
bg="white"
colorScheme={'white'}
fontWeight={'600'}
px={6}
>
Browse All Projects
</Button>
</Link>
<Button
as="a"
href="https://github.com/ergoplatform/sigmaverse"
target="_blank"
size={'lg'}
colorScheme="white"
variant="outline"
fontWeight={'600'}
px={6}
leftIcon={<FaGithub />}
>
Jump to Github
</Button>
</Stack>
Add your dApp
</Heading>
</Stack>
</Stack>
<Flex
Expand Down
1 change: 0 additions & 1 deletion features/AddDapp/PrepareImages/PrepareImages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const PrepareImages = () => {
display={{ base: 'flex', md: 'flex' }}
>
<Stack spacing={4} align={'center'} textAlign={{ base: 'center', md: 'left' }}>
<img src="/images/ArrowDown.svg" alt="Logo Image" />
<Heading textAlign={'center'} fontSize={'5xl'} maxWidth={'700px'}>
Prepare Images
</Heading>
Expand Down
206 changes: 57 additions & 149 deletions features/AddDapp/UploadFiles/UploadFiles.tsx
Original file line number Diff line number Diff line change
@@ -1,97 +1,17 @@
import { Box, Grid, GridItem, Heading, Stack, Text } from '@chakra-ui/react';
import {
Button,
Container,
FormControl,
FormHelperText,
FormLabel,
Grid,
Heading,
Input,
Stack,
Textarea,
} from '@chakra-ui/react';
import React, { useState } from 'react';

const tabs = [
{
text: (
<>
Go to <b>applications</b> folder
</>
),
image: '/images/tabs/Step 1.png',
},
{
text: (
<>
Look for <b>1010s</b> folder
</>
),
image: '/images/tabs/Step 2.png',
},
{
text: (
<>
Find the <b>overview.md</b> file and press the <b>Copy raw contents</b> button
</>
),
image: '/images/tabs/Step 3.png',
},
{
text: (
<>
Using any editing tool (atom, notepad etc), paste the copied info from overview.md file and
update with your dApp’s related info: name, description, website, logo image, preview image
and category
</>
),
image: '/images/tabs/Step 4.png',
},
{
text: (
<>
Save file as <b>overview.md</b> and put in one project folder including logo and preview
image assets
</>
),
image: '/images/tabs/Step 5.png',
},
{
text: (
<>
Get back to <b>applications</b> folder and click on <b>Upload Files</b> link
</>
),
image: '/images/tabs/Step 6.png',
},
{
text: <>Drag-and-drop project files into upload area</>,
image: '/images/tabs/Step 7.png',
},
{
text: (
<>
Enter your commit title and press <b>Commit changes</b> button
</>
),
image: '/images/tabs/Step 8.png',
},
{
text: (
<>
After the commit look for <b>contribute</b> section and press on <b>Open pull request</b>
</>
),
image: '/images/tabs/Step 9.png',
},
{
text: (
<>
In <b>Comparing changes</b> page press on <b>Create pull request</b>
</>
),
image: '/images/tabs/Step 10.png',
},
{
text: (
<>
Right before a final step, review your info and press on final <b>Create pull request</b>{' '}
button
</>
),
image: '/images/tabs/Step 11.png',
},
];

const UploadFiles = () => {
const [tab, setTab] = useState(0);

Expand All @@ -105,66 +25,54 @@ const UploadFiles = () => {
<Stack spacing={4} align={'center'} textAlign={{ base: 'center', md: 'left' }}>
<img src="/images/ArrowDown.svg" alt="Logo Image" />
<Heading textAlign={'center'} fontSize={'5xl'} maxWidth={'700px'}>
Edit and Upload Files
Fill the form below
</Heading>
<Text textAlign={'center'} color="rgba(255, 255, 255, 0.75)" maxWidth={'650px'}>
Prepare overview.md file by getting our template one and updating with your dApp’s
credential info. Here’s a flow to follow:
</Text>
</Stack>
<Grid templateColumns={{ base: '1fr', md: '1fr 1fr' }} gap={{ base: 12, md: 8 }}>
<GridItem>
{tabs.map(({ text, image }, index) => (
<Box
background={
index === tab
? 'linear-gradient(90deg, rgba(122, 100, 255, 0.25) 0%, rgba(173, 93, 254, 0.25) 100%)'
: ''
}
cursor="pointer"
borderRadius="10px"
p="15px"
onClick={() => setTab(index)}
key={image}
display="flex"
alignItems="center"
>
{' '}
<Box
borderRadius="30px"
background="#8854F5"
minWidth="28px"
height="28px"
color="#D8CEFF"
display="flex"
justifyContent="center"
alignItems="center"
mr="4"
fontWeight={'500'}
fontSize="18px"
>
{index + 1}
</Box>
<Text fontSize="14px" color="rgba(255, 255, 255, 0.75);">
{text}
</Text>
</Box>
))}
</GridItem>
<GridItem>
<Stack spacing={'6'}>
<Box
position={'relative'}
rounded={'2xl'}
width={'100%'}
maxWidth={'100%'}
overflow={'hidden'}
>
<img src={tabs[tab].image} alt="Preview Image" />
</Box>
<Container maxW="550px" bg="purple.700" color="white" borderRadius="2xl">
<form>
<Stack padding={{ base: 4, md: 8 }} gap={{ base: 2 }}>
<FormControl>
<FormLabel>Your email</FormLabel>
<Input type="email" />
<FormHelperText>
Not required. We will contact you if we need more info.
</FormHelperText>
</FormControl>
<FormControl>
<FormLabel>Project name</FormLabel>
<Input type="text" name="projectName" placeholder="Sigmaverse" />
</FormControl>
<FormControl>
<FormLabel>Description</FormLabel>
<Textarea name="projectDescription" placeholder="Your portal to Ergo universe" />
</FormControl>
<FormControl>
<FormLabel>Website</FormLabel>
<Input type="email" placeholder="sigmaverse.io" />
</FormControl>
<FormControl>
<FormLabel>Logotype</FormLabel>
<Input type="file" />
<FormHelperText>
The dimensions for logo image should be minimal as <b>88x88</b> pixels.
</FormHelperText>
</FormControl>
<FormControl>
<FormLabel>Preview</FormLabel>
<Input type="file" />
<FormHelperText>
For the best image quality experience, image dimensions should be <b>1560x880</b>{' '}
pixels.{' '}
</FormHelperText>
</FormControl>
<FormControl>
<Button bg="white" color="black" type="submit">
Submit
</Button>
</FormControl>
</Stack>
</GridItem>
</Grid>
</form>
</Container>
</Stack>
);
};
Expand Down
2 changes: 1 addition & 1 deletion pages/add-dapp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Home = () => {
<Container maxW={'6xl'} className="container" position={'relative'} zIndex={10}>
<Header />
<Hero />
<FastestWay />
{/* <FastestWay /> */}
<PrepareImages />
<UploadFiles />
<Done />
Expand Down