The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
product highlight cards
Francesco Sansalvadored0421ebf7940
diff --git a/apps/www/components/InteractiveShimmerCard/index.tsx b/apps/www/components/InteractiveShimmerCard/index.tsxindex 095dd02a429..7c9a25ba215 100644--- a/apps/www/components/InteractiveShimmerCard/index.tsx+++ b/apps/www/components/InteractiveShimmerCard/index.tsx@@ -1,10 +1,23 @@import React, { PropsWithChildren, useEffect, useRef } from 'react'+interface Props {+ outerClassName?: string+ innerClassName?: string+ hasActiveOnHover?: boolean+ hasInnerShimmer?: boolean+ shimmerFromColor?: string+ shimmerToColor?: string+}+const InteractiveShimmerCard = ({outerClassName,innerClassName,+ hasActiveOnHover = false,+ hasInnerShimmer = false,+ shimmerFromColor,+ shimmerToColor,children,-}: PropsWithChildren<{ outerClassName?: string; innerClassName?: string }>) => {+}: PropsWithChildren<Props>) => {const outerRef = useRef(null)const innerRef = useRef(null)@@ -19,16 +32,20 @@ const InteractiveShimmerCard = ({x = event.clientX - elXy = event.clientY - elYconst isActive = x > -3 && x < width + 3 && y > -3 && y < height + 3- const activeGlow = isActive- ? `radial-gradient(65rem circle at ${x}px ${y}px, var(--colors-brand9), transparent), `- : ''+ const activeGlow =+ hasActiveOnHover && isActive+ ? `radial-gradient(65rem circle at ${x}px ${y}px, var(--colors-brand9), transparent), `+ : ''outerElement.style.background = isActive ? `var(--colors-brand9)` : `var(--colors-scale3)`outerElement.style.backgroundImage = `- ${activeGlow}radial-gradient(30rem circle at ${x}px ${y}px, var(--colors-scale9), var(--colors-scale6))`+ ${activeGlow}radial-gradient(30rem circle at ${x}px ${y}px, ${+ shimmerFromColor ?? 'var(--colors-scale8)'+ }, ${shimmerToColor ?? 'var(--colors-scale5)'})`- innerElement.style.backgroundImage = isActive- ? `radial-gradient(7rem circle at ${x}px ${y}px, var(--colors-scale5), transparent), radial-gradient(20rem circle at ${x}px ${y}px, var(--colors-scale4), transparent)`- : ''+ innerElement.style.backgroundImage =+ hasInnerShimmer && isActive+ ? `radial-gradient(7rem circle at ${x}px ${y}px, var(--colors-scale5), transparent), radial-gradient(20rem circle at ${x}px ${y}px, var(--colors-scale4), transparent)`+ : ''}useEffect(() => {@@ -50,7 +67,7 @@ const InteractiveShimmerCard = ({><divclassName={[- 'relative rounded-xl bg-scale-300 overflow-hidden transition-all flex flex-col text-slate-1100 lg:items-center lg:text-center',+ 'relative h-full rounded-xl bg-scale-300 overflow-hidden transition-all text-slate-1100',innerClassName,].join(' ')}>diff --git a/apps/www/components/Sections/HighlightCards.tsx b/apps/www/components/Sections/HighlightCards.tsxnew file mode 100644index 00000000000..de2c91d424e--- /dev/null+++ b/apps/www/components/Sections/HighlightCards.tsx@@ -0,0 +1,27 @@+import React from 'react'+import SectionContainer from '../Layouts/SectionContainer'+import InteractiveShimmerCard from '../InteractiveShimmerCard'++interface Highlight {+ image: string+ title: string+ paragraph: string+}++const HighlightCards = ({ highlights }: { highlights: Highlight[] }) => {+ return (+ <SectionContainer>+ <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">+ {highlights.map((highlight) => (+ <InteractiveShimmerCard innerClassName="flex flex-col p-8 !bg-scale-200">+ <div className="bg-scale-400 w-full aspect-square mb-4">image</div>+ <h3 className="text-lg text-scale-1200 font-medium mb-2">{highlight.title}</h3>+ <p>{highlight.paragraph}</p>+ </InteractiveShimmerCard>+ ))}+ </div>+ </SectionContainer>+ )+}++export default HighlightCardsdiff --git a/apps/www/data/products/vector/page.tsx b/apps/www/data/products/vector/page.tsxindex dde1907ce96..90af9a26423 100644--- a/apps/www/data/products/vector/page.tsx+++ b/apps/www/data/products/vector/page.tsx@@ -6,6 +6,28 @@ export const pageData = {component: '',},],+ highlights: [+ {+ title: 'Postgres pgvector',+ paragraph: 'Unleash the power of vector embeddings with Postgres pgvector.',+ image: 'asdfadsf',+ },+ {+ title: 'Connect with OpenAI',+ paragraph: 'Seamlessly integrate with Open AI for advanced AI capabilities.',+ image: 'asdfadsf',+ },+ {+ title: 'SOC 2 Type 2 compliant',+ paragraph: 'asdfadsf',+ image: 'asdfadsf',+ },+ {+ title: 'Hosted or Self-Hosted',+ paragraph: 'Choose the deployment option that suits your needs.',+ image: 'asdfadsf',+ },+ ],features: [{icon: 'M2.22628 8.76631C2.07453 6.92839 2.70175 5.03824 4.10791 3.63208C6.64632 1.09367 10.7619 1.09367 13.3003 3.63208C15.8387 6.17049 15.8387 10.2861 13.3003 12.8245C10.7619 15.3629 6.64632 15.3629 4.10791 12.8245C3.50852 12.2251 3.05066 11.5377 2.73434 10.804M0.516543 7.55176L2.23116 9.26638L3.94578 7.55176M5.95088 4.97787L11.3675 4.97787L11.3675 7.1379L5.95088 7.1379L5.95088 4.97787ZM6.2096 7.13777L11.0825 7.13777L11.0825 9.2978L6.2096 9.2978L6.2096 7.13777ZM5.95114 9.29726L11.3678 9.29726L11.3678 11.4573H5.95114V9.29726Z',diff --git a/apps/www/pages/vector/Vector.tsx b/apps/www/pages/vector/Vector.tsxindex 8259b3e1633..7b4459cb34e 100644--- a/apps/www/pages/vector/Vector.tsx+++ b/apps/www/pages/vector/Vector.tsx@@ -11,6 +11,8 @@ import APISection from '~/components/Sections/APISection'import ProductHeaderCentered from '~/components/Sections/ProductHeaderCentered'import VectorStyles from './vector.module.css'import FeaturesSection from '~/components/Sections/FeaturesSection'+import HighlightCards from '~/components/Sections/HighlightCards'+import { pageData } from '~/data/products/vector/page'import 'swiper/swiper.min.css'@@ -136,6 +138,8 @@ function VectorPage() {documentation_url={'/docs/guides/vector/broadcast'}/>+ <HighlightCards highlights={pageData.highlights} />+<SectionContainer><div className="grid grid-cols-12"><div className="prose col-span-12 mb-10 lg:col-span-3 lg:mb-0">@@ -199,24 +203,6 @@ function VectorPage() {<FeaturesSection />- {/* <SectionContainer>- <APISection- title="Simple and convenient APIs"- // @ts-ignore- content={ApiExamples}- size="large"- text={[- <p key={0}>- <p className="text-base lg:text-lg">- APIs that you can understand. With powerful libraries that work on client and- server-side applications.- </p>- </p>,- ]}- // [TODO] Point to the correct docs URL- documentation_link={'/docs/guides/vector/broadcast'}- />- </SectionContainer> */}<CommunitySlider /><CTABanner />