Skip to content

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

Merge branch 'feat/docs2.0' of github.com:supabase/supabase into feat/docs2.0

Terry Sutton2aba41376c8a
diff --cc apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefList.tsx
index a3326e0db85,f05e91699e4..367e6f1021a
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefList.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuRefList.tsx
@@@ -8,10 -14,65 +14,66 @@@ import { useMenuActiveRefId } from '~/h
const allFunctions = Object.values(clientLibsCommonSections.sections.functions)
+ const FunctionLink = ({
+ title,
+ id,
+ icon,
+ product,
+ library,
+ slug,
+ }: {
+ title: string
+ name?: string
+ id: string
+ icon?: string
+ product?: string
+ library: string
+ slug: string
+ }) => {
+ const router = useRouter()
+ // const { activeRefItem } = useNavigationMenuContext()
+ const activeAccordianItem = useMenuActiveRefId()
+
+ const active = activeAccordianItem === id
+ return (
+ <li key={id} className="function-link-item">
+ <Link href={`/reference/${library}/${slug}`} passHref>
+ <a
+ className={[
+ 'cursor-pointer transition text-sm hover:text-brand-900 flex gap-3',
+ active ? 'text-brand-900' : 'text-scale-1000',
+ ].join(' ')}
+ >
+ {icon && <img className="w-3" src={`${router.basePath}${icon}`} />}
+ {title}
+ </a>
+ </Link>
+ </li>
+ )
+ }
+
+ const SideMenuTitle = ({ title }: { title: string }) => {
+ return (
+ <span className="font-mono text-xs uppercase text-scale-1200 font-medium tracking-wider mb-3">
+ {title}
+ </span>
+ )
+ }
+
+ const Divider = () => {
+ return <div className="h-px w-full bg-blackA-300 dark:bg-whiteA-300 my-3"></div>
+ }
+
const NavigationMenuRefList = ({ currentLevel, setLevel, id, lib }) => {
+ const router = useRouter()
+ // const { activeRefItem } = useNavigationMenuContext()
+ // const [activeAccordianItem, setActiveAccordianItem] = useState('')
+
+ // const activeRefItem = useMenuActiveRefId()
+
// Get only the functions with references in the current librarry
// ie: if the lib === dart, only get the dart functions
+
const allCurrentFunctions = allFunctions
.map((fn: any) => {
if (fn.items.flat().find((item) => item.libs.includes(lib))) return fn
diff --cc apps/docs/layouts/ref/RefSubLayout.tsx
index dc19e72d2fc,6a0d9542213..a1d43c069d7
--- a/apps/docs/layouts/ref/RefSubLayout.tsx
+++ b/apps/docs/layouts/ref/RefSubLayout.tsx
@@@ -38,17 -35,11 +36,22 @@@ const RefSubLayout: FC<RefSubLayoutType
}
const Section: FC<ISectionContainer> = (props) => {
- console.log({ props })
+ // console.log({ props })
return (
- <article key={props.id} className={`${props.singleColumn ? 'prose dark:prose-dark' : ''}`}>
- <article key={props.id} className="py-16 lg:py-32">
++ <article
++ key={props.id}
++ className={`${
++ props.singleColumn ? 'prose dark:prose-dark py-16 lg:py-32 ' : 'py-16 lg:py-32'
++ }`}
++ >
<StickyHeader {...props} />
- <div className="grid lg:grid-cols-2 ref-container gap-16">{props.children}</div>
+ <div
+ className={`ref-container gap-16 ${
+ !props.singleColumn ? 'grid lg:grid-cols-2' : 'ref-container--full-width lg:max-w-3xl'
+ }`}
+ >
+ {props.children}
+ </div>
</article>
)
}
diff --cc apps/docs/pages/reference/javascript/[...slug].tsx
index f3ea90864df,7b60f8afea3..7c4ad1b2766
--- a/apps/docs/pages/reference/javascript/[...slug].tsx
+++ b/apps/docs/pages/reference/javascript/[...slug].tsx
@@@ -82,15 -272,12 +272,11 @@@ export default function JSReference(pro
id={item.id}
slug={item.id}
scrollSpyHeader={true}
+ singleColumn={true}
>
- <RefSubLayout.Details>
- <MDXRemote {...item.content} components={components} />
- </RefSubLayout.Details>
+ <MDXRemote {...item.content} components={components} />
</RefSubLayout.Section>
))}
- </RefSubLayout>
- <hr />
-
- <RefSubLayout>
{/* jsSpec.functions.map((item, itemIndex) => { */}
{props.docs
.filter((doc) => !doc.introPage)