@@ -32,111 +32,109 @@ export function Footer(props: { context: GitBookSiteContext }) {
32
32
mobileOnly ? 'xl:hidden' : null
33
33
) }
34
34
>
35
- < div className = "scroll-nojump" >
36
- < div className = { tcls ( CONTAINER_STYLE , 'px-4' , 'py-8' , 'lg:py-12' , 'mx-auto' ) } >
37
- < div
38
- className = { tcls (
39
- 'lg:!max-w-none mx-auto grid max-w-3xl site-width-wide:max-w-screen-2xl justify-between gap-12' ,
40
- 'grid-cols-[auto_auto]' ,
41
- 'lg:grid-cols-[18rem_minmax(auto,_48rem)_auto]' ,
42
- 'xl:grid-cols-[18rem_minmax(auto,_48rem)_14rem]' ,
43
- 'site-width-wide:lg:grid-cols-[18rem_minmax(auto,_80rem)_auto]' ,
44
- 'site-width-wide:xl:grid-cols-[18rem_minmax(auto,_80rem)_14rem]' ,
45
- 'page-no-toc:lg:grid-cols-[minmax(auto,_48rem)_auto]' ,
46
- 'page-no-toc:xl:grid-cols-[14rem_minmax(auto,_48rem)_14rem]' ,
47
- '[body:has(.site-width-wide,.page-no-toc)_&]:lg:grid-cols-[minmax(auto,_90rem)_auto]' ,
48
- '[body:has(.site-width-wide,.page-no-toc)_&]:xl:grid-cols-[14rem_minmax(auto,_90rem)_14rem]'
49
- ) }
50
- >
51
- {
52
- // Footer Logo
53
- customization . footer . logo ? (
54
- < div className = "col-start-1 row-start-1" >
55
- < Image
56
- alt = "Logo"
57
- resize = { context . imageResizer }
58
- sources = { {
59
- light : {
60
- src : customization . footer . logo . light ,
61
- } ,
62
- dark : customization . footer . logo . dark
63
- ? {
64
- src : customization . footer . logo . dark ,
65
- }
66
- : null ,
67
- } }
68
- priority = "lazy"
69
- style = { [
70
- 'w-auto' ,
71
- 'max-w-40' ,
72
- 'lg:max-w-64' ,
73
- 'max-h-10' ,
74
- 'lg:max-h-12' ,
75
- 'object-contain' ,
76
- 'object-left' ,
77
- 'rounded' ,
78
- 'straight-corners:rounded-sm' ,
79
- ] }
80
- sizes = { [
81
- {
82
- width : 320 ,
83
- } ,
84
- ] }
85
- />
86
- </ div >
87
- ) : null
88
- }
35
+ < div className = { tcls ( CONTAINER_STYLE , 'px-4' , 'py-8' , 'lg:py-12' , 'mx-auto' ) } >
36
+ < div
37
+ className = { tcls (
38
+ 'lg:!max-w-none mx-auto grid max-w-3xl site-width-wide:max-w-screen-2xl justify-between gap-12' ,
39
+ 'grid-cols-[auto_auto]' ,
40
+ 'lg:grid-cols-[18rem_minmax(auto,_48rem)_auto]' ,
41
+ 'xl:grid-cols-[18rem_minmax(auto,_48rem)_14rem]' ,
42
+ 'site-width-wide:lg:grid-cols-[18rem_minmax(auto,_80rem)_auto]' ,
43
+ 'site-width-wide:xl:grid-cols-[18rem_minmax(auto,_80rem)_14rem]' ,
44
+ 'page-no-toc:lg:grid-cols-[minmax(auto,_48rem)_auto]' ,
45
+ 'page-no-toc:xl:grid-cols-[14rem_minmax(auto,_48rem)_14rem]' ,
46
+ '[body:has(.site-width-wide,.page-no-toc)_&]:lg:grid-cols-[minmax(auto,_90rem)_auto]' ,
47
+ '[body:has(.site-width-wide,.page-no-toc)_&]:xl:grid-cols-[14rem_minmax(auto,_90rem)_14rem]'
48
+ ) }
49
+ >
50
+ {
51
+ // Footer Logo
52
+ customization . footer . logo ? (
53
+ < div className = "col-start-1 row-start-1" >
54
+ < Image
55
+ alt = "Logo"
56
+ resize = { context . imageResizer }
57
+ sources = { {
58
+ light : {
59
+ src : customization . footer . logo . light ,
60
+ } ,
61
+ dark : customization . footer . logo . dark
62
+ ? {
63
+ src : customization . footer . logo . dark ,
64
+ }
65
+ : null ,
66
+ } }
67
+ priority = "lazy"
68
+ style = { [
69
+ 'w-auto' ,
70
+ 'max-w-40' ,
71
+ 'lg:max-w-64' ,
72
+ 'max-h-10' ,
73
+ 'lg:max-h-12' ,
74
+ 'object-contain' ,
75
+ 'object-left' ,
76
+ 'rounded' ,
77
+ 'straight-corners:rounded-sm' ,
78
+ ] }
79
+ sizes = { [
80
+ {
81
+ width : 320 ,
82
+ } ,
83
+ ] }
84
+ />
85
+ </ div >
86
+ ) : null
87
+ }
89
88
90
- {
91
- // Theme Toggle
92
- customization . themes . toggeable ? (
93
- < div className = "-col-start-2 row-start-1 flex items-start justify-end xl:hidden" >
94
- < React . Suspense fallback = { null } >
95
- < ThemeToggler />
96
- </ React . Suspense >
97
- </ div >
98
- ) : null
99
- }
89
+ {
90
+ // Theme Toggle
91
+ customization . themes . toggeable ? (
92
+ < div className = "-col-start-2 row-start-1 flex items-start justify-end xl:hidden" >
93
+ < React . Suspense fallback = { null } >
94
+ < ThemeToggler />
95
+ </ React . Suspense >
96
+ </ div >
97
+ ) : null
98
+ }
100
99
101
- {
102
- // Navigation groups (split into equal columns)
103
- customization . footer . groups ?. length > 0 ? (
104
- < div
105
- className = { tcls (
106
- 'col-span-2 page-has-toc:lg:col-span-1 page-has-toc:lg:col-start-2 page-no-toc:xl:col-span-1 page-no-toc:xl:col-start-2'
100
+ {
101
+ // Navigation groups (split into equal columns)
102
+ customization . footer . groups ?. length > 0 ? (
103
+ < div
104
+ className = { tcls (
105
+ 'col-span-2 page-has-toc:lg:col-span-1 page-has-toc:lg:col-start-2 page-no-toc:xl:col-span-1 page-no-toc:xl:col-start-2'
106
+ ) }
107
+ >
108
+ < div className = "mx-auto flex max-w-3xl site-width-wide:max-w-screen-2xl flex-col gap-10 sm:flex-row sm:gap-6" >
109
+ { partition ( customization . footer . groups , FOOTER_COLUMNS ) . map (
110
+ ( column , columnIndex ) => (
111
+ < div
112
+ key = { columnIndex }
113
+ className = "flex flex-1 grow flex-col gap-10"
114
+ >
115
+ { column . map ( ( group , groupIndex ) => (
116
+ < FooterLinksGroup
117
+ key = { groupIndex }
118
+ group = { group }
119
+ context = { context }
120
+ />
121
+ ) ) }
122
+ </ div >
123
+ )
107
124
) }
108
- >
109
- < div className = "mx-auto flex max-w-3xl site-width-wide:max-w-screen-2xl flex-col gap-10 sm:flex-row sm:gap-6" >
110
- { partition ( customization . footer . groups , FOOTER_COLUMNS ) . map (
111
- ( column , columnIndex ) => (
112
- < div
113
- key = { columnIndex }
114
- className = "flex flex-1 grow flex-col gap-10"
115
- >
116
- { column . map ( ( group , groupIndex ) => (
117
- < FooterLinksGroup
118
- key = { groupIndex }
119
- group = { group }
120
- context = { context }
121
- />
122
- ) ) }
123
- </ div >
124
- )
125
- ) }
126
- </ div >
127
125
</ div >
128
- ) : null
129
- }
126
+ </ div >
127
+ ) : null
128
+ }
130
129
131
- {
132
- // Legal
133
- customization . footer . copyright ? (
134
- < div className = "order-last col-span-full flex w-full grow flex-col items-center gap-2 text-center text-tint text-xs" >
135
- < p > { customization . footer . copyright } </ p >
136
- </ div >
137
- ) : null
138
- }
139
- </ div >
130
+ {
131
+ // Legal
132
+ customization . footer . copyright ? (
133
+ < div className = "order-last col-span-full flex w-full grow flex-col items-center gap-2 text-center text-tint text-xs" >
134
+ < p > { customization . footer . copyright } </ p >
135
+ </ div >
136
+ ) : null
137
+ }
140
138
</ div >
141
139
</ div >
142
140
</ footer >
0 commit comments