1
1
import { useRouter } from "next/router"
2
- import { Box , Flex , type HeadingProps , Icon } from "@chakra-ui/react"
2
+ import { type HeadingProps } from "@chakra-ui/react"
3
3
4
4
import type { ChildOnlyProp , Lang } from "@/lib/types"
5
5
import type { MdPageContent , StaticFrontmatter } from "@/lib/interfaces"
@@ -14,7 +14,6 @@ import GlossaryDefinition from "@/components/Glossary/GlossaryDefinition"
14
14
import GlossaryTooltip from "@/components/Glossary/GlossaryTooltip"
15
15
import { HubHero } from "@/components/Hero"
16
16
import NetworkUpgradeSummary from "@/components/History/NetworkUpgradeSummary"
17
- import Link from "@/components/Link"
18
17
import Logo from "@/components/Logo"
19
18
import MainArticle from "@/components/MainArticle"
20
19
import MatomoOptOut from "@/components/MatomoOptOut"
@@ -25,12 +24,13 @@ import {
25
24
Heading4 as MdHeading4 ,
26
25
} from "@/components/MdComponents"
27
26
import MeetupList from "@/components/MeetupList"
28
- import Text from "@/components/OldText"
29
27
import SocialListItem from "@/components/SocialListItem"
30
28
import TableOfContents from "@/components/TableOfContents"
31
29
import { TranslatathonBanner } from "@/components/Translatathon/TranslatathonBanner"
32
30
import Translation from "@/components/Translation"
33
31
import TranslationChartImage from "@/components/TranslationChartImage"
32
+ import { Flex , Stack } from "@/components/ui/flex"
33
+ import Link from "@/components/ui/Link"
34
34
import UpcomingEventsList from "@/components/UpcomingEventsList"
35
35
36
36
import { getEditPath } from "@/lib/utils/editPath"
@@ -62,7 +62,6 @@ export const staticComponents = {
62
62
EnergyConsumptionChart,
63
63
GlossaryDefinition,
64
64
GlossaryTooltip,
65
- Icon,
66
65
Link,
67
66
Logo,
68
67
MatomoOptOut,
@@ -93,19 +92,14 @@ export const StaticLayout = ({
93
92
const absoluteEditPath = getEditPath ( slug )
94
93
95
94
return (
96
- < Box w = " full">
95
+ < div className = "w- full">
97
96
< TranslatathonBanner pathname = { asPath } />
98
97
< DevconGrantsBanner pathname = { asPath } />
99
98
< Flex
100
- justifyContent = "space-between"
101
- w = "full"
102
- mx = "auto"
103
- mb = { 16 }
104
- p = { 8 }
105
- pt = { { base : 8 , lg : 16 } }
99
+ className = "mx-auto mb-16 w-full justify-between p-8 lg:pt-16"
106
100
dir = { contentNotTranslated ? "ltr" : "unset" }
107
101
>
108
- < Box w = " full">
102
+ < div className = "w- full">
109
103
{ slug === "/guides/" ? (
110
104
< HubHero
111
105
heroImg = { GuideHeroImage }
@@ -114,31 +108,20 @@ export const StaticLayout = ({
114
108
description = { frontmatter . description }
115
109
/>
116
110
) : (
117
- < >
118
- < Breadcrumbs slug = { slug } mb = "8" />
111
+ < Stack className = "gap-8" >
112
+ < Breadcrumbs slug = { slug } />
119
113
120
- < Text
121
- color = "text200 "
114
+ < p
115
+ className = "text-body-medium "
122
116
dir = { isLangRightToLeft ( locale as Lang ) ? "rtl" : "ltr" }
123
117
>
124
118
< Translation id = "page-last-updated" /> :{ " " }
125
119
{ lastEditLocaleTimestamp }
126
- </ Text >
127
- </ >
120
+ </ p >
121
+ </ Stack >
128
122
) }
129
123
130
- < Box
131
- as = { MainArticle }
132
- maxW = "container.md"
133
- w = "full"
134
- sx = { {
135
- ".citation" : {
136
- p : {
137
- color : "text200" ,
138
- } ,
139
- } ,
140
- } }
141
- >
124
+ < MainArticle className = "max-w-3xl" >
142
125
< TableOfContents
143
126
position = "relative"
144
127
zIndex = { 2 }
@@ -150,15 +133,15 @@ export const StaticLayout = ({
150
133
{ children }
151
134
152
135
< FeedbackCard isArticle />
153
- </ Box >
154
- </ Box >
136
+ </ MainArticle >
137
+ </ div >
155
138
< TableOfContents
156
139
editPath = { absoluteEditPath }
157
140
items = { tocItems }
158
141
maxDepth = { frontmatter . sidebarDepth || 2 }
159
142
hideEditButton = { ! ! frontmatter . hideEditButton }
160
143
/>
161
144
</ Flex >
162
- </ Box >
145
+ </ div >
163
146
)
164
147
}
0 commit comments