File tree Expand file tree Collapse file tree
docusaurus-theme-classic/src/theme
docusaurus-theme-common/src/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88import React , { type ReactNode } from 'react' ;
99import clsx from 'clsx' ;
10+ import { ThemeClassNames } from '@docusaurus/theme-common' ;
1011import type { Props } from '@theme/Footer/Layout' ;
1112
1213export default function FooterLayout ( {
@@ -17,7 +18,7 @@ export default function FooterLayout({
1718} : Props ) : ReactNode {
1819 return (
1920 < footer
20- className = { clsx ( 'footer' , {
21+ className = { clsx ( ThemeClassNames . layout . footer . container , 'footer' , {
2122 'footer--dark' : style === 'dark' ,
2223 } ) } >
2324 < div className = "container container-fluid" >
Original file line number Diff line number Diff line change 77
88import React , { type ReactNode } from 'react' ;
99import clsx from 'clsx' ;
10+ import { ThemeClassNames } from '@docusaurus/theme-common' ;
1011import LinkItem from '@theme/Footer/LinkItem' ;
1112import type { Props } from '@theme/Footer/Links/MultiColumn' ;
1213
@@ -30,7 +31,12 @@ function ColumnLinkItem({item}: {item: ColumnItemType}) {
3031
3132function Column ( { column} : { column : ColumnType } ) {
3233 return (
33- < div className = { clsx ( 'col footer__col' , column . className ) } >
34+ < div
35+ className = { clsx (
36+ ThemeClassNames . layout . footer . column ,
37+ 'col footer__col' ,
38+ column . className ,
39+ ) } >
3440 < div className = "footer__title" > { column . title } </ div >
3541 < ul className = "footer__items clean-list" >
3642 { column . items . map ( ( item , i ) => (
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ export default function Layout(props: Props): ReactNode {
4848 < div
4949 id = { SkipToContentFallbackId }
5050 className = { clsx (
51+ ThemeClassNames . layout . main ,
5152 ThemeClassNames . wrapper . main ,
5253 styles . mainWrapper ,
5354 wrapperClassName ,
Original file line number Diff line number Diff line change @@ -27,15 +27,18 @@ export const ThemeClassNames = {
2727
2828 mdxPage : 'mdx-page' ,
2929 } ,
30+
31+ // TODO Docusaurus v4: remove old classes?
3032 wrapper : {
31- main : 'main-wrapper' ,
33+ main : 'main-wrapper' , // replaced by theme-layout-main
3234 // TODO these wrapper class names are now quite useless
3335 // TODO do breaking change later in 3.0
3436 // we already add plugin name/id class on <html>: that's enough
3537 blogPages : 'blog-wrapper' ,
3638 docsPages : 'docs-wrapper' ,
3739 mdxPages : 'mdx-wrapper' ,
3840 } ,
41+
3942 common : {
4043 editThisPage : 'theme-edit-this-page' ,
4144 lastUpdated : 'theme-last-updated' ,
@@ -62,7 +65,13 @@ export const ThemeClassNames = {
6265 panel : 'theme-layout-navbar-sidebar-panel' ,
6366 } ,
6467 } ,
65- // TODO add other stable classNames here
68+ main : {
69+ container : 'theme-layout-main' ,
70+ } ,
71+ footer : {
72+ container : 'theme-layout-footer' ,
73+ column : 'theme-layout-footer-column' ,
74+ } ,
6675 } ,
6776
6877 /**
You can’t perform that action at this time.
0 commit comments