File tree Expand file tree Collapse file tree 2 files changed +18
-22
lines changed Expand file tree Collapse file tree 2 files changed +18
-22
lines changed Original file line number Diff line number Diff line change
1
+ :root {
2
+ --rp-c-bg : #0b0c0e ;
3
+ }
4
+ :root:not (.dark ) {
5
+ --rp-c-bg : #fff ;
6
+ }
7
+ .rspress-nav {
8
+ transition : background 0.4s ;
9
+ }
10
+ body :not (.notTopArrived ) .rspress-nav {
11
+ background : transparent !important ;
12
+ }
Original file line number Diff line number Diff line change 1
1
import { type FC , useEffect , useState } from 'react' ;
2
2
import styles from './index.module.scss' ;
3
+ import './global.scss' ;
3
4
4
5
const useTopArrived = ( ) => {
5
6
const [ scrollY , setScrollY ] = useState ( 0 ) ;
@@ -44,27 +45,10 @@ export const BackgroundImage: FC<BackgroundProps> = ({
44
45
} , [ topArrived , navBarTopArrived ] ) ;
45
46
46
47
return (
47
- < >
48
- < style >
49
- { `:root {
50
- --rp-c-bg: #0b0c0e;
51
- }
52
- :root:not(.dark) {
53
- --rp-c-bg: #fff;
54
- }
55
- .rspress-nav {
56
- transition: background 0.4s;
57
- }
58
- body:not(.notTopArrived) .rspress-nav {
59
- background: transparent !important;
60
- }
61
- ` }
62
- </ style >
63
- < img
64
- className = { styles . background }
65
- src = "https://assets.rspack.rs/rspack/assets/landingpage-background-compressed.png"
66
- alt = "background"
67
- />
68
- </ >
48
+ < img
49
+ className = { styles . background }
50
+ src = "https://assets.rspack.rs/rspack/assets/landingpage-background-compressed.png"
51
+ alt = "background"
52
+ />
69
53
) ;
70
54
} ;
You can’t perform that action at this time.
0 commit comments