Various spacing fixes

This commit is contained in:
Austin Chen 2021-12-18 17:23:34 -08:00
parent 77291956bc
commit 2a4ad3734b
5 changed files with 36 additions and 20 deletions

View File

@ -53,7 +53,7 @@ function SignedInHeaders(props: { user: User; themeClasses?: string }) {
<Link href="/create"> <Link href="/create">
<a <a
className={clsx( className={clsx(
'text-base font-medium hidden md:block whitespace-nowrap', 'text-base hidden md:block whitespace-nowrap',
themeClasses themeClasses
)} )}
> >
@ -64,7 +64,7 @@ function SignedInHeaders(props: { user: User; themeClasses?: string }) {
<Link href="/bets"> <Link href="/bets">
<a <a
className={clsx( className={clsx(
'text-base font-medium hidden md:block whitespace-nowrap', 'text-base hidden md:block whitespace-nowrap',
themeClasses themeClasses
)} )}
> >
@ -73,7 +73,11 @@ function SignedInHeaders(props: { user: User; themeClasses?: string }) {
</Link> </Link>
<Link href="/account"> <Link href="/account">
<a className={clsx('text-base font-medium hidden md:block')}> <a
className={clsx(
'text-base hidden md:block hover:underline hover:decoration-2 hover:decoration-indigo-700'
)}
>
<ProfileSummary user={user} /> <ProfileSummary user={user} />
</a> </a>
</Link> </Link>
@ -133,7 +137,12 @@ export function Header(props: { darkBackground?: boolean; children?: any }) {
</a> </a>
</Link> </Link>
<Row className="gap-8 mt-1 md:ml-16"> <Row
className={clsx(
'gap-8 mt-1',
darkBackground ? 'md:ml-16' : 'md:ml-auto'
)}
>
{children} {children}
{user ? ( {user ? (

View File

@ -29,7 +29,7 @@ export function UserLink(props: { username: string; className?: string }) {
function UserCard(props: { user: User; showPrivateInfo?: boolean }) { function UserCard(props: { user: User; showPrivateInfo?: boolean }) {
const { user, showPrivateInfo } = props const { user, showPrivateInfo } = props
return ( return (
<Row className="card glass lg:card-side shadow-xl hover:shadow-xl text-neutral-content bg-green-600 hover:bg-green-600 transition-all max-w-sm my-12"> <Row className="card glass lg:card-side shadow-xl hover:shadow-xl text-neutral-content bg-green-600 hover:bg-green-600 transition-all max-w-sm my-12 mx-auto">
<div className="p-4"> <div className="p-4">
{user?.avatarUrl && ( {user?.avatarUrl && (
<img <img

View File

@ -1,4 +1,5 @@
import React from 'react' import React from 'react'
import { Header } from '../components/header'
import { UserPage } from '../components/user-page' import { UserPage } from '../components/user-page'
import { useUser } from '../hooks/use-user' import { useUser } from '../hooks/use-user'
import { firebaseLogin } from '../lib/firebase/users' import { firebaseLogin } from '../lib/firebase/users'
@ -30,5 +31,12 @@ function SignInCard() {
export default function Account() { export default function Account() {
const user = useUser() const user = useUser()
return user ? <UserPage user={user} currentUser={user} /> : <SignInCard /> return user ? (
<UserPage user={user} currentUser={user} />
) : (
<div className="max-w-4xl px-4 pb-8 mx-auto">
<Header />
<SignInCard />
</div>
)
} }

View File

@ -32,17 +32,18 @@ function Hero() {
return ( return (
<div className="overflow-hidden h-screen bg-world-trading bg-cover bg-gray-900 bg-center lg:bg-left"> <div className="overflow-hidden h-screen bg-world-trading bg-cover bg-gray-900 bg-center lg:bg-left">
<Header darkBackground>
<div
className="text-base font-medium text-white cursor-pointer hover:underline hover:decoration-teal-500 hover:decoration-2"
onClick={scrollToAbout}
>
About
</div>
</Header>
<main> <main>
<div className="pt-40 sm:pt-16 lg:pt-8 lg:pb-14 lg:overflow-hidden"> <div className="pt-32 sm:pt-8 lg:pt-0 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">
<Header darkBackground>
<div
className="text-base font-medium text-white cursor-pointer hover:underline hover:decoration-teal-500 hover:decoration-2"
onClick={scrollToAbout}
>
About
</div>
</Header>
<div className="lg:grid lg:grid-cols-2 lg:gap-8"> <div className="lg:grid lg:grid-cols-2 lg:gap-8">
<div className="mx-auto max-w-md px-8 sm:max-w-2xl sm:text-center lg:px-0 lg:text-left lg:flex lg:items-center"> <div className="mx-auto max-w-md px-8 sm:max-w-2xl sm:text-center lg:px-0 lg:text-left lg:flex lg:items-center">
<div className="lg:py-24"> <div className="lg:py-24">

View File

@ -18,12 +18,10 @@ export default function TagPage() {
} }
return ( return (
<div> <div className="max-w-4xl px-4 pb-8 mx-auto">
<Header /> <Header />
<div className="max-w-4xl py-8 mx-auto"> <Title text={`#${tag}`} />
<Title text={`#${tag}`} /> <SearchableGrid contracts={contracts === 'loading' ? [] : contracts} />
<SearchableGrid contracts={contracts === 'loading' ? [] : contracts} />
</div>
</div> </div>
) )
} }