File tree 4 files changed +88
-0
lines changed
4 files changed +88
-0
lines changed Original file line number Diff line number Diff line change 16
16
"dependencies" : {
17
17
"@docusaurus/core" : " ^3.5.2" ,
18
18
"@docusaurus/preset-classic" : " ^3.5.2" ,
19
+ "@dotlottie/player-component" : " ^2.7.12" ,
20
+ "@lottiefiles/dotlottie-wc" : " ^0.4.6" ,
19
21
"@mdx-js/react" : " ^3.0.1" ,
20
22
"@svgr/webpack" : " ^8.1.0" ,
21
23
"clsx" : " ^1.1.1" ,
Original file line number Diff line number Diff line change @@ -31,6 +31,15 @@ html[data-theme="dark"] {
31
31
border-radius : 15px !important ;
32
32
}
33
33
34
+ html , body {
35
+ overflow-x : hidden;
36
+ }
37
+
38
+ html , body {
39
+ overflow-y : scroll;
40
+ scrollbar-width : none;
41
+ }
42
+
34
43
/* Footer */
35
44
36
45
html [data-theme = "dark" ] .footer {
@@ -221,3 +230,4 @@ html[data-theme="light"] .footer-logo-text {
221
230
color : rgb (70 , 203 , 174 );
222
231
text-decoration : none !important ;
223
232
}
233
+
Original file line number Diff line number Diff line change
1
+ import React , { useEffect } from "react" ;
2
+ import styles from "./Footer.module.css" ;
3
+ import FooterLayout from "@theme-original/Footer" ;
4
+ import { useLocation } from "@docusaurus/router" ;
5
+
6
+ const Footer = ( ) => {
7
+ const location = useLocation ( ) ;
8
+ const isHomePage = location . pathname === "/" ;
9
+
10
+ useEffect ( ( ) => {
11
+ import ( "@dotlottie/player-component" ) ;
12
+ } , [ ] ) ;
13
+
14
+ useEffect ( ( ) => {
15
+ const navbar = document . querySelector ( ".navbar" ) ;
16
+ const footer = document . querySelector ( ".footerContainer" ) ;
17
+
18
+ if ( ! navbar || ! footer || ! isHomePage ) return ;
19
+
20
+ const observer = new IntersectionObserver (
21
+ ( entries ) => {
22
+ if ( entries [ 0 ] . isIntersecting ) {
23
+ navbar . style . backgroundColor = "#61AE9D" ;
24
+ } else {
25
+ navbar . style . backgroundColor = "" ;
26
+ }
27
+ } ,
28
+ { threshold : 1 }
29
+ ) ;
30
+
31
+ observer . observe ( footer ) ;
32
+
33
+ return ( ) => observer . disconnect ( ) ;
34
+ } , [ ] ) ;
35
+
36
+ return (
37
+ < div className = { `footerContainer ${ isHomePage ? styles . footerContainer : "" } ` } >
38
+ < FooterLayout />
39
+ { isHomePage && (
40
+ < div className = { styles . lottieContainer } >
41
+ < dotlottie-player
42
+ src = "https://lottie.host/f466ad48-fde8-452a-aca8-2d153e8969ff/l92UT8AOsP.lottie"
43
+ background = "transparent"
44
+ speed = "1"
45
+ loop
46
+ autoplay
47
+ > </ dotlottie-player >
48
+ </ div >
49
+ ) }
50
+ </ div >
51
+ ) ;
52
+ } ;
53
+
54
+ export default Footer ;
Original file line number Diff line number Diff line change
1
+
2
+ .lottieContainer {
3
+ width : 100vw ;
4
+ display : flex;
5
+ justify-content : center;
6
+ align-items : center;
7
+ overflow : hidden !important ;
8
+ }
9
+
10
+ .lottieContainer dotlottie-player {
11
+ width : 100vw !important ;
12
+ height : auto !important ;
13
+ max-height : 500px !important ;
14
+ }
15
+
16
+ .footerContainer {
17
+ --ifm-footer-background-color : # 61AE9D ;
18
+ }
19
+
20
+ .footerContainer .footer {
21
+ --ifm-footer-background-color : # 61AE9D ;
22
+ }
You can’t perform that action at this time.
0 commit comments