The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: update layouts and mobile support
Jonathan Summers-Muirb05e788c46b6
diff --git a/www/pages/blog.tsx b/www/pages/blog.tsxindex 0e0b9e26c93..d8d7035741c 100644--- a/www/pages/blog.tsx+++ b/www/pages/blog.tsx@@ -50,10 +50,14 @@ function Blog(props: any) {const { basePath } = useRouter()useEffect(() => {- // Update the document title using the browser API+ // contruct an array of blog posts+ // not inluding the first blog post+ const shiftedBlogs = [...props.blogs]+ shiftedBlogs.shift()+setBlogs(category === 'all'- ? props.blogs+ ? shiftedBlogs: props.blogs.filter((post: any) => {const found = post.tags.includes(category)return found@@ -80,7 +84,6 @@ function Blog(props: any) {</Head><NextSeo title="Blog" description="Latest news from the Supabase team." /><DefaultLayout>- {/* <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 ">@@ -108,18 +111,14 @@ function Blog(props: any) {</div></div>- <div className="">- <div className="">- <ol className="grid grid-cols-12 mt-16 gap-16">- {blogs.map((blog: PostTypes, idx: number) => (- <div className="col-span-4 mb-16">- <BlogListItem blog={blog} key={idx} />- </div>- ))}- </ol>- </div>{' '}- </div>- </div>+ <ol className="grid grid-cols-12 py-16 gap-8 lg:gap-16">+ {blogs.map((blog: PostTypes, idx: number) => (+ <div className="col-span-12 md:col-span-12 lg:col-span-6 xl:col-span-4 mb-16">+ <BlogListItem blog={blog} key={idx} />+ </div>+ ))}+ </ol>+ </div>{' '}</div></DefaultLayout></>@@ -154,7 +153,7 @@ function FeaturedThumb(blog: PostTypes) {<span className="text-xl">{blog.description}</span></Typography.Text>- <Space className="block">+ {/* <Space className="block">{blog.tags &&blog.tags.map((tag: string) => (<a href={`/blog/tags/${tag}`}>@@ -165,7 +164,7 @@ function FeaturedThumb(blog: PostTypes) {</a></a>))}- </Space>+ </Space> */}</Space></div>diff --git a/www/pages/blog/tags/[tag].tsx b/www/pages/blog/tags/[tag].tsxindex dc204d18791..26d9e45272f 100644--- a/www/pages/blog/tags/[tag].tsx+++ b/www/pages/blog/tags/[tag].tsx@@ -1,10 +1,12 @@import { NextSeo } from 'next-seo'import { getSortedPosts, getAllCategories } from '~/lib/posts'+import Link from 'next/link'import DefaultLayout from '~/components/Layouts/Default'import BlogListItem from '~/components/Blog/BlogListItem'import PostTypes from '~/types/post'import BlogHeader from '~/components/Blog/BlogHeader'+import { Typography } from '@supabase/ui'export async function getStaticProps({ params }: any) {const posts = getSortedPosts('_blog', 0, [params.tag])@@ -33,13 +35,24 @@ function TagBlogsPage(props: Props) {const { blogs, tag } = propsreturn (<>- <NextSeo title="Blog" description="Latest news from the Supabase team." />+ <NextSeo title={`Blog | ${tag}`} description="Latest news from the Supabase team." /><DefaultLayout>- <BlogHeader title={`${tag} posts`} />- <div className="mt-12 max-w-lg mx-auto grid lg:grid-cols-1 lg:max-w-none">- {blogs.map((blog: PostTypes, idx: number) => (- <BlogListItem blog={blog} key={idx} />- ))}+ {/* <BlogHeader title={`${tag} posts`} /> */}+ <div className="container mx-auto px-8 sm:px-16 xl:px-20 py-16">+ <div className="flex space-x-1">+ <Typography.Text type="secondary" className="cursor-pointer">+ <Link href="/blog">Blog</Link>+ </Typography.Text>+ <Typography.Text type="secondary">/</Typography.Text>+ <Typography.Text>{`${tag}`}</Typography.Text>+ </div>+ <ol className="grid grid-cols-12 py-16 gap-8 lg:gap-16">+ {blogs.map((blog: PostTypes, idx: number) => (+ <div className="col-span-12 md:col-span-12 lg:col-span-6 xl:col-span-4 mb-16">+ <BlogListItem blog={blog} key={idx} />+ </div>+ ))}+ </ol></div></DefaultLayout></>