@@ -15,6 +15,32 @@ export const metadata: Metadata = {
15
15
title : "Code of Conduct | GraphQLConf 2025" ,
16
16
}
17
17
18
+ const components = {
19
+ a : ( props : React . AnchorHTMLAttributes < HTMLAnchorElement > ) => {
20
+ return (
21
+ < Anchor
22
+ { ...props }
23
+ href = { props . href ?? "" }
24
+ className = { clsx ( props . className , "typography-link" ) }
25
+ />
26
+ )
27
+ } ,
28
+ ul : ( props : React . HTMLAttributes < HTMLUListElement > ) => {
29
+ return < ul { ...props } className = { clsx ( props . className , "-mt-6" ) } />
30
+ } ,
31
+ Callout : ( props : React . HTMLAttributes < HTMLDivElement > ) => {
32
+ return (
33
+ < div
34
+ { ...props }
35
+ className = { clsx (
36
+ props . className ,
37
+ "gql-prose-inner -mx-4 w-fit border border-neu-300 bg-neu-50 p-4 dark:border-neu-100 dark:bg-neu-50/50 max-md:border-x-0 xl:my-4" ,
38
+ ) }
39
+ />
40
+ )
41
+ } ,
42
+ }
43
+
18
44
export default function ResourcesPage ( ) {
19
45
return (
20
46
< >
@@ -39,19 +65,19 @@ export default function ResourcesPage() {
39
65
</ Button >
40
66
</ Hero >
41
67
< main className = "gql-all-anchors-focusable gql-conf-navbar-strip text-neu-900 before:bg-white/40 before:dark:bg-blk/30" >
42
- < div className = "gql-conf-container gql-conf-section gql-prose xl:mb-16 xl:mt-8" >
68
+ < div className = "gql-conf-container gql-conf-section xl:mb-16 xl:mt-8" >
43
69
< ServerComponentMarkdown
44
70
markdown = { markdown }
45
71
extractToc
46
- Wrapper = { ( { children , data } ) => {
72
+ render = { ( { mdx , data } ) => {
47
73
return (
48
- < div >
49
- < aside className = "gql-sticky-aside row-span-8 -mt-1 w-fit sm:max-xl:grid sm:max-xl:grid-cols-2 sm:max-xl:bg-neu-100 sm:max-xl:p-4 dark:sm:max-xl:bg-neu-50/50" >
74
+ < div className = "gql-prose md:max-lg:[&>:not(:first-child)]:mx-4" >
75
+ < aside className = "gql-sticky-aside row-span-8 -mt-1 w-fit sm:max-xl:grid sm:max-xl:grid-cols-2 sm:max-xl:bg-neu-100 sm:max-xl:p-4 dark:sm:max-xl:bg-neu-50/50 xl:max-w-[284px] " >
50
76
{ data . toc . map ( ( { value, id, depth } ) => (
51
77
< a
52
78
key = { id }
53
79
data-depth = { depth }
54
- className = "raw typography-menu block p-4 py-2 text-neu-800 hover:bg-neu-100 hover:text-neu-900 data-[depth=2]:font-semibold dark:hover:bg-neu-50 max-xl:-ml-4 xl:data-[depth=2]:text-lg "
80
+ className = "raw typography-menu block p-4 py-2 text-neu-800 hover:bg-neu-100 hover:text-neu-900 dark:hover:bg-neu-50 max-xl:-ml-4"
55
81
style = { {
56
82
paddingLeft : ( depth - 2 ) * 16 + 16 ,
57
83
} }
@@ -61,37 +87,10 @@ export default function ResourcesPage() {
61
87
</ a >
62
88
) ) }
63
89
</ aside >
64
- { children }
90
+ { mdx ( { components } ) }
65
91
</ div >
66
92
)
67
93
} }
68
- components = { {
69
- a : ( props : React . AnchorHTMLAttributes < HTMLAnchorElement > ) => {
70
- return (
71
- < Anchor
72
- { ...props }
73
- href = { props . href ?? "" }
74
- className = { clsx ( props . className , "typography-link" ) }
75
- />
76
- )
77
- } ,
78
- ul : ( props : React . HTMLAttributes < HTMLUListElement > ) => {
79
- return (
80
- < ul { ...props } className = { clsx ( props . className , "-mt-6" ) } />
81
- )
82
- } ,
83
- Callout : ( props : React . HTMLAttributes < HTMLDivElement > ) => {
84
- return (
85
- < div
86
- { ...props }
87
- className = { clsx (
88
- props . className ,
89
- "gql-prose-inner -mx-4 w-fit border border-neu-300 bg-neu-50 p-4 dark:border-neu-100 dark:bg-neu-50/50 xl:my-4" ,
90
- ) }
91
- />
92
- )
93
- } ,
94
- } }
95
94
/>
96
95
</ div >
97
96
</ main >
0 commit comments