@@ -9,9 +9,14 @@ import React from 'react';
99import classnames from 'classnames' ;
1010import Footer from '@theme/Footer' ;
1111import Link from '@docusaurus/Link' ;
12+ import LayoutProvider from '@theme/Layout/Provider' ;
13+ import ColorModeToggle from '@theme/Navbar/ColorModeToggle' ;
1214import useDocusaurusContext from '@docusaurus/useDocusaurusContext' ;
1315import useBaseUrl from '@docusaurus/useBaseUrl' ;
1416import styles from './styles.module.css' ;
17+ import FooterCopyright from '@theme/Footer/Copyright' ;
18+ import FooterLayout from '@theme/Footer/Layout' ;
19+ import { useThemeConfig } from '@docusaurus/theme-common' ;
1520
1621const features = [
1722 {
@@ -65,9 +70,18 @@ function Feature({imageUrl, title, description}) {
6570function Home ( ) {
6671 const context = useDocusaurusContext ( ) ;
6772 const { siteConfig = { } } = context ;
73+ const { footer} = useThemeConfig ( ) ;
74+ if ( ! footer ) {
75+ return null ;
76+ }
77+ const { copyright, links, logo, style} = footer ;
78+
6879 return (
69- < div >
80+ < LayoutProvider >
7081 < header className = { classnames ( 'hero hero--primary' , styles . heroBanner ) } >
82+ < div className = { styles . colorModeToggle } >
83+ < ColorModeToggle />
84+ </ div >
7185 < div className = { classnames ( 'container' , styles . container ) } >
7286 < img className = { classnames ( styles . hero__logo ) } src = "img/logo-dark.svg" alt = "munus-logo" />
7387 < h1 className = { classnames ( 'hero__title' , styles . hero__title ) } > { siteConfig . title } </ h1 >
@@ -107,13 +121,16 @@ function Home() {
107121 < div className = { styles . codeExample } >
108122 < h2 className = { styles . codeExampleTitle } > How it works?</ h2 >
109123 < div className = { styles . codeExampleContainer } >
110- < img className = { styles . withoutMunus } src = 'img/without-munus.webp' alt = 'Without munus' />
111- < img className = { styles . withMunus } src = 'img/with-munus.webp' alt = 'With munus' />
124+ < img className = { styles . codeExampleImage } src = 'img/without-munus.webp' alt = 'Without munus' />
125+ < img className = { styles . codeExampleImage } src = 'img/with-munus.webp' alt = 'With munus' />
112126 </ div >
113127 </ div >
114128 </ main >
115- < Footer > </ Footer >
116- </ div >
129+ < FooterLayout
130+ style = { style }
131+ copyright = { copyright && < FooterCopyright copyright = { copyright } /> }
132+ />
133+ </ LayoutProvider >
117134 ) ;
118135}
119136
0 commit comments