File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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 11import { type FC , useEffect , useState } from 'react' ;
22import styles from './index.module.scss' ;
3+ import './global.scss' ;
34
45const useTopArrived = ( ) => {
56 const [ scrollY , setScrollY ] = useState ( 0 ) ;
@@ -44,27 +45,10 @@ export const BackgroundImage: FC<BackgroundProps> = ({
4445 } , [ topArrived , navBarTopArrived ] ) ;
4546
4647 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+ />
6953 ) ;
7054} ;
You can’t perform that action at this time.
0 commit comments