@@ -8,7 +8,6 @@ import ContentRender from "@/components/ContentRender";
8
8
import Icon from "@/components/Icon" ;
9
9
import SectionContainer from "@/components/SectionContainer" ;
10
10
import Subscription from "@/components/Subscription" ;
11
- import TableOfContent from "@/components/TableOfContent" ;
12
11
import { GITHUB_REPO_LINK } from "@/consts/common" ;
13
12
import { getContentFilePaths , getFilePathFromSlugs , readFileContenxt } from "@/lib/content" ;
14
13
import { markdoc } from "@/markdoc/markdoc" ;
@@ -33,24 +32,17 @@ const Page = async (props: Props) => {
33
32
return null ;
34
33
}
35
34
36
- const children = transformedContent . children ;
37
- const headings = JSON . parse (
38
- JSON . stringify (
39
- children . filter ( ( child ) => child instanceof Tag && child . name === "Heading" && [ 2 , 3 ] . includes ( child . attributes [ "level" ] ) ) ,
40
- ) ,
41
- ) as Tag [ ] ;
42
-
43
35
return (
44
36
< SectionContainer >
45
37
< div className = "w-full flex flex-row justify-start items-start sm:px-6 sm:gap-6" >
46
- < div className = "hidden sm:block sticky top-24 h-[calc(100svh-6rem)] w-40 shrink-0" >
38
+ < div className = "hidden sm:block sticky top-24 h-[calc(100svh-6rem)] w-48 shrink-0" >
47
39
< div className = "relative w-full h-full overflow-auto py-4 no-scrollbar" >
48
40
< Navigation />
49
41
</ div >
50
42
< div className = "absolute top-0 left-0 w-full h-8 bg-linear-to-t from-transparent to-white pointer-events-none" > </ div >
51
43
< div className = "absolute bottom-0 left-0 w-full h-8 bg-linear-to-b from-transparent to-white pointer-events-none" > </ div >
52
44
</ div >
53
- < div className = "w-full sm:max-w-[calc(100%-10rem)] lg:max-w-[calc(100%-20rem)] sm: px-4" >
45
+ < div className = "w-full sm:px-4" >
54
46
< div className = "block sm:hidden w-full" >
55
47
< NavigationMobileMenu />
56
48
</ div >
@@ -66,13 +58,6 @@ const Page = async (props: Props) => {
66
58
< Divider className = "my-12!" />
67
59
< Subscription />
68
60
</ div >
69
- < div className = "hidden lg:block sticky top-24 h-[calc(100svh-6rem)] w-40 shrink-0" >
70
- < div className = "relative w-full h-full overflow-auto py-4 no-scrollbar" >
71
- < TableOfContent headings = { headings } />
72
- </ div >
73
- < div className = "absolute top-0 left-0 w-full h-8 bg-linear-to-t from-transparent to-white" > </ div >
74
- < div className = "absolute bottom-0 left-0 w-full h-8 bg-linear-to-b from-transparent to-white" > </ div >
75
- </ div >
76
61
</ div >
77
62
</ SectionContainer >
78
63
) ;
0 commit comments