diff --git a/public/assets/custom-contract.png b/public/assets/custom-contract.png new file mode 100644 index 00000000..02cea907 Binary files /dev/null and b/public/assets/custom-contract.png differ diff --git a/src/constants/images.ts b/src/constants/images.ts index 7a13ad35..63db349e 100644 --- a/src/constants/images.ts +++ b/src/constants/images.ts @@ -7,6 +7,7 @@ export const GIF_COMPILING = '/assets/compiling.gif' export const SVG_SUCCESSFULLY = '/assets/successfully.svg' export const SVG_AWESOME = '/assets/auto_awesome.svg' export const CHAINS_IMG_PATH = `/assets/chains/` +export const CUSTOM_CONTRACT = '/assets/custom-contract.png' export const TOKEN_PATHS: Record = { psp22: '/assets/token.png', diff --git a/src/constants/menu.ts b/src/constants/menu.ts index a221fb84..a9f80a0e 100644 --- a/src/constants/menu.ts +++ b/src/constants/menu.ts @@ -1,7 +1,8 @@ import { LocalLibrary, SvgIconComponent, - HomeRounded + SettingsSuggestRounded, + DataArrayRounded } from '@mui/icons-material' import { ROUTES } from '@/constants/routes' @@ -15,17 +16,26 @@ export type NavLink = { } const icons = { - HomeRounded, - LocalLibrary + SettingsSuggestRounded, + LocalLibrary, + DataArrayRounded } export const MENU_ITEMS: NavLink[] = [ { id: 'home', - title: 'Home', + title: 'Contract Builder', type: 'item', url: ROUTES.HOME, - icon: icons.HomeRounded, + icon: icons.SettingsSuggestRounded, + target: true + }, + { + id: 'contracts', + title: 'Contracts', + type: 'item', + url: ROUTES.CONTRACTS, + icon: icons.DataArrayRounded, target: true }, { diff --git a/src/pages/contracts/index.tsx b/src/pages/contracts/index.tsx new file mode 100644 index 00000000..e6aae708 --- /dev/null +++ b/src/pages/contracts/index.tsx @@ -0,0 +1,31 @@ +import { Box, Link, Stack, Typography } from '@mui/material' + +export default function Contracts() { + return ( + + + Contracts + + + Sample title + + The Polkadot Contract Wizard is a non-code tool to generate, compile + and deploy smart contracts on Polkadot Ecosystem. It provides{' '} + + standard contracts based on PSP. + + + + + ) +} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 2cd389d3..cb0148c9 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,8 +1,8 @@ import Link from 'next/link' import { Stack, Typography } from '@mui/material' -import { HomeButton } from '@/components' -import { ROUTES, TOKEN_PATHS } from '@/constants/index' +import { HomeButton, HomeButtonCustom } from '@/components' +import { CUSTOM_CONTRACT, ROUTES, TOKEN_PATHS } from '@/constants/index' import { TokenType } from '@/domain' import { useNetworkAccountsContext } from '@/context/NetworkAccountsContext' import { ContractsTableWidget } from '@/view/HomeView/ContractsTableWidget' @@ -31,9 +31,9 @@ function Home() { + + Import your own contract ⚡ + + {accountConnected && } ) diff --git a/src/view/components/HomeButton/CustomContract.tsx b/src/view/components/HomeButton/CustomContract.tsx new file mode 100644 index 00000000..4eeed6f4 --- /dev/null +++ b/src/view/components/HomeButton/CustomContract.tsx @@ -0,0 +1,61 @@ +import * as React from 'react' +import { WrapperButton } from './styled' +import { Typography, Stack, ButtonProps } from '@mui/material' + +import Image from 'next/image' +interface Props extends ButtonProps { + title: string + subtitle: string + imgPath: string + imgProps: { width?: number; height?: number } +} + +export const HomeButtonCustom = (props: Props) => { + const { title, subtitle, imgProps, imgPath, ...restProps } = props + + return ( + + + + {title} + + + + {title} + + + {subtitle} + + + + + ) +} diff --git a/src/view/components/HomeButton/index.tsx b/src/view/components/HomeButton/index.tsx index d4ea834c..c7253faa 100644 --- a/src/view/components/HomeButton/index.tsx +++ b/src/view/components/HomeButton/index.tsx @@ -17,13 +17,13 @@ const WrapperButton = styled(Button)(({ theme }) => ({ color: 'white', fontSize: '1.4rem', borderRadius: '1rem', - width: '85%', + width: '100%', backgroundColor: 'transparent', display: 'flex', alignItems: 'center', margin: '0', position: 'relative', - padding: '2rem', + padding: '1.5rem', border: 'solid 1px transparent', backgroundImage: 'linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)), linear-gradient(180deg, #B214AC, #8C7524)', @@ -52,8 +52,8 @@ export const HomeButton = (props: Props) => { return ( { {title} diff --git a/src/view/components/HomeButton/styled.ts b/src/view/components/HomeButton/styled.ts new file mode 100644 index 00000000..ef3a457c --- /dev/null +++ b/src/view/components/HomeButton/styled.ts @@ -0,0 +1,35 @@ +import { styled } from '@mui/material/styles' +import Button, { ButtonProps } from '@mui/material/Button' + +export const WrapperButton = styled(Button)(({ theme }) => ({ + color: 'white', + fontSize: '1.4rem', + borderRadius: '1rem', + width: '100%', + backgroundColor: 'transparent', + display: 'flex', + alignItems: 'center', + margin: '0', + position: 'relative', + padding: '1.5rem', + border: 'solid 1px transparent', + backgroundImage: + 'linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)), linear-gradient(90deg, #B214AC, #2EB5FD)', + backgroundOrigin: 'border-box', + backgroundClip: 'content-box, border-box', + boxShadow: '2px 1000px 1px #0D0E13 inset', + [theme.breakpoints.down('sm')]: { + width: '100%', + margin: '0.5rem !important', + padding: '1.3rem' + }, + + '&:hover': { + backgroundImage: + 'linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 0)), linear-gradient(90deg, #ffffff, #ffb7ff)', + backgroundOrigin: 'border-box', + backgroundClip: 'content-box, border-box', + boxShadow: + '2px 1000px 1px #11121a inset, 0 4px 20px 2px rgba(241, 83, 255, 0.25)' + } +})) diff --git a/src/view/components/index.ts b/src/view/components/index.ts index 0013260c..e94e1573 100644 --- a/src/view/components/index.ts +++ b/src/view/components/index.ts @@ -1,5 +1,6 @@ export * as Transitions from './Transitions' export * from './HomeButton' +export * from './HomeButton/CustomContract' export * from './LoadingButton/styled' export * from './LoadingButton' export { default as Stepper } from './StepperWrapper'