Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/docs/app/contributing/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import { notFound } from 'next/navigation'
import { readFile } from 'node:fs/promises'
import { dirname, join } from 'node:path'
import { fileURLToPath } from 'node:url'

import { isFeatureEnabled } from 'common'
import { ContributingToc } from '~/app/contributing/ContributingToC'
import { MDXRemoteBase } from '~/features/docs/MdxBase'
import { LayoutMainContent } from '~/layouts/DefaultLayout'
import { SidebarSkeleton } from '~/layouts/MainSkeleton'
import Breadcrumbs from '~/components/Breadcrumbs'

export default async function ContributingPage() {
if (!isFeatureEnabled('docs:contribution')) {
notFound()
}

const contentFile = join(dirname(fileURLToPath(import.meta.url)), 'content.mdx')
const content = await readFile(contentFile, 'utf-8')

Expand Down
122 changes: 63 additions & 59 deletions apps/docs/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,36 +256,37 @@ const HomePage = () => (
})}
</div>
</div>
{isFeatureEnabled('docs:full_getting_started') && (
<div className="flex flex-col lg:grid grid-cols-12 gap-6 py-12 border-b">
<div className="col-span-4 flex flex-col gap-1 [&_h2]:m-0">
<h2 id="migrate-to-supabase" className="group scroll-mt-24">
Migrate to Supabase
</h2>
<p className="text-foreground-light text-sm p-0 m-0">
Bring your existing data, auth and storage to Supabase following our migration guides.
</p>
<TextLink
label="Explore more resources"
url="/guides/resources"
className="no-underline text-brand-link text-sm"
/>
</div>

<div className="flex flex-col lg:grid grid-cols-12 gap-6 py-12 border-b">
<div className="col-span-4 flex flex-col gap-1 [&_h2]:m-0">
<h2 id="migrate-to-supabase" className="group scroll-mt-24">
Migrate to Supabase
</h2>
<p className="text-foreground-light text-sm p-0 m-0">
Bring your existing data, auth and storage to Supabase following our migration guides.
</p>
<TextLink
label="Explore more resources"
url="/guides/resources"
className="no-underline text-brand-link text-sm"
/>
<ul className="grid col-span-8 grid-cols-12 gap-6 not-prose">
{MIGRATION_PAGES.sort((a, b) => (a.name || '').localeCompare(b.name || '')).map(
(guide) => {
return (
<li key={guide.name} className="col-span-6 md:col-span-4">
<Link href={guide.url || '#'} passHref>
<IconPanel {...guide} title={guide.name} background={true} showLink={false} />
</Link>
</li>
)
}
)}
</ul>
</div>

<ul className="grid col-span-8 grid-cols-12 gap-6 not-prose">
{MIGRATION_PAGES.sort((a, b) => (a.name || '').localeCompare(b.name || '')).map(
(guide) => {
return (
<li key={guide.name} className="col-span-6 md:col-span-4">
<Link href={guide.url || '#'} passHref>
<IconPanel {...guide} title={guide.name} background={true} showLink={false} />
</Link>
</li>
)
}
)}
</ul>
</div>
)}

<div className="flex flex-col gap-6 py-12 border-b">
<div className="col-span-4 flex flex-col gap-1 [&_h2]:m-0 [&_h3]:m-0">
Expand All @@ -312,41 +313,44 @@ const HomePage = () => (
})}
</ul>
</div>

<div className="flex flex-col lg:grid grid-cols-12 gap-6 py-12">
<div className="col-span-4 flex flex-col gap-1 [&_h2]:m-0 [&_h3]:m-0">
<div className="md:max-w-xs 2xl:max-w-none">
<div className="flex items-center gap-3 mb-3 text-brand-600">
<IconBackground>
<MenuIconPicker icon="self-hosting" width={18} height={18} />
</IconBackground>
<h3 id="self-hosting" className="group scroll-mt-24">
Self-Hosting
</h3>
{isFeatureEnabled('docs:full_getting_started') && (
<div className="flex flex-col lg:grid grid-cols-12 gap-6 py-12">
<div className="col-span-4 flex flex-col gap-1 [&_h2]:m-0 [&_h3]:m-0">
<div className="md:max-w-xs 2xl:max-w-none">
<div className="flex items-center gap-3 mb-3 text-brand-600">
<IconBackground>
<MenuIconPicker icon="self-hosting" width={18} height={18} />
</IconBackground>
<h3 id="self-hosting" className="group scroll-mt-24">
Self-Hosting
</h3>
</div>
<p className="text-foreground-light text-sm">
Get started with self-hosting Supabase.
</p>
<TextLink
label="More on Self-Hosting"
url="/guides/self-hosting"
className="no-underline text-brand-link text-sm"
/>
</div>
<p className="text-foreground-light text-sm">Get started with self-hosting Supabase.</p>
<TextLink
label="More on Self-Hosting"
url="/guides/self-hosting"
className="no-underline text-brand-link text-sm"
/>
</div>
</div>

<div className="grid col-span-8 grid-cols-12 gap-6 not-prose">
<ul className="col-span-full lg:col-span-8 grid grid-cols-12 gap-6">
{selfHostingOptions.map((option) => {
return (
<li key={option.title} className="col-span-6">
<Link href={option.href} passHref>
<IconPanelWithIconPicker {...option} background={true} showLink={false} />
</Link>
</li>
)
})}
</ul>
<div className="grid col-span-8 grid-cols-12 gap-6 not-prose">
<ul className="col-span-full lg:col-span-8 grid grid-cols-12 gap-6">
{selfHostingOptions.map((option) => {
return (
<li key={option.title} className="col-span-6">
<Link href={option.href} passHref>
<IconPanelWithIconPicker {...option} background={true} showLink={false} />
</Link>
</li>
)
})}
</ul>
</div>
</div>
</div>
)}
</div>
</HomeLayout>
)
Expand Down
8 changes: 5 additions & 3 deletions apps/docs/components/HomePageCover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,11 @@ const HomePageCover = (props) => {
</p>
</div>
</div>
<div className="w-full xl:max-w-[440px] -mb-40">
<GettingStarted />
</div>
{isFeatureEnabled('docs:full_getting_started') && (
<div className="w-full xl:max-w-[440px] -mb-40">
<GettingStarted />
</div>
)}
</div>
</div>
)
Expand Down
Loading
Loading