Skip to content

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

fix: flyout menu layout issues

Jonathan Summers-Muir8e6bf3d3f526
diff --git a/www/components/Nav/Developers.tsx b/www/components/Nav/Developers.tsx
index 35f7711ef64..1a48ee169cf 100644
--- a/www/components/Nav/Developers.tsx
+++ b/www/components/Nav/Developers.tsx
@@ -34,7 +34,9 @@ const Developers = () => {
</svg>
<div className="ml-4">
<Typography.Title level={5}>{text}</Typography.Title>
- <Typography.Text>{description}</Typography.Text>
+ <Typography.Text>
+ <p>{description}</p>
+ </Typography.Text>
</div>
</a>
)
@@ -42,7 +44,7 @@ const Developers = () => {
<a
key={text}
href={url}
- className="-m-3 p-3 flex flex-col justify-between rounded-lg transition ease-in-out duration-150"
+ className="p-3 col-span-6 rounded hover:bg-gray-50 dark:hover:bg-dark-700 transition"
>
{content}
</a>
@@ -57,22 +59,19 @@ const Developers = () => {
})
return (
- <React.Fragment>
- <nav
- className="grid gap-y-10 px-4 py-8 sm:grid-cols-2 sm:gap-x-8 sm:py-12 sm:px-6 lg:px-8 xl:pr-12"
- aria-labelledby="solutionsHeading"
- >
- {iconSections}
+ <div className="grid grid-cols-12">
+ <nav className="col-span-6" aria-labelledby="solutionsHeading">
+ <div className="grid grid-cols-12 m-3 gap-3">{iconSections}</div>
</nav>
- <div className="px-4 py-8 sm:py-12 sm:px-6 lg:px-8 xl:pl-12">
- <div>
+ <div className="col-span-6">
+ <div className="m-3 mx-6">
<Typography.Text type="secondary">Latest announcements</Typography.Text>
<ul className="mt-6 space-y-16">
{AnnouncementsData.map((caseStudy: any, idx: number) => (
<li className="flow-root" key={`flyout_case_${idx}`}>
<a
href={caseStudy.url}
- className="-m-3 p-3 flex rounded-lg hover:bg-gray-100 dark:hover:bg-dark-600 transition ease-in-out duration-150"
+ className="p-3 flex rounded-lg hover:bg-gray-100 dark:hover:bg-dark-700 transition ease-in-out duration-150 border dark:border-gray-600"
>
<div className="hidden sm:block flex-shrink-0">
<img
@@ -82,7 +81,9 @@ const Developers = () => {
/>
</div>
<div className="min-w-0 flex-1 sm:ml-8">
- <Typography.Title level={5}>{caseStudy.title}</Typography.Title>
+ <Typography.Title level={5} className="mb-0">
+ {caseStudy.title}
+ </Typography.Title>
<Typography.Text type="secondary">{caseStudy.description}</Typography.Text>
</div>
</a>
@@ -91,7 +92,7 @@ const Developers = () => {
</ul>
</div>
</div>
- </React.Fragment>
+ </div>
)
}
diff --git a/www/components/Nav/Product.tsx b/www/components/Nav/Product.tsx
index db2cf565379..441b96e5b69 100644
--- a/www/components/Nav/Product.tsx
+++ b/www/components/Nav/Product.tsx
@@ -7,6 +7,7 @@ import { Typography, Badge } from '@supabase/ui'
const Product = () => {
const { basePath } = useRouter()
+
const iconSections = Object.values(SolutionsData).map((solution) => {
const { name, description, icon, label, url } = solution
@@ -14,57 +15,51 @@ const Product = () => {
<div className="flex lg:flex-col">
<div className="flex flex-row items-center">
<ProductIcon icon={icon} />
- <Typography.Title level={5} className="ml-3 mb-0">
- {name}{' '}
- {label && (
- <div className="ml-3">
- <Badge>{label}</Badge>
- </div>
- )}
- </Typography.Title>
+ <div>
+ <Typography.Title level={5} className="ml-3 mb-0">
+ {name}
+ </Typography.Title>
+ </div>
</div>
<div className="ml-4 md:flex-1 md:flex md:flex-col md:justify-between lg:ml-0 lg:mt-4">
<Typography.Text>
<p className="mt-1 text-sm">{description}</p>
</Typography.Text>
+ {label && (
+ <div>
+ <Badge>{label}</Badge>
+ </div>
+ )}
</div>
</div>
)
- return url ? (
- <a
- key={name}
- href={url}
- className="-m-3 p-3 flex flex-col justify-between rounded-lg hover:bg-gray-50 dark:hover:bg-dark-700 transition ease-in-out duration-150"
- >
- {content}
- </a>
- ) : (
- <div
- key={name}
- className="-m-3 p-3 flex flex-col justify-between rounded-lg transition ease-in-out duration-150"
- >
- {content}
- </div>
+ return (
+ url && (
+ <a
+ key={name}
+ href={url}
+ className="p-3 col-span-6 rounded hover:bg-gray-50 dark:hover:bg-dark-700 transition"
+ >
+ {content}
+ </a>
+ )
)
})
return (
- <React.Fragment>
- <nav
- className="grid gap-y-10 px-4 py-8 sm:grid-cols-2 sm:gap-x-8 sm:py-12 sm:px-6 lg:px-8 xl:pr-12"
- aria-labelledby="solutionsHeading"
- >
- {iconSections}
+ <div className="grid grid-cols-12">
+ <nav className="col-span-6" aria-labelledby="solutionsHeading">
+ <div className="grid grid-cols-12 m-3 gap-3">{iconSections}</div>
</nav>
- <div className="px-4 py-8 sm:py-12 sm:px-6 lg:px-8 xl:pl-12">
- <div>
+ <div className="col-span-6">
+ <div className="m-3 mx-6">
<Typography.Text type="secondary">Latest case studies</Typography.Text>
- <ul className="mt-6 space-y-6">
+ <ul className="mt-6 space-y-3">
{CaseStudiesData.map((caseStudy: any, idx: number) => (
<li className="flow-root" key={`flyout_case_${idx}`}>
<a
href={caseStudy.url}
- className="-m-3 p-3 flex rounded-lg hover:bg-gray-100 dark:hover:bg-dark-600 transition ease-in-out duration-150"
+ className="p-3 flex rounded-lg hover:bg-gray-100 dark:hover:bg-dark-700 transition ease-in-out duration-150 border dark:border-gray-600"
>
<div className="hidden sm:block flex-shrink-0">
<img
@@ -74,8 +69,10 @@ const Product = () => {
/>
</div>
<div className="min-w-0 flex-1 sm:ml-8">
- <Typography.Title level={5}>{caseStudy.title}</Typography.Title>
- <Typography.Text type="secondary">{caseStudy.description}</Typography.Text>
+ <Typography.Title level={5} className="mb-0">
+ {caseStudy.title}
+ </Typography.Title>
+ <Typography.Text>{caseStudy.description}</Typography.Text>
</div>
</a>
</li>
@@ -83,7 +80,7 @@ const Product = () => {
</ul>
</div>
</div>
- </React.Fragment>
+ </div>
)
}
diff --git a/www/components/UI/FlyOut.tsx b/www/components/UI/FlyOut.tsx
index e85c8dd466b..ec583b6e992 100644
--- a/www/components/UI/FlyOut.tsx
+++ b/www/components/UI/FlyOut.tsx
@@ -82,10 +82,9 @@ const FlyOut = (props: Props) => {
singleBgColor ? 'bg-white dark:bg-dark-600' : 'bg-gray-50 dark:bg-gray-800'
} sm:w-full sm:h-1/2 lg:w-1/2 lg:h-full`}
/>
- {/* <div className="bg-gray-50 dark:bg-dark-300 md:hidden lg:block lg:w-1/2"></div> */}
</div>
<div
- className={`relative max-w-7xl mx-auto grid grid-cols-1 lg:grid-cols-2 ${className}`}
+ className={`container relative mx-auto lg:grid-cols-2 px-6 lg:px-10 xl:px-14 py-2`}
>
{children}
</div>
diff --git a/www/data/CaseStudies.json b/www/data/CaseStudies.json
index 575e8480205..5da61cb846a 100644
--- a/www/data/CaseStudies.json
+++ b/www/data/CaseStudies.json
@@ -15,22 +15,6 @@
},
"ctaText": "View case study"
},
- {
- "type": "Case Study",
- "title": "A no-code website builder, deployed in seven days.",
- "description": "See how Tayfa went from idea to paying customer in less than 30 days.",
- "imgUrl": "images/case-study-tayfab.jpg",
- "logoUrl": "images/logos/monitoro.png",
- "organization": "Tayfab",
- "url": "/blog/2020/12/02/case-study-tayfa",
- "postMeta": {
- "name": "Paul Copplestone",
- "avatarUrl": "https://avatars0.githubusercontent.com/u/10214025?v=4",
- "publishDate": "Mar 27, 2020",
- "readLength": 5
- },
- "ctaText": "View case study"
- },
{
"type": "Case Study",
"title": "Counter-fraud watchlists for the fintech industry.",