Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 371deea

Browse files
committed
fix mobile layout
1 parent e9c88c0 commit 371deea

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/app/[[...slug]]/layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ export default function DocLayout({
2525

2626
return (
2727
<article className="mx-auto flex h-full max-w-7xl flex-col gap-y-10 px-4 pb-10 pt-16">
28-
<div className="relative grid grid-cols-12 gap-10">
29-
<div className="col-span-12 w-full flex-auto space-y-20 md:col-span-9">
28+
<div className="relative grid grid-cols-1 gap-10 md:grid-cols-12">
29+
<div className="w-full flex-auto space-y-20 md:col-span-9">
3030
<div>
3131
<Breadcrumbs doc={doc} className="mb-4" />
3232
<Prose>{children}</Prose>

src/components/layout/DocToC.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ const DocToC: React.FC<Props> = ({ doc }) => {
2626
const articleRef = useRef<HTMLDivElement>(null)
2727

2828
return (
29-
<div className="h-full min-w-52" ref={articleRef}>
30-
<aside className="sticky top-[calc(var(--header-height)+1px+2rem)] hidden max-h-[calc(100vh-var(--header-height)-3rem)] min-w-40 space-y-6 md:block">
29+
<div className="hidden h-full min-w-52 md:block" ref={articleRef}>
30+
<aside className="sticky top-[calc(var(--header-height)+1px+2rem)] max-h-[calc(100vh-var(--header-height)-3rem)] min-w-40 space-y-6">
3131
{doc.toc.length ? (
3232
<div className="relative flex flex-col">
3333
<p className="mb-2 font-mono text-sm uppercase dark:text-zinc-300">

0 commit comments

Comments
 (0)