File tree Expand file tree Collapse file tree 5 files changed +27
-7
lines changed Expand file tree Collapse file tree 5 files changed +27
-7
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ const config = {
155
155
( {
156
156
colorMode : {
157
157
defaultMode : "light" ,
158
- disableSwitch : true ,
158
+ disableSwitch : false ,
159
159
respectPrefersColorScheme : false ,
160
160
} ,
161
161
navbar : {
Original file line number Diff line number Diff line change 87
87
}
88
88
89
89
/* For readability concerns, you should choose a lighter palette in dark mode. */
90
- [data-theme = "dark" ] {
90
+ html : not (. plugin-pages ) [data-theme = "dark" ] {
91
91
--ifm-color-primary : var (--ifm-color-primary-light );
92
92
}
93
+ html .plugin-pages [data-theme = 'dark' ] {
94
+ --ifm-navbar-link-color : # 1c1e21 ;
95
+ }
96
+ html .plugin-pages .navColorModeToggle {
97
+ display : none;
98
+ }
93
99
94
100
@media (min-width : 768px ) {
95
101
: root {
117
123
line-height : 30px !important ;
118
124
}
119
125
120
- html {
126
+ html : not ([data-theme='dark']) , html.plugin-pages {
121
127
@apply text-black;
122
128
}
123
129
@@ -294,7 +300,7 @@ svg.architecture {
294
300
}
295
301
}
296
302
297
- .navbar__brand : hover {
303
+ html . plugin-pages .navbar__brand : hover {
298
304
color : # 283032 ;
299
305
}
300
306
@@ -319,11 +325,17 @@ svg.architecture {
319
325
order : 3 ;
320
326
}
321
327
328
+ .DocSearch-Button {
329
+ margin : 0 10px 0 16px !important ;
330
+ }
322
331
.DocSearch-Button .DocSearch-Search-Icon {
323
332
color : black !important ;
324
333
height : 24px !important ;
325
334
width : 24px ;
326
335
}
336
+ html : not(.plugin-pages)[data-theme = 'dark' ] .DocSearch-Button .DocSearch-Search-Icon {
337
+ color : white !important ;
338
+ }
327
339
328
340
.DocSearch-Button {
329
341
padding : 0 !important ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export default function Home() {
19
19
< div className = "z-index:1000" >
20
20
< Layout >
21
21
< HomepageHero />
22
- < main >
22
+ < main className = "bg-white" >
23
23
< Features />
24
24
< div className = "pageContainer" >
25
25
< AnimatedText />
Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
+ import { useState , useEffect } from 'react' ;
2
3
import Link from "@docusaurus/Link" ;
3
4
import useBaseUrl from "@docusaurus/useBaseUrl" ;
4
5
import useDocusaurusContext from "@docusaurus/useDocusaurusContext" ;
@@ -7,9 +8,16 @@ import ThemedImage from "@theme/ThemedImage";
7
8
import useMediaQuery from "../../hooks/useMediaQuery" ;
8
9
import { forPhablet } from "../../../helpers/media-queries" ;
9
10
function LogoThemedImage ( { logo, alt, imageClassName } ) {
11
+
12
+ const [ isHome , setIsHome ] = useState ( false ) ;
13
+
14
+ useEffect ( ( ) => {
15
+ setIsHome ( document . documentElement . classList . contains ( "plugin-pages" ) ) ;
16
+ } , [ ] ) ;
17
+
10
18
const sources = {
11
19
light : useBaseUrl ( logo . src ) ,
12
- dark : useBaseUrl ( logo . srcDark || logo . src ) ,
20
+ dark : useBaseUrl ( isHome ? logo . src : logo . srcDark || logo . src ) ,
13
21
} ;
14
22
const themedImage = (
15
23
< ThemedImage
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export default function NavbarContent() {
63
63
right = {
64
64
< >
65
65
< NavbarItems items = { rightItems } />
66
- < NavbarColorModeToggle className = { styles . colorModeToggle } />
66
+ < div class = "navColorModeToggle" > < NavbarColorModeToggle className = { styles . colorModeToggle } /> </ div >
67
67
{ ! searchBarItem && (
68
68
< NavbarSearch >
69
69
< SearchBar />
You can’t perform that action at this time.
0 commit comments