The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
lw8: switch homepage lw8 visual with static image
Francesco Sansalvadore53ff8cee88d8
diff --git a/apps/www/components/Hero/Hero.tsx b/apps/www/components/Hero/Hero.tsxindex 1cc9750aafc..6aba7c1539c 100644--- a/apps/www/components/Hero/Hero.tsx+++ b/apps/www/components/Hero/Hero.tsx@@ -3,21 +3,17 @@ import { useRouter } from 'next/router'import Telemetry, { TelemetryEvent } from '~/lib/telemetry'import { useTelemetryProps } from 'common/hooks/useTelemetryProps'import gaEvents from '~/lib/gaEvents'-import { Badge, Button, IconArrowRight, IconBookOpen } from 'ui'+import { Button, IconArrowRight, IconBookOpen } from 'ui'import SectionContainer from '~/components/Layouts/SectionContainer'import HeroFrameworks from './HeroFrameworks'import styles from './hero.module.css'import Image from 'next/image'-import { range } from 'lodash'-import ParticlesCanvas from '../LaunchWeek/8/AnimatedParticles/ParticlesCanvas'-import { useBreakpoint } from 'common'import { useEffect, useState } from 'react'const Hero = () => {const router = useRouter()const [showAnnouncement, setShowAnnouncement] = useState(false)const telemetryProps = useTelemetryProps()- const isMobile = useBreakpoint()const sendTelemetryEvent = async (event: TelemetryEvent) => {await Telemetry.sendEvent(event, telemetryProps, router)}@@ -46,9 +42,9 @@ const Hero = () => {<Link href="/launch-week"><a className="group w-auto rounded-full p-1 mb-6 mt-8 md:mb-10 bg-gradient-to-b from-[#1b1f2124] to-[#02040550] hover:from-[#ffffff15] hover:to-[#ffffff05] transition-all backdrop-blur-lg border flex items-center justify-between gap-2 md:gap-4 text-scale-1100 hover:text-scale-1200 text-sm"><div className="text-scale-200 rounded-full bg-brand-900 px-3 py-1 flex items-center justify-center">- Get you ticket+ Get your ticket</div>- <span>Launch Week 8 - August 7th</span>+ <span>Launch Week 8 - August 7-11</span><IconArrowRightsize={16}className="transform mr-2 transition-transform translate-x-0 sm:-translate-x-1 group-hover:translate-x-0"@@ -97,23 +93,34 @@ const Hero = () => {</div></div></div>- <div className="absolute -top-2 md:top-0 -left-10 -right-10 md:left-0 md:right-0 h-[500px] lg:h-[550px] z-0">- <ParticlesCanvas users={range(0, 60)} />- <Image- src="/images/launchweek/8/stars.svg"- alt="starts background"- layout="fill"- objectFit="cover"- className="opacity-70"- draggable={false}- />+ <div className="absolute -top-2 md:top-0 -left-10 -right-10 md:left-0 md:right-0 h-[500px] lg:h-[550px] z-0 flex items-center justify-center">+ <div className="relative w-full aspect-[1.65/1] mb-14 max-w-sm md:max-w-md opacity-0 !animate-[fadeIn_0.5s_cubic-bezier(0.25,0.25,0,1)_0.5s_both]">+ <Image+ src="/images/launchweek/8/lw8-visual.png"+ alt="launch week 8 shape"+ layout="fill"+ objectFit="contain"+ quality={100}+ draggable={false}+ />+ </div>+ <div className="absolute inset-0">+ <Image+ src="/images/launchweek/8/stars.svg"+ alt="stars background"+ layout="fill"+ objectFit="cover"+ className="opacity-70"+ draggable={false}+ />+ </div></div></SectionContainer>- <div className="absolute w-full aspect-[1/1] md:aspect-[1.5/1] lg:aspect-[2.5/1] inset-0 z-0">+ <div className="absolute w-full max-w-[1600px] mx-auto h-[500px] lg:h-[750px] inset-0 z-0"><Imagesrc="/images/launchweek/8/LW8-gradient.png"layout="fill"- objectFit={isMobile ? 'cover' : 'contain'}+ objectFit="cover"objectPosition="top"prioritydraggable={false}diff --git a/apps/www/pages/index.tsx b/apps/www/pages/index.tsxindex 6b5d1b04f81..fc580b738dd 100644--- a/apps/www/pages/index.tsx+++ b/apps/www/pages/index.tsx@@ -1,5 +1,5 @@import dynamic from 'next/dynamic'-import { useEffect } from 'react'+import { useEffect, useState } from 'react'import { getSortedPosts } from '~/lib/posts'import PostTypes from '~/types/post'import Layout from '~/components/Layouts/Default'@@ -22,13 +22,14 @@ type Props = { customerStories: PostTypes[] }const Index = ({ customerStories }: Props) => {const { isDarkMode, toggleTheme } = useTheme()+ const [initialDarkMode] = useState(isDarkMode)useEffect(() => {toggleTheme(true)document.body.className = 'dark'return () => {document.body.className = ''- isDarkMode ? toggleTheme(true) : toggleTheme(false)+ toggleTheme(initialDarkMode)}}, [])diff --git a/apps/www/pages/launch-week/index.tsx b/apps/www/pages/launch-week/index.tsxindex 5805ff40a30..a44ac87bf85 100644--- a/apps/www/pages/launch-week/index.tsx+++ b/apps/www/pages/launch-week/index.tsx@@ -51,6 +51,7 @@ export default function TicketHome({ users }: Props) {const [supabase, setSupabase] = useState<SupabaseClient | null>(null)const [session, setSession] = useState<Session | null>(null)const { isDarkMode, toggleTheme } = useTheme()+ const [initialDarkMode] = useState(isDarkMode)const defaultUserData = {id: query.id?.toString(),@@ -89,11 +90,11 @@ export default function TicketHome({ users }: Props) {}, [supabase])useEffect(() => {- if (!isDarkMode) toggleTheme(true)+ toggleTheme(true)document.body.className = 'dark bg-[#020405]'return () => {document.body.className = ''- isDarkMode ? toggleTheme(true) : toggleTheme(false)+ toggleTheme(initialDarkMode)}}, [])diff --git a/apps/www/pages/launch-week/tickets/[username].tsx b/apps/www/pages/launch-week/tickets/[username].tsxindex e8beb3d663c..37808e679e4 100644--- a/apps/www/pages/launch-week/tickets/[username].tsx+++ b/apps/www/pages/launch-week/tickets/[username].tsx@@ -44,6 +44,7 @@ export default function UsernamePage({ user, users, ogImageUrl }: Props) {const [supabase, setSupabase] = useState<SupabaseClient | null>(null)const [session, setSession] = useState<Session | null>(null)const { isDarkMode, toggleTheme } = useTheme()+ const [initialDarkMode] = useState(isDarkMode)const [pageState, setPageState] = useState<PageState>('ticket')@@ -63,11 +64,11 @@ export default function UsernamePage({ user, users, ogImageUrl }: Props) {}, [])useEffect(() => {- if (!isDarkMode) toggleTheme(true)+ toggleTheme(true)document.body.className = 'dark bg-[#020405]'return () => {document.body.className = ''- isDarkMode ? toggleTheme(true) : toggleTheme(false)+ toggleTheme(initialDarkMode)}}, [])diff --git a/apps/www/pages/launch-week/tickets/index.tsx b/apps/www/pages/launch-week/tickets/index.tsxindex af06cc0db4a..6feffbfbc68 100644--- a/apps/www/pages/launch-week/tickets/index.tsx+++ b/apps/www/pages/launch-week/tickets/index.tsx@@ -45,6 +45,7 @@ export default function TicketsPage({ users }: Props) {const OG_IMAGE = `${SITE_ORIGIN}/images/launchweek/8/lw8-og.jpg`const { isDarkMode, toggleTheme } = useTheme()+ const [initialDarkMode] = useState(isDarkMode)const [isLoading, setIsLoading] = useState(false)const [offset, setOffset] = useState(1)const [isLast, setIsLast] = useState(false)@@ -93,11 +94,11 @@ export default function TicketsPage({ users }: Props) {}, [])useEffect(() => {- if (!isDarkMode) toggleTheme(true)+ toggleTheme(true)document.body.className = 'dark bg-[#020405]'return () => {document.body.className = ''- isDarkMode ? toggleTheme(true) : toggleTheme(false)+ toggleTheme(initialDarkMode)}}, [])diff --git a/apps/www/public/images/launchweek/8/lw8-visual.png b/apps/www/public/images/launchweek/8/lw8-visual.pngnew file mode 100644index 00000000000..5098a5da360Binary files /dev/null and b/apps/www/public/images/launchweek/8/lw8-visual.png differdiff --git a/apps/www/public/planetpg-egor_romanov-rss.xml b/apps/www/public/planetpg-egor_romanov-rss.xmlnew file mode 100644index 00000000000..6eddea8089c--- /dev/null+++ b/apps/www/public/planetpg-egor_romanov-rss.xml@@ -0,0 +1,19 @@++ <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">+ <channel>+ <title>'Postgres | Supabase Blog</title>+ <link>https://supabase.com/blog</link>+ <description>Latest Postgres news from Egor Romanov at Supabase</description>+ <language>en</language>+ <lastBuildDate>Wed, 12 Jul 2023 22:00:00 GMT</lastBuildDate>+ <atom:link href="https://supabase.com/planetpg-egor_romanov-rss.xml" rel="self" type="application/rss+xml"/>+ <item>+ <guid>https://supabase.com/blog/pgvector-performance</guid>+ <title>pgvector 0.4.0 performance</title>+ <link>https://supabase.com/blog/pgvector-performance</link>+ <description>There's been lot of talk about pgvector performance lately, so we took some datasets and pushed pgvector to the limits to find out its strengths and limitations.</description>+ <pubDate>Wed, 12 Jul 2023 22:00:00 GMT</pubDate>+</item>++ </channel>+ </rss>diff --git a/apps/www/public/planetpg-pavel-rss.xml b/apps/www/public/planetpg-pavel-rss.xmlindex c5be079063a..b0e33cbb033 100644--- a/apps/www/public/planetpg-pavel-rss.xml+++ b/apps/www/public/planetpg-pavel-rss.xml@@ -5,9 +5,16 @@<link>https://supabase.com/blog</link><description>Latest Postgres news from Pavel Borisov at Supabase</description><language>en</language>- <lastBuildDate>Thu, 15 Dec 2022 23:00:00 GMT</lastBuildDate>+ <lastBuildDate>Wed, 12 Jul 2023 22:00:00 GMT</lastBuildDate><atom:link href="https://supabase.com/planetpg-pavel-rss.xml" rel="self" type="application/rss+xml"/><item>+ <guid>https://supabase.com/blog/pgvector-performance</guid>+ <title>pgvector 0.4.0 performance</title>+ <link>https://supabase.com/blog/pgvector-performance</link>+ <description>There's been lot of talk about pgvector performance lately, so we took some datasets and pushed pgvector to the limits to find out its strengths and limitations.</description>+ <pubDate>Wed, 12 Jul 2023 22:00:00 GMT</pubDate>+</item>+<item><guid>https://supabase.com/blog/new-in-postgres-15</guid><title>What's new in Postgres 15?</title><link>https://supabase.com/blog/new-in-postgres-15</link>diff --git a/apps/www/public/rss.xml b/apps/www/public/rss.xmlindex d04b0a987a4..536de2d4ecd 100644--- a/apps/www/public/rss.xml+++ b/apps/www/public/rss.xml@@ -5,9 +5,23 @@<link>https://supabase.com</link><description>Latest news from Supabase</description><language>en</language>- <lastBuildDate>Tue, 11 Jul 2023 22:00:00 GMT</lastBuildDate>+ <lastBuildDate>Mon, 17 Jul 2023 22:00:00 GMT</lastBuildDate><atom:link href="https://supabase.com/rss.xml" rel="self" type="application/rss+xml"/><item>+ <guid>https://supabase.com/blog/flutter-authentication</guid>+ <title>Getting started with Flutter authentication</title>+ <link>https://supabase.com/blog/flutter-authentication</link>+ <description>Learn how authentication on Flutter works through Google sign in with Supabase auth.</description>+ <pubDate>Mon, 17 Jul 2023 22:00:00 GMT</pubDate>+</item>+<item>+ <guid>https://supabase.com/blog/pgvector-performance</guid>+ <title>pgvector 0.4.0 performance</title>+ <link>https://supabase.com/blog/pgvector-performance</link>+ <description>There's been lot of talk about pgvector performance lately, so we took some datasets and pushed pgvector to the limits to find out its strengths and limitations.</description>+ <pubDate>Wed, 12 Jul 2023 22:00:00 GMT</pubDate>+</item>+<item><guid>https://supabase.com/blog/postgrest-11-1-release</guid><title>What is new in PostgREST v11.1?</title><link>https://supabase.com/blog/postgrest-11-1-release</link>@@ -400,9 +414,9 @@<pubDate>Wed, 23 Nov 2022 23:00:00 GMT</pubDate></item><item>- <guid>https://supabase.com/blog/flutter-authentication-and-authorization-with-rls</guid>- <title>Flutter Authentication and Authorization with RLS</title>- <link>https://supabase.com/blog/flutter-authentication-and-authorization-with-rls</link>+ <guid>https://supabase.com/blog/flutter-authorization-with-rls</guid>+ <title>Flutter Authorization with RLS</title>+ <link>https://supabase.com/blog/flutter-authorization-with-rls</link><description>Learn how you can secure your Flutter app using Supabase Row Level Security.</description><pubDate>Mon, 21 Nov 2022 23:00:00 GMT</pubDate></item>diff --git a/packages/common/Providers.tsx b/packages/common/Providers.tsxindex 0312f11c17a..4da5e7d6e2a 100644--- a/packages/common/Providers.tsx+++ b/packages/common/Providers.tsx@@ -29,7 +29,7 @@ export const ThemeProvider = ({detectSystemColorPreference = true,children,}: ThemeProviderProps) => {- const [isDarkMode, setIsDarkMode] = useState(false)+ const [isDarkMode, setIsDarkMode] = useState(true)useEffect(() => {const key = localStorage.getItem('supabaseDarkMode')@@ -37,11 +37,13 @@ export const ThemeProvider = ({// and detectSystemColorPreference is false// default to dark modeconst hasNoKey = key === null- const isDarkMode = hasNoKey || key === 'true'+ const shouldBeDarkMode = hasNoKey || key === 'true'const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches- hasNoKey && detectSystemColorPreference ? toggleTheme(prefersDark) : toggleTheme(isDarkMode)+ hasNoKey && detectSystemColorPreference+ ? toggleTheme(prefersDark)+ : toggleTheme(shouldBeDarkMode)}, [])const toggleTheme: UseThemeProps['toggleTheme'] = (darkMode) => {