Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Austin's opinions on theming #6

Merged
merged 9 commits into from
Dec 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion web/components/bet-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export function BetPanel(props: { contract: Contract; className?: string }) {

return (
<Col
className={clsx('bg-gray-100 p-6 rounded w-full md:w-auto', className)}
className={clsx(
'bg-gray-200 shadow-xl p-6 rounded w-full md:w-auto',
className
)}
>
<div className="p-2 font-medium">Pick outcome</div>
<YesNoSelector
Expand Down
32 changes: 0 additions & 32 deletions web/components/button.tsx

This file was deleted.

8 changes: 4 additions & 4 deletions web/components/contracts-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ function ContractCard(props: { contract: Contract }) {
return (
<li>
<Link href={`/contract/${contract.id}`}>
<a className="block hover:bg-gray-200">
<a className="block hover:bg-gray-300">
<div className="px-4 py-4 sm:px-6">
<div className="flex items-center justify-between">
<p className="text-sm font-medium text-green-600 truncate">
<p className="text-sm font-medium text-indigo-700 truncate">
{contract.question}
</p>
<div className="ml-2 flex-shrink-0 flex">
Expand Down Expand Up @@ -52,8 +52,8 @@ function ContractCard(props: { contract: Contract }) {
export function ContractsList(props: { contracts: Contract[] }) {
const { contracts } = props
return (
<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">
<div className="bg-gray-200 shadow-xl overflow-hidden sm:rounded-md max-w-4xl w-full">
<ul role="list" className="divide-y divide-gray-300">
{contracts.map((contract) => (
<ContractCard contract={contract} key={contract.id} />
))}
Expand Down
8 changes: 8 additions & 0 deletions web/components/title.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export function Title(props: { text: string }) {
const { text } = props
return (
<h1 className="text-2xl font-major-mono text-indigo-700 font-bold mt-6 mb-4">
{text}
</h1>
)
}
2 changes: 1 addition & 1 deletion web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions web/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Html, Head, Main, NextScript } from 'next/document'

export default function Document() {
return (
<Html data-theme="mantic" className="h-full">
<Html data-theme="mantic" className="min-h-screen">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I was thinking about doing this.

<Head>
<title>Mantic Markets</title>

Expand Down Expand Up @@ -57,7 +57,7 @@ export default function Document() {
}}
/>
</Head>
<body className="h-full font-readex-pro">
<body className="min-h-screen font-readex-pro bg-base-200">
<Main />
<NextScript />
</body>
Expand Down
5 changes: 2 additions & 3 deletions web/pages/account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useUser } from '../hooks/use-user'
import { useState, useEffect } from 'react'
import { Contract, listContracts } from '../lib/firebase/contracts'
import { ContractsList } from '../components/contracts-list'
import { Title } from '../components/title'

export default function Account() {
const user = useUser()
Expand Down Expand Up @@ -46,9 +47,7 @@ export default function Account() {
</div>
</div>

<h1 className="text-2xl font-major-mono text-green-600 font-bold mt-6 mb-4">
Your markets
</h1>
<Title text="Your markets" />
<ContractsList contracts={contracts} />
</div>
</div>
Expand Down
13 changes: 4 additions & 9 deletions web/pages/contract/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useEffect, useState } from 'react'
import { ContractsList } from '../../components/contracts-list'
import { Header } from '../../components/header'
import { Spacer } from '../../components/layout/spacer'
import { Title } from '../../components/title'
import { useUser } from '../../hooks/use-user'
import {
Contract,
Expand Down Expand Up @@ -55,10 +56,8 @@ export default function NewContract() {
<div>
<Header />
<div className="max-w-4xl py-12 lg:mx-auto px-4">
<h1 className="text-2xl font-major-mono text-green-600 font-bold my-6">
Create a new prediction market
</h1>
<div className="w-full bg-gray-100 rounded-lg shadow-xl p-6">
<Title text="Create a new prediction market" />
<div className="w-full bg-gray-200 rounded-lg shadow-xl p-6">
{/* 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 */}
<form>
Expand Down Expand Up @@ -175,11 +174,7 @@ export default function NewContract() {

<Spacer h={10} />

{/* Show a separate card for each contract */}
<h1 className="text-2xl font-major-mono text-green-600 font-bold my-6">
Your markets
</h1>

<Title text="Your markets" />
<ContractsList contracts={contracts} />
</div>
</div>
Expand Down