fix(web): layout and scrollable

This commit is contained in:
BennyKok
2023-12-29 14:55:08 +08:00
parent d9f83dadd1
commit 9d0a52b7ab
7 changed files with 65 additions and 9 deletions
+2 -2
View File
@@ -46,7 +46,7 @@ export default function RootLayout({
<div className="z-[-1] fixed h-full w-full bg-white">
<div className="absolute h-full w-full bg-[radial-gradient(#e5e7eb_1px,transparent_1px)] [background-size:16px_16px] [mask-image:radial-gradient(ellipse_50%_50%_at_50%_50%,#000_70%,transparent_100%)]" />
</div>
<div className="w-full h-18 flex items-center justify-between gap-4 p-4 border-b border-gray-200">
<div className="sticky w-full h-18 flex items-center justify-between gap-4 p-4 border-b border-gray-200">
<div className="flex flex-row items-center gap-4">
<a
className="font-bold text-md md:text-lg hover:underline"
@@ -80,7 +80,7 @@ export default function RootLayout({
</div>
{/* <div></div> */}
</div>
<div className="md:px-10 px-6 w-full min-h-[calc(100dvh-73px)]">
<div className="md:px-10 px-6 w-full h-[calc(100dvh-73px)]">
{children}
</div>
<Toaster richColors />
+6
View File
@@ -4,6 +4,7 @@ import { Layout } from "@/components/docs/Layout";
import { type Section } from "@/components/docs/SectionProvider";
import glob from "fast-glob";
import { type Metadata } from "next";
import PlausibleProvider from "next-plausible";
export const metadata: Metadata = {
title: {
@@ -28,6 +29,11 @@ export default async function RootLayout({
return (
<html lang="en" className="h-full" suppressHydrationWarning>
<head>
{process.env.PLAUSIBLE_DOMAIN && (
<PlausibleProvider domain={process.env.PLAUSIBLE_DOMAIN} />
)}
</head>
<body className="flex min-h-full bg-white antialiased dark:bg-zinc-900">
<Providers>
<div className="w-full">