Switch to light theme!
This commit is contained in:
parent
3610ac8917
commit
165f2ef3b5
|
@ -57,7 +57,7 @@ export function BetPanel(props: { contract: Contract; className?: string }) {
|
||||||
const betDisabled = isSubmitting || wasSubmitted
|
const betDisabled = isSubmitting || wasSubmitted
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Col className={clsx('bg-gray-600 p-6 rounded w-full md:w-auto', className)}>
|
<Col className={clsx('bg-gray-100 p-6 rounded w-full md:w-auto', className)}>
|
||||||
<div className="p-2 font-medium">Pick outcome</div>
|
<div className="p-2 font-medium">Pick outcome</div>
|
||||||
<YesNoSelector
|
<YesNoSelector
|
||||||
className="p-2"
|
className="p-2"
|
||||||
|
|
|
@ -44,7 +44,7 @@ export const ContractOverview = (props: { contract: Contract }) => {
|
||||||
<Col className="max-w-3xl w-full">
|
<Col className="max-w-3xl w-full">
|
||||||
<div className="text-3xl font-medium p-2">{contract.question}</div>
|
<div className="text-3xl font-medium p-2">{contract.question}</div>
|
||||||
|
|
||||||
<Row className="flex-wrap text-sm">
|
<Row className="flex-wrap text-sm text-gray-600">
|
||||||
<div className="p-2 whitespace-nowrap">By {contract.creatorName}</div>
|
<div className="p-2 whitespace-nowrap">By {contract.creatorName}</div>
|
||||||
<div className="py-2">•</div>
|
<div className="py-2">•</div>
|
||||||
<div className="p-2 whitespace-nowrap">Dec 9</div>
|
<div className="p-2 whitespace-nowrap">Dec 9</div>
|
||||||
|
@ -58,7 +58,7 @@ export const ContractOverview = (props: { contract: Contract }) => {
|
||||||
|
|
||||||
<Spacer h={12} />
|
<Spacer h={12} />
|
||||||
|
|
||||||
<div className="text-gray-200">{contract.description}</div>
|
<div className="text-gray-600">{contract.description}</div>
|
||||||
</Col>
|
</Col>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,10 @@ function ContractCard(props: { contract: Contract }) {
|
||||||
return (
|
return (
|
||||||
<li>
|
<li>
|
||||||
<Link href={`/contract/${contract.id}`}>
|
<Link href={`/contract/${contract.id}`}>
|
||||||
<a className="block hover:bg-gray-600">
|
<a className="block hover:bg-gray-200">
|
||||||
<div className="px-4 py-4 sm:px-6">
|
<div className="px-4 py-4 sm:px-6">
|
||||||
<div className="flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<p className="text-sm font-medium text-indigo-300 truncate">
|
<p className="text-sm font-medium text-indigo-500 truncate">
|
||||||
{contract.question}
|
{contract.question}
|
||||||
</p>
|
</p>
|
||||||
<div className="ml-2 flex-shrink-0 flex">
|
<div className="ml-2 flex-shrink-0 flex">
|
||||||
|
@ -52,7 +52,7 @@ function ContractCard(props: { contract: Contract }) {
|
||||||
export function ContractsList(props: { contracts: Contract[] }) {
|
export function ContractsList(props: { contracts: Contract[] }) {
|
||||||
const { contracts } = props
|
const { contracts } = props
|
||||||
return (
|
return (
|
||||||
<div className="bg-gray-500 shadow overflow-hidden sm:rounded-md max-w-4xl w-full">
|
<div className="bg-gray-100 shadow overflow-hidden sm:rounded-md max-w-4xl w-full">
|
||||||
<ul role="list" className="divide-y divide-gray-200">
|
<ul role="list" className="divide-y divide-gray-200">
|
||||||
{contracts.map((contract) => (
|
{contracts.map((contract) => (
|
||||||
<ContractCard contract={contract} key={contract.id} />
|
<ContractCard contract={contract} key={contract.id} />
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
|
import clsx from 'clsx'
|
||||||
import { Popover } from '@headlessui/react'
|
import { Popover } from '@headlessui/react'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { useUser } from '../hooks/use-user'
|
import { useUser } from '../hooks/use-user'
|
||||||
import { firebaseLogin } from '../lib/firebase/users'
|
import { firebaseLogin } from '../lib/firebase/users'
|
||||||
|
import Image from 'next/image'
|
||||||
|
|
||||||
const navigation = [
|
const navigation = [
|
||||||
{
|
{
|
||||||
|
@ -11,28 +13,34 @@ const navigation = [
|
||||||
{ name: 'Simulator', href: '/simulator' },
|
{ name: 'Simulator', href: '/simulator' },
|
||||||
]
|
]
|
||||||
|
|
||||||
function SignInLink() {
|
function SignInLink(props: { darkBackground?: boolean }) {
|
||||||
|
const { darkBackground } = props
|
||||||
|
|
||||||
const user = useUser()
|
const user = useUser()
|
||||||
|
|
||||||
|
const themeClasses = darkBackground
|
||||||
|
? 'text-white hover:text-gray-300'
|
||||||
|
: 'hover:text-gray-500'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{user ? (
|
{user ? (
|
||||||
<>
|
<>
|
||||||
<Link href="/contract">
|
<Link href="/contract">
|
||||||
<a className="text-base font-medium text-white hover:text-gray-300">
|
<a className={clsx('text-base font-medium', themeClasses)}>
|
||||||
Create a market
|
Create a market
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<Link href="/account">
|
<Link href="/account">
|
||||||
<a className="text-base font-medium text-green-400 hover:text-gray-300">
|
<a className={clsx('text-base font-medium', themeClasses)}>
|
||||||
{user.name}
|
{user.name}
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<button
|
<button
|
||||||
className="text-base font-medium text-green-400 hover:text-gray-300"
|
className={clsx('text-base font-medium', themeClasses)}
|
||||||
onClick={() => firebaseLogin()}
|
onClick={() => firebaseLogin()}
|
||||||
>
|
>
|
||||||
Sign In
|
Sign In
|
||||||
|
@ -42,7 +50,9 @@ function SignInLink() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Header() {
|
export function Header(props: { darkBackground?: boolean }) {
|
||||||
|
const { darkBackground } = props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Popover as="header" className="relative">
|
<Popover as="header" className="relative">
|
||||||
<div className="pt-6">
|
<div className="pt-6">
|
||||||
|
@ -53,12 +63,21 @@ export function Header() {
|
||||||
<div className="flex items-center flex-1">
|
<div className="flex items-center flex-1">
|
||||||
<div className="flex items-center justify-between w-full md:w-auto">
|
<div className="flex items-center justify-between w-full md:w-auto">
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
<a className="inline-grid grid-flow-col align-items-center h-6 sm:h-10">
|
<a className="flex flex-row items-center align-items-center h-6 sm:h-10">
|
||||||
<img
|
<div className="inline-block mr-3 mt-2">
|
||||||
className="w-auto h-6 sm:h-10 inline-block mr-3"
|
<Image
|
||||||
|
className="h-6 sm:h-10"
|
||||||
src="/logo-icon.svg"
|
src="/logo-icon.svg"
|
||||||
|
width={40}
|
||||||
|
height={40}
|
||||||
/>
|
/>
|
||||||
<span className="text-white font-major-mono lowercase sm:text-2xl my-auto">
|
</div>
|
||||||
|
<span
|
||||||
|
className={clsx(
|
||||||
|
'font-major-mono lowercase sm:text-2xl my-auto',
|
||||||
|
darkBackground && 'text-white'
|
||||||
|
)}
|
||||||
|
>
|
||||||
Mantic Markets
|
Mantic Markets
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -68,12 +87,19 @@ export function Header() {
|
||||||
<div className="space-x-8 md:flex md:ml-16">
|
<div className="space-x-8 md:flex md:ml-16">
|
||||||
{navigation.map((item) => (
|
{navigation.map((item) => (
|
||||||
<Link key={item.name} href={item.href}>
|
<Link key={item.name} href={item.href}>
|
||||||
<a className="text-base font-medium text-white hover:text-gray-300">
|
<a
|
||||||
|
className={clsx(
|
||||||
|
'text-base font-medium',
|
||||||
|
darkBackground
|
||||||
|
? 'text-white hover:text-gray-300'
|
||||||
|
: 'hover:text-gray-500'
|
||||||
|
)}
|
||||||
|
>
|
||||||
{item.name}
|
{item.name}
|
||||||
</a>
|
</a>
|
||||||
</Link>
|
</Link>
|
||||||
))}
|
))}
|
||||||
<SignInLink />
|
<SignInLink darkBackground={darkBackground} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Header } from './header'
|
||||||
export const Hero = () => {
|
export const Hero = () => {
|
||||||
return (
|
return (
|
||||||
<div className="relative overflow-hidden h-screen bg-world-trading bg-cover bg-gray-900">
|
<div className="relative overflow-hidden h-screen bg-world-trading bg-cover bg-gray-900">
|
||||||
<Header />
|
<Header darkBackground />
|
||||||
<main>
|
<main>
|
||||||
<div className="pt-40 sm:pt-16 lg:pt-8 lg:pb-14 lg:overflow-hidden">
|
<div className="pt-40 sm:pt-16 lg:pt-8 lg:pb-14 lg:overflow-hidden">
|
||||||
<div className="mx-auto max-w-7xl lg:px-8">
|
<div className="mx-auto max-w-7xl lg:px-8">
|
||||||
|
|
|
@ -51,7 +51,7 @@ function Button(props: {
|
||||||
'bg-green-500 hover:bg-green-600 focus:ring-green-500',
|
'bg-green-500 hover:bg-green-600 focus:ring-green-500',
|
||||||
color === 'red' && 'bg-red-500 hover:bg-red-600 focus:ring-red-500',
|
color === 'red' && 'bg-red-500 hover:bg-red-600 focus:ring-red-500',
|
||||||
color === 'deemphasized' &&
|
color === 'deemphasized' &&
|
||||||
'bg-transparent hover:bg-gray-500 focus:ring-gray-400',
|
'text-gray-700 bg-gray-200 hover:bg-gray-300 focus:ring-gray-300',
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { Html, Head, Main, NextScript } from 'next/document'
|
||||||
|
|
||||||
export default function Document() {
|
export default function Document() {
|
||||||
return (
|
return (
|
||||||
<Html data-theme="dark" className="h-full bg-gray-900">
|
<Html data-theme="light" className="h-full">
|
||||||
<Head>
|
<Head>
|
||||||
<title>Mantic Markets</title>
|
<title>Mantic Markets</title>
|
||||||
|
|
||||||
|
|
|
@ -53,10 +53,10 @@ export default function NewContract() {
|
||||||
<div>
|
<div>
|
||||||
<Header />
|
<Header />
|
||||||
<div className="max-w-4xl my-20 lg:mx-auto mx-4">
|
<div className="max-w-4xl my-20 lg:mx-auto mx-4">
|
||||||
<h1 className="text-2xl font-major-mono text-indigo-300 font-bold mt-6 mb-4">
|
<h1 className="text-2xl font-major-mono text-indigo-500 font-bold mt-6 mb-4">
|
||||||
Create a new prediction market
|
Create a new prediction market
|
||||||
</h1>
|
</h1>
|
||||||
<div className="w-full bg-gray-500 rounded-lg shadow-xl p-6">
|
<div className="w-full bg-gray-100 rounded-lg shadow-xl p-6">
|
||||||
{/* Create a Tailwind form that takes in all the fields needed for a new contract */}
|
{/* Create a Tailwind form that takes in all the fields needed for a new contract */}
|
||||||
{/* When the form is submitted, create a new contract in the database */}
|
{/* When the form is submitted, create a new contract in the database */}
|
||||||
<form>
|
<form>
|
||||||
|
@ -164,7 +164,7 @@ export default function NewContract() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Show a separate card for each contract */}
|
{/* Show a separate card for each contract */}
|
||||||
<h1 className="text-2xl font-major-mono text-indigo-300 font-bold mt-6 mb-4">
|
<h1 className="text-2xl font-major-mono text-indigo-500 font-bold mt-6 mb-4">
|
||||||
Your markets
|
Your markets
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user