Skip to content

Commit c62c275

Browse files
solutions pages (supabase#36628)
* solutions: supabse for beginner * solutions: supabse for beginner * solutions: supabse for beginner * solutions: supabse for beginner * solutions: supabase for developers * solutions: supabase for postgres developers * solutions: supabase for no-coders * solutions: no code builders * solutions: sticky nav * solutions pages * fix metadata * add ai prompts to no code page * prerify * Solutions dropdown nav * update footer * update mobile menu * fix visual * chore: add startups solution page * chore: startups page * chore: metadata * chore: update solutions labels * chore: remove old export * fix footer links
1 parent 6f5982d commit c62c275

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+8454
-495
lines changed

apps/www/components/CodeBlock/CodeBlock.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ import kotlin from 'react-syntax-highlighter/dist/cjs/languages/hljs/kotlin'
99
import py from 'react-syntax-highlighter/dist/cjs/languages/hljs/python'
1010
import sql from 'react-syntax-highlighter/dist/cjs/languages/hljs/sql'
1111
import yaml from 'react-syntax-highlighter/dist/cjs/languages/hljs/yaml'
12+
import json from 'react-syntax-highlighter/dist/cjs/languages/hljs/json'
1213
import { Button, cn } from 'ui'
1314
import monokaiCustomTheme from './CodeBlock.utils'
1415

15-
export type LANG = 'js' | 'sql' | 'py' | 'bash' | 'ts' | 'tsx' | 'kotlin' | 'yaml'
16+
export type LANG = 'js' | 'sql' | 'py' | 'bash' | 'ts' | 'tsx' | 'kotlin' | 'yaml' | 'json'
1617
export interface CodeBlockProps {
1718
lang: LANG
1819
startingLineNumber?: number
@@ -62,6 +63,7 @@ function CodeBlock(props: CodeBlockProps) {
6263
SyntaxHighlighter.registerLanguage('bash', bash)
6364
SyntaxHighlighter.registerLanguage('kotlin', kotlin)
6465
SyntaxHighlighter.registerLanguage('yaml', yaml)
66+
SyntaxHighlighter.registerLanguage('json', json)
6567

6668
// const large = props.size === 'large' ? true : false
6769
const large = false

apps/www/components/Enterprise/Security.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React, { FC } from 'react'
2-
import type { LucideIcon } from 'lucide-react'
3-
42
import { TextLink } from 'ui'
53
import SectionContainer from '~/components/Layouts/SectionContainer'
64

7-
interface Props {
5+
import type { LucideIcon } from 'lucide-react'
6+
7+
export interface SecuritySectionProps {
88
id: string
99
label: string | JSX.Element
1010
heading: string | JSX.Element
@@ -27,7 +27,7 @@ type FeatureProps = {
2727
heading: string
2828
}
2929

30-
const EnterpriseSecurity: FC<Props> = (props) => {
30+
const EnterpriseSecurity: FC<SecuritySectionProps> = (props) => {
3131
return (
3232
<SectionContainer
3333
id={props.id}

apps/www/components/Footer/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ const Footer = (props: Props) => {
6262
<div className="w-full h-px bg-gradient-to-r from-transparent via-border to-transparent" />
6363
</div>
6464
<SectionContainer className="py-8">
65-
<div className="xl:grid xl:grid-cols-3 xl:gap-8">
66-
<div className="space-y-8 xl:col-span-1">
65+
<div className="xl:grid xl:grid-cols-7 xl:gap-4">
66+
<div className="space-y-8 xl:col-span-2">
6767
<Link href="#" as="/" className="w-40">
6868
<Image
6969
src={supabaseLogoWordmarkLight}
@@ -116,8 +116,8 @@ const Footer = (props: Props) => {
116116
</a>
117117
</div>
118118
</div>
119-
<div className="mt-12 grid grid-cols-1 gap-8 xl:col-span-2 xl:mt-0">
120-
<div className="grid grid-cols-2 gap-8 md:grid-cols-4">
119+
<div className="mt-12 grid grid-cols-1 gap-8 xl:col-span-5 xl:mt-0">
120+
<div className="grid grid-cols-2 gap-4 md:grid-cols-5">
121121
{footerData.map((segment) => {
122122
return (
123123
<div key={`footer_${segment.title}`}>

apps/www/components/Hero/HeroFrameworks.tsx

Lines changed: 11 additions & 11 deletions
Large diffs are not rendered by default.

apps/www/components/Nav/MobileMenu.tsx

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ const MobileMenu = ({ open, setOpen, menu }: Props) => {
9797
</Link>
9898
</>
9999
) : menuItem.title === 'Developers' ? (
100-
<div className="px-3 mb-2 flex flex-col gap-2">
100+
<div className="px-3 mb-2 flex flex-col gap-6">
101101
{menuItem.subMenu['navigation'].map((column: any) => (
102102
<div key={column.label} className="flex flex-col gap-3">
103103
{column.label !== 'Developers' && (
104-
<label className="text-foreground-lighter text-xs uppercase tracking-widest font-mono mt-4">
104+
<label className="text-foreground-lighter text-xs uppercase tracking-widest font-mono">
105105
{column.label}
106106
</label>
107107
)}
@@ -136,6 +136,27 @@ const MobileMenu = ({ open, setOpen, menu }: Props) => {
136136
/>
137137
</div>
138138
</div>
139+
) : menuItem.title === 'Solutions' ? (
140+
<div className="px-3 mb-2 flex flex-col gap-6">
141+
{menuItem.subMenu['navigation'].map((column: any) => (
142+
<div key={column.label} className="flex flex-col gap-3">
143+
{column.label !== 'Solutions' && (
144+
<label className="text-foreground-lighter text-xs uppercase tracking-widest font-mono">
145+
{column.label}
146+
</label>
147+
)}
148+
{column.links.map((link: any) => (
149+
<TextLink
150+
hasChevron={false}
151+
key={link.text}
152+
url={link.url}
153+
label={link.text}
154+
className="focus-visible:ring-offset-4 focus-visible:ring-offset-background-overlay !mt-0"
155+
/>
156+
))}
157+
</div>
158+
))}
159+
</div>
139160
) : null}
140161
</>
141162
)

apps/www/components/Nav/ProductDropdown.tsx

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ import { TextLink } from 'ui'
99
import { NavigationMenuLink } from 'ui/src/components/shadcn/ui/navigation-menu'
1010
import MenuItem from './MenuItem'
1111

12-
import ComparisonsData from '~/data/Comparisons'
13-
import SolutionsData from '~/data/Solutions'
14-
import CustomersData from '~/data/CustomerStories'
15-
import MainProductsData from '~/data/MainProducts'
16-
import ProductModulesData from '~/data/ProductModules'
12+
import ComparisonsData from 'data/Comparisons'
13+
import CustomersData from 'data/CustomerStories'
14+
import MainProductsData from 'data/MainProducts'
15+
import ProductModulesData from 'data/ProductModules'
1716

1817
const ProductDropdown = () => {
1918
const { basePath } = useRouter()
@@ -178,23 +177,6 @@ const ProductDropdown = () => {
178177
))}
179178
</ul>
180179
</div>
181-
<div className="col-span-2">
182-
<p className="text-foreground-lighter text-xs uppercase tracking-widest font-mono mb-3">
183-
{SolutionsData.label}
184-
</p>
185-
<ul className="flex flex-col gap-2">
186-
{SolutionsData.solutions.map((link) => (
187-
<li key={link.text}>
188-
<TextLink
189-
chevronAnimation="fadeIn"
190-
url={link.url}
191-
label={link.text}
192-
className="mt-0 hover:text-foreground focus-visible:text-foreground focus-visible:ring-offset-4 focus-visible:ring-offset-background-overlay"
193-
/>
194-
</li>
195-
))}
196-
</ul>
197-
</div>
198180
</div>
199181
</div>
200182
</div>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { ChevronRight } from 'lucide-react'
2+
import Link from 'next/link'
3+
4+
import { navData as DevelopersData } from 'data/Solutions'
5+
6+
type LinkProps = {
7+
text: string
8+
description?: string
9+
url?: string
10+
icon?: any
11+
svg?: any
12+
}
13+
14+
const SolutionsDropdown = () => (
15+
<div className="flex flex-col xl:flex-row">
16+
<div className="w-[550px] xl:w-[470px] py-8 px-8 bg-background grid gap-3 grid-cols-2">
17+
{DevelopersData['navigation'].map((column) => (
18+
<div key={column.label} className="p-0 flex flex-col gap-6">
19+
<label className="text-foreground-lighter text-xs uppercase tracking-widest font-mono">
20+
{column.label}
21+
</label>
22+
<ul className="flex flex-col gap-4">
23+
{column.links.map(({ icon: Icon, ...link }: LinkProps) => (
24+
<li key={link.text}>
25+
<Link
26+
href={link.url!}
27+
className="flex group items-center gap-2 text-foreground-light text-sm hover:text-foreground focus-visible:text-foreground focus-visible:ring-2 focus-visible:outline-none focus-visible:rounded focus-visible:ring-foreground-lighter"
28+
>
29+
{Icon && <Icon size={16} strokeWidth={1.3} />}
30+
<span>{link.text}</span>
31+
<ChevronRight
32+
strokeWidth={2}
33+
className="w-3 -ml-1 transition-all will-change-transform -translate-x-1 opacity-0 group-hover:translate-x-0 group-hover:opacity-100"
34+
/>
35+
</Link>
36+
</li>
37+
))}
38+
</ul>
39+
</div>
40+
))}
41+
</div>
42+
</div>
43+
)
44+
45+
export default SolutionsDropdown

apps/www/components/Nav/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import RightClickBrandLogo from './RightClickBrandLogo'
2525
import { useSendTelemetryEvent } from '~/lib/telemetry'
2626
import useDropdownMenu from './useDropdownMenu'
2727
import { AnnouncementBanner, AuthenticatedDropdownMenu } from 'ui-patterns'
28-
import Announcement from '../LaunchWeek/7/LaunchSection/Announcement'
2928

3029
interface Props {
3130
hideNavbar: boolean

apps/www/components/Pricing/ComputePricingCalculator.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const findIntanceValueByColumn = (instance: any, column: string) =>
3030

3131
const parsePrice = (price: string) => parseInt(price?.toString().replace('$', '').replace(',', ''))
3232

33-
const ComputePricingCalculator = () => {
33+
const ComputePricingCalculator = ({ disableInteractivity }: { disableInteractivity?: boolean }) => {
3434
const computeInstances = pricingAddOn.database.rows
3535
const priceSteps = computeInstances.map((instance) =>
3636
parsePrice(findIntanceValueByColumn(instance, 'pricing'))
@@ -290,12 +290,13 @@ const ComputePricingCalculator = () => {
290290
type="outline"
291291
block
292292
icon={<Plus />}
293-
onClick={() =>
293+
onClick={() => {
294+
if (disableInteractivity) return
294295
setActiveInstances([
295296
...activeInstances,
296297
{ ...computeInstances[0], position: activeInstances.length },
297298
])
298-
}
299+
}}
299300
className="w-full border-dashed text-foreground-light hover:text-foreground"
300301
>
301302
<span className="w-full text-left">Add Project</span>

apps/www/components/Products/DatabaseVisual.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@ import { cn } from 'ui'
55

66
interface Props {
77
className?: string
8+
hasGlow?: boolean
89
}
910

10-
const DatabaseVisual: React.FC<Props> = ({ className }) => {
11+
const DatabaseVisual: React.FC<Props> = ({ className, hasGlow = true }) => {
1112
const containerRef = useRef(null)
1213
const ref = useRef(null)
1314
const [gradientPos, setGradientPos] = useState({ x: 0, y: 0 })
1415
const isSafari = isBrowser && detectBrowser() === 'Safari'
1516

1617
const handleGlow = (event: any) => {
17-
if (!ref.current || !containerRef.current) return null
18+
if (!ref.current || !containerRef.current || !hasGlow) return null
1819

1920
const containerRefElement = containerRef.current as HTMLDivElement
2021

@@ -59,14 +60,15 @@ const DatabaseVisual: React.FC<Props> = ({ className }) => {
5960
role="img"
6061
aria-label="Supabase Postgres database visual composition"
6162
>
62-
<span className="absolute w-full md:w-auto h-full md:aspect-square flex items-end md:items-center justify-center md:justify-end right-0 left-0 md:left-auto xl:-right-12 2xl:right-0 top-12 md:top-0 md:bottom-0 my-auto">
63+
<span className="absolute group w-full md:w-auto h-full md:aspect-square flex items-end md:items-center justify-center md:justify-end right-0 left-0 md:left-auto xl:-right-12 2xl:right-0 top-12 md:top-0 md:bottom-0 my-auto">
6364
<Image
6465
src="/images/index/products/database-dark.png"
6566
alt="Supabase Postgres database"
6667
fill
6768
priority
6869
quality={100}
6970
sizes="100%"
71+
draggable={false}
7072
className="hidden dark:block absolute antialiased inset-0 object-contain object-center z-0 w-full md:w-auto h-full transition-opacity group-hover:opacity-80"
7173
/>
7274
<Image
@@ -75,6 +77,7 @@ const DatabaseVisual: React.FC<Props> = ({ className }) => {
7577
fill
7678
priority
7779
quality={100}
80+
draggable={false}
7881
sizes="100%"
7982
className="dark:hidden absolute antialiased inset-0 object-contain object-center z-0 w-full md:w-auto h-full transition-opacity group-hover:opacity-80"
8083
/>

0 commit comments

Comments
 (0)