diff --git a/public/icons/bitcoin.svg b/public/icons/bitcoin.svg new file mode 100644 index 00000000..39fef8b7 --- /dev/null +++ b/public/icons/bitcoin.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/icons/coins.svg b/public/icons/coins.svg new file mode 100644 index 00000000..85cc5989 --- /dev/null +++ b/public/icons/coins.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/icons/dollar.svg b/public/icons/dollar.svg new file mode 100644 index 00000000..05ee7798 --- /dev/null +++ b/public/icons/dollar.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/public/icons/euro.svg b/public/icons/euro.svg new file mode 100644 index 00000000..74b4cee6 --- /dev/null +++ b/public/icons/euro.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/public/icons/pound.svg b/public/icons/pound.svg new file mode 100644 index 00000000..45c807db --- /dev/null +++ b/public/icons/pound.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/public/icons/tether.svg b/public/icons/tether.svg new file mode 100644 index 00000000..1870ce71 --- /dev/null +++ b/public/icons/tether.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/public/icons/usdc.svg b/public/icons/usdc.svg new file mode 100644 index 00000000..3ece82da --- /dev/null +++ b/public/icons/usdc.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/icons/why-1.svg b/public/icons/why-1.svg new file mode 100644 index 00000000..56ba8731 --- /dev/null +++ b/public/icons/why-1.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/icons/why-2.svg b/public/icons/why-2.svg new file mode 100644 index 00000000..cae55a3b --- /dev/null +++ b/public/icons/why-2.svg @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/icons/why-3.svg b/public/icons/why-3.svg new file mode 100644 index 00000000..d2e5e302 --- /dev/null +++ b/public/icons/why-3.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/icons/why-4.svg b/public/icons/why-4.svg new file mode 100644 index 00000000..decb35f7 --- /dev/null +++ b/public/icons/why-4.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/icons/x.svg b/public/icons/x.svg new file mode 100644 index 00000000..913088cb --- /dev/null +++ b/public/icons/x.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/images/group-phone.webp b/public/images/group-phone.webp new file mode 100644 index 00000000..13a75aca Binary files /dev/null and b/public/images/group-phone.webp differ diff --git a/public/images/man-phone.webp b/public/images/man-phone.webp new file mode 100644 index 00000000..732c0f8a Binary files /dev/null and b/public/images/man-phone.webp differ diff --git a/public/images/welcome.webp b/public/images/welcome.webp new file mode 100644 index 00000000..62131c83 Binary files /dev/null and b/public/images/welcome.webp differ diff --git a/public/images/woman-card.webp b/public/images/woman-card.webp new file mode 100644 index 00000000..07445b7c Binary files /dev/null and b/public/images/woman-card.webp differ diff --git a/public/images/woman-laptop.webp b/public/images/woman-laptop.webp new file mode 100644 index 00000000..9eedae25 Binary files /dev/null and b/public/images/woman-laptop.webp differ diff --git a/public/images/woman-phone.webp b/public/images/woman-phone.webp new file mode 100644 index 00000000..d9597640 Binary files /dev/null and b/public/images/woman-phone.webp differ diff --git a/public/images/women-phones.webp b/public/images/women-phones.webp new file mode 100644 index 00000000..9179a930 Binary files /dev/null and b/public/images/women-phones.webp differ diff --git a/src/app/page.tsx b/src/app/page.tsx index 6f1806af..2615a380 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,9 +1,25 @@ -import { ExternalHeader } from '@/components/header/ExternalHeader'; +import { Believe } from '@/views/landing/Believe'; +import { Footer } from '@/views/landing/Footer'; +import { Hero } from '@/views/landing/Hero'; +import { OpenSource } from '@/views/landing/OpenSource'; +import { Ready } from '@/views/landing/Ready'; +import { Security } from '@/views/landing/Security'; +import { Welcome } from '@/views/landing/Welcome'; +import { Why } from '@/views/landing/Why'; export default function Page() { return ( -
- +
+ +
+ + + + + + +
+
); } diff --git a/src/components/form/SignUpForm.tsx b/src/components/form/SignUpForm.tsx index 05a43bc6..2095da20 100644 --- a/src/components/form/SignUpForm.tsx +++ b/src/components/form/SignUpForm.tsx @@ -7,6 +7,7 @@ import { wordlist } from '@scure/bip39/wordlists/english'; import stringEntropy from 'fast-password-entropy'; import { Copy, CopyCheck, Eye, EyeOff, Loader2 } from 'lucide-react'; import Link from 'next/link'; +import { useSearchParams } from 'next/navigation'; import { useEffect, useRef, useState } from 'react'; import { useForm } from 'react-hook-form'; import { useCopyToClipboard } from 'usehooks-ts'; @@ -75,6 +76,9 @@ const FormSchema = z }); export function SignUpForm() { + const searchParams = useSearchParams(); + const emailParam = searchParams.get('email'); + const { toast } = useToast(); const client = useApolloClient(); @@ -91,7 +95,7 @@ export function SignUpForm() { reValidateMode: 'onChange', resolver: zodResolver(FormSchema), defaultValues: { - email: '', + email: emailParam || '', password: '', password_hint: '', confirm_password: '', diff --git a/src/components/header/ExternalHeader.tsx b/src/components/header/ExternalHeader.tsx index 528a5397..ca1f2b27 100644 --- a/src/components/header/ExternalHeader.tsx +++ b/src/components/header/ExternalHeader.tsx @@ -20,7 +20,7 @@ export const ExternalHeader = () => {
{loading ? null : data?.user.id ? ( ) : ( <> diff --git a/src/components/ui/sheet.tsx b/src/components/ui/sheet.tsx index e402b4f5..d79cf335 100644 --- a/src/components/ui/sheet.tsx +++ b/src/components/ui/sheet.tsx @@ -31,7 +31,7 @@ const SheetOverlay = React.forwardRef< SheetOverlay.displayName = SheetPrimitive.Overlay.displayName; const sheetVariants = cva( - 'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500', + 'fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out overflow-y-auto data-[state=closed]:duration-300 data-[state=open]:duration-500', { variants: { side: { @@ -65,7 +65,7 @@ const SheetContent = React.forwardRef< {...props} > {children} - + Close diff --git a/src/utils/elementScroll.ts b/src/utils/elementScroll.ts new file mode 100644 index 00000000..81d6a4dd --- /dev/null +++ b/src/utils/elementScroll.ts @@ -0,0 +1,5 @@ +export const elementScroll = (selector: string) => { + const element = document.querySelector(selector); + if (!element) return; + element.scrollIntoView({ behavior: 'smooth' }); +}; diff --git a/src/utils/routes.ts b/src/utils/routes.ts index 94a52d8b..5a6349cd 100644 --- a/src/utils/routes.ts +++ b/src/utils/routes.ts @@ -27,4 +27,9 @@ export const ROUTES = { restore: '/setup/wallet/restore', }, }, + external: { + github: 'https://github.com/AmbossTech/amboss-banco', + x: 'https://x.com/ambosstech', + support: 'mailto:support@amboss.tech', + }, }; diff --git a/src/views/landing/Believe.tsx b/src/views/landing/Believe.tsx new file mode 100644 index 00000000..b4b061c7 --- /dev/null +++ b/src/views/landing/Believe.tsx @@ -0,0 +1,68 @@ +import Image, { StaticImageData } from 'next/image'; +import { FC } from 'react'; + +import groupPhone from '/public/images/group-phone.webp'; +import manPhone from '/public/images/man-phone.webp'; +import womanCard from '/public/images/woman-card.webp'; +import womanPhone from '/public/images/woman-phone.webp'; + +const Card: FC<{ title: string; subtitle: string; image: StaticImageData }> = ({ + title, + subtitle, + image, +}) => { + return ( +
+ stock-photo + +
+

{title}

+ +

{subtitle}

+
+
+ ); +}; + +export const Believe = () => { + return ( +
+
+

+ Banco +

+ +

+ Access global finance in four simple steps. +

+
+ +
+ + + + +
+
+ ); +}; diff --git a/src/views/landing/Footer.tsx b/src/views/landing/Footer.tsx new file mode 100644 index 00000000..5f924ecc --- /dev/null +++ b/src/views/landing/Footer.tsx @@ -0,0 +1,57 @@ +'use client'; + +import Image from 'next/image'; +import Link from 'next/link'; + +import x from '/public/icons/x.svg'; +import { elementScroll } from '@/utils/elementScroll'; +import { ROUTES } from '@/utils/routes'; + +const links = ['about', 'features', 'community', 'security', 'support']; +const year = new Date().getFullYear(); + +export const Footer = () => { + return ( +
+
+ + Banco + + + + + + x + +
+ +

+ Copyright © {year} Banco +

+
+ ); +}; diff --git a/src/views/landing/Header.tsx b/src/views/landing/Header.tsx new file mode 100644 index 00000000..40991fe3 --- /dev/null +++ b/src/views/landing/Header.tsx @@ -0,0 +1,138 @@ +'use client'; + +import { Menu } from 'lucide-react'; +import Link from 'next/link'; +import { useState } from 'react'; + +import { Sheet, SheetContent, SheetTrigger } from '@/components/ui/sheet'; +import { useUserQuery } from '@/graphql/queries/__generated__/user.generated'; +import { elementScroll } from '@/utils/elementScroll'; +import { ROUTES } from '@/utils/routes'; + +const links = ['about', 'features', 'community', 'security', 'support']; + +export const Header = () => { + const { data, loading } = useUserQuery(); + + const [mobileMenuOpen, setMobileMenuOpen] = useState(false); + + return ( +
+ + Banco + + + + +
+ {loading ? null : data?.user.id ? ( + + Go to App + + ) : ( + <> + + Login + + + + Sign up + + + )} +
+ + + + + + + + + +
+ {loading ? null : data?.user.id ? ( + + Go to App + + ) : ( + <> + + Login + + + + Sign up + + + )} +
+
+
+
+ ); +}; diff --git a/src/views/landing/Hero.tsx b/src/views/landing/Hero.tsx new file mode 100644 index 00000000..f939cdcc --- /dev/null +++ b/src/views/landing/Hero.tsx @@ -0,0 +1,70 @@ +'use client'; + +import Image from 'next/image'; +import Link from 'next/link'; +import { useState } from 'react'; + +import bitcoin from '/public/icons/bitcoin.svg'; +import tether from '/public/icons/tether.svg'; +import usdc from '/public/icons/usdc.svg'; +import { ROUTES } from '@/utils/routes'; + +import { Header } from './Header'; + +export const Hero = () => { + const [email, setEmail] = useState(''); + + return ( +
+
+ +
+ bitcoin + +
+

+ Your Money, Your Way. +

+ +

+ Pay and get paid in dollars and bitcoin. Simple, secure and always + in your control. +

+ + tether + +
+ setEmail(e.target.value)} + className="mb-2 h-12 w-full rounded-lg border border-neutral-200 bg-white px-4 py-2 text-base text-black placeholder:text-black/45 lg:mb-0 lg:h-14 lg:pr-48" + /> + + + Get Started Today + +
+
+ + usdc +
+
+ ); +}; diff --git a/src/views/landing/OpenSource.tsx b/src/views/landing/OpenSource.tsx new file mode 100644 index 00000000..06832c07 --- /dev/null +++ b/src/views/landing/OpenSource.tsx @@ -0,0 +1,46 @@ +import { Github } from 'lucide-react'; +import Image from 'next/image'; + +import coins from '/public/icons/coins.svg'; +import womenPhones from '/public/images/women-phones.webp'; +import { ROUTES } from '@/utils/routes'; + +export const OpenSource = () => { + return ( +
+
+
+
+

+ Join our open source community +

+ + + Visit GitHub + +
+ + coins +
+ +
+ women-phones + +

+ Banco is built by the community, for the community. Contribute to + our code, suggest features, and be a part of a banking revolution. + Visit our GitHub repository to get involved. +

+
+
+
+ ); +}; diff --git a/src/views/landing/Ready.tsx b/src/views/landing/Ready.tsx new file mode 100644 index 00000000..8e03b8bb --- /dev/null +++ b/src/views/landing/Ready.tsx @@ -0,0 +1,50 @@ +import Image from 'next/image'; +import Link from 'next/link'; + +import dollar from '/public/icons/dollar.svg'; +import euro from '/public/icons/euro.svg'; +import pound from '/public/icons/pound.svg'; +import { ROUTES } from '@/utils/routes'; + +export const Ready = () => { + return ( +
+
+ pound + +
+

+ Ready to Experience the Future of Banking? +

+ +

+ Join Banco today and take control of your financial future. +

+ + + Sign Up Now + +
+ + dollar + + euro +
+
+ ); +}; diff --git a/src/views/landing/Security.tsx b/src/views/landing/Security.tsx new file mode 100644 index 00000000..e36493ec --- /dev/null +++ b/src/views/landing/Security.tsx @@ -0,0 +1,36 @@ +import Image from 'next/image'; + +import womanLaptop from '/public/images/woman-laptop.webp'; + +export const Security = () => { + return ( +
+
+
+ woman-laptop + +

+ Our platform uses encryption so that only you have access and + control over your money. +

+
+ +
+
+

+ Security made simple. +

+
+ +

+ Safeguard your financial future. +

+
+
+
+ ); +}; diff --git a/src/views/landing/Welcome.tsx b/src/views/landing/Welcome.tsx new file mode 100644 index 00000000..e8b00575 --- /dev/null +++ b/src/views/landing/Welcome.tsx @@ -0,0 +1,27 @@ +import Image from 'next/image'; + +import welcome from '/public/images/welcome.webp'; + +export const Welcome = () => { + return ( +
+
+ welcome + +
+

+ Welcome to Banco +

+ +

+ Your gateway to secure and simple banking. +

+
+
+
+ ); +}; diff --git a/src/views/landing/Why.tsx b/src/views/landing/Why.tsx new file mode 100644 index 00000000..2ba3ee3b --- /dev/null +++ b/src/views/landing/Why.tsx @@ -0,0 +1,61 @@ +import Image, { StaticImageData } from 'next/image'; +import { FC } from 'react'; + +import why1 from '/public/icons/why-1.svg'; +import why2 from '/public/icons/why-2.svg'; +import why3 from '/public/icons/why-3.svg'; +import why4 from '/public/icons/why-4.svg'; + +const Card: FC<{ title: string; subtitle: string; image: StaticImageData }> = ({ + title, + subtitle, + image, +}) => { + return ( +
+
+

{title}

+ +

{subtitle}

+
+ + graphic +
+ ); +}; + +export const Why = () => { + return ( +
+

+ Why choose{' '} + + Banco? + +

+ +
+ + + + +
+
+ ); +};