Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

improve zoomable image component

Francesco Sansalvadore5b7868b53a5d
diff --git a/apps/www/components/ZoomableImg/ZoomContent.tsx b/apps/www/components/ZoomableImg/ZoomContent.tsx
index c41eda15c43..d76a994efd4 100644
--- a/apps/www/components/ZoomableImg/ZoomContent.tsx
+++ b/apps/www/components/ZoomableImg/ZoomContent.tsx
@@ -2,7 +2,17 @@ const ZoomContent = ({
img,
}: //onUnzoom,
any) => {
- return <figure className="[&_img]:rounded-md [&_img]:border">{img}</figure>
+ return (
+ <figure
+ className={`
+ [&_img]:rounded-md
+ [&_img]:border
+ [&_img]:bg-scale-100
+ `}
+ >
+ {img}
+ </figure>
+ )
}
export default ZoomContent
diff --git a/apps/www/components/ZoomableImg/ZoomableImg.tsx b/apps/www/components/ZoomableImg/ZoomableImg.tsx
index 291a3d4a964..8c157f76796 100644
--- a/apps/www/components/ZoomableImg/ZoomableImg.tsx
+++ b/apps/www/components/ZoomableImg/ZoomableImg.tsx
@@ -1,11 +1,17 @@
import Zoom from 'react-medium-image-zoom'
import ZoomContent from './ZoomContent'
+import { useBreakpoint } from 'common'
const ZoomableImg = ({ zoomable = true, children }: any) => {
+ const isMobile = useBreakpoint()
const Component = zoomable ? Zoom : 'span'
return (
- <Component {...(zoomable ? { ZoomContent: ZoomContent } : undefined)}>{children}</Component>
+ <Component
+ {...(zoomable ? { ZoomContent: ZoomContent, zoomMargin: isMobile ? 20 : 80 } : undefined)}
+ >
+ {children}
+ </Component>
)
}
diff --git a/apps/www/public/rss.xml b/apps/www/public/rss.xml
index 8434f50998e..14343dac0db 100644
--- a/apps/www/public/rss.xml
+++ b/apps/www/public/rss.xml
@@ -5,9 +5,16 @@
<link>https://supabase.com</link>
<description>Latest news from Supabase</description>
<language>en</language>
- <lastBuildDate>Wed, 09 Aug 2023 22:00:00 GMT</lastBuildDate>
+ <lastBuildDate>Thu, 10 Aug 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/supavisor-1-million</guid>
+ <title>Supavisor: Scaling Postgres to 1 Million Connections</title>
+ <link>https://supabase.com/blog/supavisor-1-million</link>
+ <description>Supavisor is a scalable, cloud-native Postgres connection pooler. We connected a million clients to it to see how it performs.</description>
+ <pubDate>Thu, 10 Aug 2023 22:00:00 GMT</pubDate>
+</item>
+<item>
<guid>https://supabase.com/blog/supabase-integrations-marketplace</guid>
<title>Supabase Integrations Marketplace</title>
<link>https://supabase.com/blog/supabase-integrations-marketplace</link>