The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: switch dropdown to use tabs
Jonathan Summers-Muirc1b8cac31e6f
diff --git a/www/components/Blog/BlogHeader.tsx b/www/components/Blog/BlogHeader.tsxindex d4b37e91387..5f9d1d18a91 100644--- a/www/components/Blog/BlogHeader.tsx+++ b/www/components/Blog/BlogHeader.tsx@@ -7,7 +7,7 @@ interface Props {export default function BlogHeader({ title }: Props) {return (- <div className="bg-white dark:bg-dark-800 overflow-hidden pt-12 pb-4 border-b dark:border-gray-600">+ <div className="bg-white dark:bg-dark-800 overflow-hidden pt-4 pb-4 border-b dark:border-gray-600"><div className="container mx-auto px-8 sm:px-16 xl:px-20"><div className="mx-auto"><Typography.Title>diff --git a/www/components/Blog/BlogListItem.tsx b/www/components/Blog/BlogListItem.tsxindex 66d5a30d419..4b13c5ac54d 100644--- a/www/components/Blog/BlogListItem.tsx+++ b/www/components/Blog/BlogListItem.tsx@@ -20,9 +20,9 @@ const BlogListItem = ({ blog }: Props) => {<div key={blog.slug}><a href={`/blog/${blog.url}`}><div className="inline-block">- <div className="flex flex-col space-y-3">+ <div className="flex flex-col space-y-4"><div- className={`relative overflow-auto w-full h-40 border dark:border-dark rounded-sm shadow-sm`}+ className={`relative overflow-auto w-full h-60 border dark:border-dark shadow-sm rounded-lg mb-4`}><Imagelayout="fill"@@ -36,15 +36,33 @@ const BlogListItem = ({ blog }: Props) => {</div><div>- <div className="space-x-3">- <Typography.Text type="secondary">{blog.date}</Typography.Text>- <Typography.Text type="secondary">•</Typography.Text>- <Typography.Text type="secondary">{blog.readingTime}</Typography.Text>- </div>- <Typography.Title level={4} className="m-0">+ <Typography.Title level={3} className="m-0">{blog.title}</Typography.Title></div>+ <Typography.Text type="secondary" small>+ {blog.date}+ </Typography.Text>++ <Typography.Text className="m-0" type="secondary">+ <p className="text-base mb-0">{blog.description}</p>+ </Typography.Text>++ {author && (+ <div>+ <Space size={4}>+ {author.author_image_url && (+ <img src={author.author_image_url} className="rounded-full w-10" />+ )}+ <Space direction="vertical" size={0}>+ <Typography.Text>{author.author}</Typography.Text>+ <Typography.Text type="secondary" small>+ {author.position}+ </Typography.Text>+ </Space>+ </Space>+ </div>+ )}{/* {author && (<div>@@ -63,20 +81,16 @@ const BlogListItem = ({ blog }: Props) => {)} */}</div><div className="flex space-x-3">- {blog.tags &&+ {/* {blog.tags &&blog.tags.map((tag: string) => (<Link href={`/blog/tags/${tag}`} as={`/blog/tags/${tag}`}><div className="transition-opacity opacity-50 hover:opacity-100"><Badge color="gray">{capitalize(tag.replace('-', ' '))}</Badge></div></Link>- ))}+ ))} */}</div>- <Typography.Text className="m-0" type="secondary">- {blog.description}- </Typography.Text>-{/* <Typography><ReactMarkdown>{blog.content.substring(0, 210) + '...'}</ReactMarkdown></Typography>diff --git a/www/pages/blog.tsx b/www/pages/blog.tsxindex 520414bbc21..53877d220fd 100644--- a/www/pages/blog.tsx+++ b/www/pages/blog.tsx@@ -10,10 +10,21 @@ import { getSortedPosts, getAllCategories } from '~/lib/posts'import authors from 'lib/authors.json'import DefaultLayout from '~/components/Layouts/Default'-import { Typography, Badge, Space, Dropdown, Button, IconChevronDown } from '@supabase/ui'+import {+ Typography,+ Badge,+ Space,+ Dropdown,+ Button,+ IconChevronDown,+ Tabs,+ Input,+ IconMail,+} from '@supabase/ui'import PostTypes from '~/types/post'import BlogListItem from '~/components/Blog/BlogListItem'import BlogHeader from '~/components/Blog/BlogHeader'+import { Panel } from '@supabase/ui/dist/cjs/components/Tabs/Tabs'export async function getStaticProps() {const allPostsData = getSortedPosts('_blog')@@ -50,6 +61,13 @@ function Blog(props: any) {)}, [category])+ useEffect(() => {+ return props.categories.push('all')+ }, [])++ // append 'all' category+ // const categories = props.categories.push('all')+return (<><Head>@@ -62,26 +80,33 @@ function Blog(props: any) {</Head><NextSeo title="Blog" description="Latest news from the Supabase team." /><DefaultLayout>- <BlogHeader title="Blog" />-+ {/* <BlogHeader title="Blog" className="pb-0" /> */}<div className="bg-white dark:bg-dark-800 overflow-hidden py-12"><div className="container mx-auto px-8 sm:px-16 xl:px-20 mt-16"><div className="mx-auto ">- <Typography.Title level={3}>Latests post</Typography.Title>{props.blogs.slice(0, 1).map((blog: any, idx: any) => {return FeaturedThumb(blog)})}</div></div></div>+<div className="border-t dark:border-dark"><div className="container mx-auto px-8 sm:px-16 xl:px-20 mt-16"><div className="mx-auto "><div className="grid grid-cols-12">- <div className="col-span-12 lg:col-span-8">- <Typography.Title level={2}>More posts from the team</Typography.Title>+ <div className="col-span-12 lg:col-span-12">+ <Tabs scrollable size="medium" onChange={setCategory}>+ {props.categories.map((categoryId: string) => (+ <Tabs.Panel id={categoryId} label={categoryId}>+ {/* <p>{categoryId}</p> */}+ <></>+ </Tabs.Panel>+ ))}+ </Tabs>+ {/* <Typography.Title level={2}>More posts from the team</Typography.Title> */}</div>- <div className="col-span-12 lg:col-span-4 mt-4 lg:mt-0">+ {/* <div className="col-span-12 lg:col-span-4 mt-4 lg:mt-0"><Space className="lg:justify-end" size={6}><Typography.Text>Select a category</Typography.Text><Dropdown@@ -111,7 +136,7 @@ function Blog(props: any) {</Button></Dropdown></Space>- </div>+ </div> */}</div></div>@@ -119,7 +144,7 @@ function Blog(props: any) {<div className="grid grid-cols-12 mt-16 gap-16">{/* <ul> */}{blogs.map((blog: PostTypes, idx: number) => (- <div className="col-span-3 mb-16">+ <div className="col-span-4 mb-16"><BlogListItem blog={blog} key={idx} /></div>))}