manifold/web/pages/labs/index.tsx

89 lines
2.5 KiB
TypeScript
Raw Permalink Normal View History

2022-10-02 19:49:08 +00:00
import { CHALLENGES_ENABLED } from 'common/challenge'
2022-10-02 20:27:29 +00:00
import { DOMAIN } from 'common/envs/constants'
2022-10-02 18:42:43 +00:00
import Masonry from 'react-masonry-css'
2022-10-02 19:51:28 +00:00
import { Col } from 'web/components/layout/col'
2022-10-02 18:42:43 +00:00
import { Page } from 'web/components/page'
2022-10-02 20:24:02 +00:00
import { SEO } from 'web/components/SEO'
2022-10-02 18:42:43 +00:00
import { SiteLink } from 'web/components/site-link'
import { Title } from 'web/components/title'
export default function LabsPage() {
return (
2022-10-02 19:51:28 +00:00
<Page>
2022-10-02 20:24:02 +00:00
<SEO
title="Manifold labs"
description="Cool experimental features for you to check out!"
url="/labs"
/>
2022-10-02 19:51:28 +00:00
<Col className="px-4">
<Title className="sm:!mt-0" text="🧪 Manifold Labs" />
2022-10-02 19:51:28 +00:00
<Masonry
breakpointCols={{ default: 2, 768: 1 }}
className="-ml-4 flex w-auto"
columnClassName="pl-4 bg-clip-padding"
>
2022-10-02 20:09:20 +00:00
<LabCard
2022-10-02 22:14:11 +00:00
title="🇺🇸 US 2022 Midterms"
2022-10-02 20:09:20 +00:00
description="See Manifold's state-by-state breakdown of senate and governor races"
href="/midterms"
/>
2022-10-02 19:51:28 +00:00
{CHALLENGES_ENABLED && (
<LabCard
2022-10-02 22:14:11 +00:00
title="💥 Challenges"
2022-10-02 19:51:28 +00:00
description="One-on-one bets between friends"
href="/challenges"
/>
)}
2022-10-02 18:42:43 +00:00
2022-10-02 20:03:29 +00:00
<LabCard
2022-10-02 22:14:11 +00:00
title="💸 Manalinks"
2022-10-02 20:03:29 +00:00
description="Send M$ to anyone"
href="/links"
/>
2022-10-02 19:49:08 +00:00
<LabCard
2022-10-05 01:33:26 +00:00
title="💌 Dating"
description="Browse dating profiles and bet on relationships"
2022-10-02 19:51:28 +00:00
href="/date-docs"
2022-10-02 19:49:08 +00:00
/>
2022-10-02 20:15:07 +00:00
2022-10-02 22:10:18 +00:00
<LabCard
2022-10-02 22:14:11 +00:00
title="📈 Stats"
2022-10-02 22:10:18 +00:00
description="Check up on Manifold's usage stats"
href="/stats"
/>
2022-10-02 19:51:28 +00:00
<LabCard
2022-10-02 22:14:11 +00:00
title="🎲 Magic the Guessering"
2022-10-02 20:03:29 +00:00
description="Match MTG card names to their art"
2022-10-02 20:27:29 +00:00
href={`https://${DOMAIN}/mtg/index.html`}
2022-10-02 19:51:28 +00:00
/>
2022-10-02 20:09:20 +00:00
2022-10-02 22:14:11 +00:00
<LabCard title="🐮 Cowp" description="???" href="/cowp" />
2022-10-02 19:51:28 +00:00
</Masonry>
</Col>
2022-10-02 18:42:43 +00:00
</Page>
)
}
const LabCard = (props: {
title: string
description: string
href: string
}) => {
const { title, description, href } = props
return (
<SiteLink
href={href}
2022-10-02 18:51:42 +00:00
className="group mb-4 flex flex-col gap-2 rounded-lg bg-white p-4 shadow-md transition-shadow duration-200 hover:no-underline hover:shadow-lg"
2022-10-02 18:42:43 +00:00
>
<h3 className="text-lg font-semibold group-hover:underline group-hover:decoration-indigo-400 group-hover:decoration-2">
{title}
</h3>
2022-10-02 18:51:42 +00:00
<p className="text-gray-600">{description}</p>
2022-10-02 18:42:43 +00:00
</SiteLink>
)
}