Add tailwind. Add stripped down hero component.
This commit is contained in:
parent
d49f785cee
commit
844a908118
195
web/components/hero.tsx
Normal file
195
web/components/hero.tsx
Normal file
|
@ -0,0 +1,195 @@
|
|||
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: '#' },
|
||||
]
|
||||
|
||||
export const Hero = () => {
|
||||
return (
|
||||
<div className="relative overflow-hidden h-screen bg-gray-900">
|
||||
<Popover as="header" className="relative">
|
||||
<div className="pt-6">
|
||||
<nav
|
||||
className="relative max-w-7xl mx-auto flex items-center justify-between px-4 sm:px-6"
|
||||
aria-label="Global"
|
||||
>
|
||||
<div className="flex items-center flex-1">
|
||||
<div className="flex items-center justify-between w-full md:w-auto">
|
||||
<a href="#">
|
||||
<span className="sr-only">Workflow</span>
|
||||
<img
|
||||
className="h-8 w-auto sm:h-10"
|
||||
src="/logo.png"
|
||||
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>
|
||||
|
||||
<Transition
|
||||
as={Fragment}
|
||||
enter="duration-150 ease-out"
|
||||
enterFrom="opacity-0 scale-95"
|
||||
enterTo="opacity-100 scale-100"
|
||||
leave="duration-100 ease-in"
|
||||
leaveFrom="opacity-100 scale-100"
|
||||
leaveTo="opacity-0 scale-95"
|
||||
>
|
||||
<Popover.Panel focus className="absolute z-10 top-0 inset-x-0 p-2 transition transform origin-top md:hidden">
|
||||
<div className="rounded-lg shadow-md bg-white ring-1 ring-black ring-opacity-5 overflow-hidden">
|
||||
<div className="px-5 pt-4 flex items-center justify-between">
|
||||
<div>
|
||||
<img
|
||||
className="h-8 w-auto"
|
||||
src="https://tailwindui.com/img/logos/workflow-mark-indigo-600.svg"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div className="-mr-2">
|
||||
<Popover.Button className="bg-white rounded-md p-2 inline-flex items-center justify-center text-gray-400 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-600">
|
||||
<span className="sr-only">Close menu</span>
|
||||
<XIcon className="h-6 w-6" aria-hidden="true" />
|
||||
</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-indigo-600 text-white font-medium hover:bg-indigo-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>
|
||||
</Popover>
|
||||
|
||||
<main>
|
||||
<div className="pt-10 sm:pt-16 lg:pt-8 lg:pb-14 lg:overflow-hidden">
|
||||
<div className="mx-auto max-w-7xl lg:px-8">
|
||||
<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-indigo-400">prediction markets</span>
|
||||
</h1>
|
||||
<p className="mt-3 text-base text-gray-300 sm:mt-5 sm:text-xl lg:text-lg xl:text-xl">
|
||||
Create and resolve your own prediction markets to earn a percent of the bet volume. Powered by Solana smart contracts.
|
||||
</p>
|
||||
<div className="mt-10 sm:mt-12">
|
||||
<form action="#" 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"
|
||||
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-indigo-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-indigo-500 text-white font-medium hover:bg-indigo-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-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> */}
|
||||
</form>
|
||||
</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">
|
||||
{/* Illustration taken from Lucid Illustrations: https://lucid.pixsellz.io/ */}
|
||||
<img
|
||||
className="w-full lg:absolute lg:inset-y-0 lg:left-0 lg:h-full lg:w-auto lg:max-w-none"
|
||||
src="https://tailwindui.com/img/component-images/cloud-illustration-indigo-400.svg"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</main>
|
||||
</div>
|
||||
)
|
||||
}
|
1563
web/package-lock.json
generated
1563
web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -8,6 +8,8 @@
|
|||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@headlessui/react": "^1.4.2",
|
||||
"@heroicons/react": "^1.0.5",
|
||||
"next": "12.0.4",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2"
|
||||
|
@ -15,8 +17,12 @@
|
|||
"devDependencies": {
|
||||
"@types/node": "16.11.11",
|
||||
"@types/react": "17.0.37",
|
||||
"autoprefixer": "^10.2.6",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-next": "12.0.4",
|
||||
"postcss": "^8.3.5",
|
||||
"tailwindcss": "^2.2.4",
|
||||
"@tailwindcss/forms": "^0.3.4",
|
||||
"typescript": "4.5.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import '../styles/globals.css'
|
||||
import 'tailwindcss/tailwind.css'
|
||||
import type { AppProps } from 'next/app'
|
||||
|
||||
function MyApp({ Component, pageProps }: AppProps) {
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import type { NextPage } from 'next'
|
||||
import Head from 'next/head'
|
||||
import React from 'react'
|
||||
import { LandingPage } from './landing-page'
|
||||
|
||||
const Home: NextPage = () => {
|
||||
return (
|
||||
|
@ -10,7 +12,7 @@ const Home: NextPage = () => {
|
|||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
Welcome to Mantic Markets
|
||||
<LandingPage />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
8
web/pages/landing-page.tsx
Normal file
8
web/pages/landing-page.tsx
Normal file
|
@ -0,0 +1,8 @@
|
|||
import React from 'react'
|
||||
import { Hero } from '../components/hero'
|
||||
|
||||
export const LandingPage = () => {
|
||||
return (
|
||||
<Hero />
|
||||
)
|
||||
}
|
8
web/postcss.config.js
Normal file
8
web/postcss.config.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
// If you want to use other PostCSS plugins, see the following:
|
||||
// https://tailwindcss.com/docs/using-with-preprocessors
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
BIN
web/public/logo.png
Normal file
BIN
web/public/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
|
@ -4,6 +4,7 @@ body {
|
|||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
|
||||
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
a {
|
||||
|
|
14
web/tailwind.config.js
Normal file
14
web/tailwind.config.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
module.exports = {
|
||||
mode: 'jit',
|
||||
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
|
||||
darkMode: false, // or 'media' or 'class'
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
variants: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [
|
||||
require('@tailwindcss/forms'),
|
||||
],
|
||||
}
|
Loading…
Reference in New Issue
Block a user