Add convertkit form to collect emails.

This commit is contained in:
jahooma 2021-12-02 12:38:49 -06:00
parent ffd1e233c8
commit 13e4ac00cd
4 changed files with 322 additions and 207 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,13 +1,7 @@
import { Fragment } from 'react'
import { Popover, Transition } from '@headlessui/react'
import { MenuIcon, XIcon } from '@heroicons/react/outline'
const navigation = [
{ name: 'Product', href: '#' },
{ name: 'Features', href: '#' },
{ name: 'Marketplace', href: '#' },
{ name: 'Company', href: '#' },
]
import { XIcon } from '@heroicons/react/outline'
import { ConvertKitEmailForm } from './convert-kit-email-form'
export const Hero = () => {
return (
@ -30,32 +24,8 @@ export const Hero = () => {
alt=""
/>
</a>
{/* <div className="-mr-2 flex items-center md:hidden">
<Popover.Button className="bg-gray-900 rounded-md p-2 inline-flex items-center justify-center text-gray-400 hover:bg-gray-800 focus:outline-none focus:ring-2 focus-ring-inset focus:ring-white">
<span className="sr-only">Open main menu</span>
<MenuIcon className="h-6 w-6" aria-hidden="true" />
</Popover.Button>
</div> */}
</div>
{/* <div className="hidden space-x-8 md:flex md:ml-10">
{navigation.map((item) => (
<a key={item.name} href={item.href} className="text-base font-medium text-white hover:text-gray-300">
{item.name}
</a>
))}
</div> */}
</div>
{/* <div className="hidden md:flex md:items-center md:space-x-6">
<a href="#" className="text-base font-medium text-white hover:text-gray-300">
Log in
</a>
<a
href="#"
className="inline-flex items-center px-4 py-2 border border-transparent text-base font-medium rounded-md text-white bg-gray-600 hover:bg-gray-700"
>
Start free trial
</a>
</div> */}
</nav>
</div>
@ -85,35 +55,6 @@ export const Hero = () => {
</Popover.Button>
</div>
</div>
<div className="pt-5 pb-6">
<div className="px-2 space-y-1">
{navigation.map((item) => (
<a
key={item.name}
href={item.href}
className="block px-3 py-2 rounded-md text-base font-medium text-gray-900 hover:bg-gray-50"
>
{item.name}
</a>
))}
</div>
<div className="mt-6 px-5">
<a
href="#"
className="block text-center w-full py-3 px-4 rounded-md shadow bg-green-600 text-white font-medium hover:bg-green-700"
>
Start free trial
</a>
</div>
<div className="mt-6 px-5">
<p className="text-center text-base font-medium text-gray-500">
Existing customer?{' '}
<a href="#" className="text-gray-900 hover:underline">
Login
</a>
</p>
</div>
</div>
</div>
</Popover.Panel>
</Transition>
@ -125,16 +66,6 @@ export const Hero = () => {
<div className="lg:grid lg:grid-cols-2 lg:gap-8">
<div className="mx-auto max-w-md px-4 sm:max-w-2xl sm:px-6 sm:text-center lg:px-0 lg:text-left lg:flex lg:items-center">
<div className="lg:py-24">
{/* <a
href="#"
className="inline-flex items-center text-white bg-black rounded-full p-1 pr-2 sm:text-base lg:text-sm xl:text-base hover:text-gray-200"
>
<span className="px-3 py-0.5 text-white text-xs font-semibold leading-5 uppercase tracking-wide bg-indigo-500 rounded-full">
We're hiring
</span>
<span className="ml-4 text-sm">Visit our careers page</span>
<ChevronRightIcon className="ml-2 w-5 h-5 text-gray-500" aria-hidden="true" />
</a> */}
<h1 className="mt-4 text-4xl tracking-tight font-extrabold text-white sm:mt-5 sm:text-6xl lg:mt-6 xl:text-6xl">
<span className="block">Create your own</span>
<span className="block text-green-400">prediction markets</span>
@ -143,50 +74,10 @@ export const Hero = () => {
Create and resolve your own prediction markets to earn a percent of the bet volume. Powered by Solana.
</p>
<div className="mt-10 sm:mt-12">
<NetilfyForm method="POST" name="contact" className="sm:max-w-xl sm:mx-auto lg:mx-0">
<div className="sm:flex">
<div className="min-w-0 flex-1">
<label htmlFor="email" className="sr-only">
Email address
</label>
<input
id="email"
type="email"
name="email"
placeholder="Enter your email"
className="block w-full px-4 py-3 rounded-md border-0 text-base text-gray-900 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-300 focus:ring-offset-gray-900"
/>
</div>
<div className="mt-3 sm:mt-0 sm:ml-3">
<button
type="submit"
className="block w-full py-3 px-4 rounded-md shadow bg-green-500 text-white font-medium hover:bg-green-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-300 focus:ring-offset-gray-900"
>
Keep me updated
</button>
</div>
</div>
{/* <p className="mt-3 text-sm text-gray-300 sm:mt-4">
Start your free 14-day trial, no credit card necessary. By providing your email, you agree to
our{' '}
<a href="#" className="font-medium text-white">
terms of service
</a>
.
</p> */}
</NetilfyForm>
<ConvertKitEmailForm />
</div>
</div>
</div>
{/* <div className="mt-12 -mb-16 sm:-mb-48 lg:m-0 lg:relative">
<div className="mx-auto max-w-md px-4 sm:max-w-2xl sm:px-6 lg:max-w-none lg:px-0">
<img
className="w-full lg:absolute lg:inset-y-0 lg:left-0 lg:h-full lg:w-auto lg:max-w-none"
src="/world-trading-background.jpg"
alt=""
/>
</div>
</div> */}
</div>
</div>
</div>
@ -194,16 +85,4 @@ export const Hero = () => {
</main>
</div>
)
}
const NetilfyForm = (props: {
children: any
} & Partial<Omit<HTMLFormElement, 'children'>>) => {
const { children, ...other } = props
return (
<form {...{ netlify: 'true' }} {...other as any}>
{children}
</form>
)
}

372
web/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,7 @@
"react-dom": "17.0.2"
},
"devDependencies": {
"@tailwindcss/forms": "^0.3.4",
"@types/node": "16.11.11",
"@types/react": "17.0.37",
"autoprefixer": "^10.2.6",
@ -22,7 +23,6 @@
"eslint-config-next": "12.0.4",
"postcss": "^8.3.5",
"tailwindcss": "^2.2.4",
"@tailwindcss/forms": "^0.3.4",
"typescript": "4.5.2"
}
}