@@ -15,6 +15,32 @@ export const metadata: Metadata = {
1515 title : "Code of Conduct | GraphQLConf 2025" ,
1616}
1717
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+
1844export default function ResourcesPage ( ) {
1945 return (
2046 < >
@@ -39,19 +65,19 @@ export default function ResourcesPage() {
3965 </ Button >
4066 </ Hero >
4167 < 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" >
4369 < ServerComponentMarkdown
4470 markdown = { markdown }
4571 extractToc
46- Wrapper = { ( { children , data } ) => {
72+ render = { ( { mdx , data } ) => {
4773 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] " >
5076 { data . toc . map ( ( { value, id, depth } ) => (
5177 < a
5278 key = { id }
5379 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"
5581 style = { {
5682 paddingLeft : ( depth - 2 ) * 16 + 16 ,
5783 } }
@@ -61,37 +87,10 @@ export default function ResourcesPage() {
6187 </ a >
6288 ) ) }
6389 </ aside >
64- { children }
90+ { mdx ( { components } ) }
6591 </ div >
6692 )
6793 } }
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- } }
9594 />
9695 </ div >
9796 </ main >
0 commit comments