File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 },
1313 "dependencies" : {
1414 "@heroicons/react" : " ^2.2.0" ,
15+ "framer-motion" : " ^12.35.0" ,
1516 "gsap" : " ^3.14.2" ,
1617 "lucide-react" : " ^0.564.0" ,
1718 "react" : " ^19.2.0" ,
Original file line number Diff line number Diff line change 1- /* Layout that each page will follow */
21import '../css/app-layout.css' ;
32import { Outlet } from 'react-router-dom' ;
4-
5- import Navbar from './navbar/Navbar.tsx' ;
3+ import Navbar from './navbar/Navbar' ;
64
75export default function AppLayout ( ) {
8- return (
9- < div className = "main-app-container" >
10- < Navbar />
11- < div className = "app-content" >
12- < Outlet />
13- </ div >
14- </ div >
15- ) ;
16- }
6+
7+ return (
8+ < div className = "main-app-container" >
9+ < Navbar />
10+ < div className = "app-content" >
11+ < Outlet />
12+ </ div >
13+ </ div >
14+ ) ;
15+ }
Original file line number Diff line number Diff line change @@ -8,21 +8,23 @@ type CarouselProps = {
88export default function Carousel ( { type } : CarouselProps ) {
99 return (
1010 < >
11- < div >
12- < h2 className = "carousel-title" > { type } </ h2 >
13- < div className = "carousel" >
14- < Organization
15- title = "Math Club"
16- desc = "The RPI Math Faculty approved and Union affiliated math club!"
17- />
18- < Organization
19- title = "Math Club"
20- desc = "The RPI Math Faculty approved and Union affiliated math club!"
21- />
22- < Organization
23- title = "Math Club"
24- desc = "The RPI Math Faculty approved and Union affiliated math club!"
25- />
11+ < div className = "carousel-container" >
12+ < div >
13+ < span className = "carousel-title" > { type } </ span >
14+ < div className = "carousel" >
15+ < Organization
16+ title = "Math Club"
17+ desc = "The RPI Math Faculty approved and Union affiliated math club!"
18+ />
19+ < Organization
20+ title = "Math Club"
21+ desc = "The RPI Math Faculty approved and Union affiliated math club!"
22+ />
23+ < Organization
24+ title = "Math Club"
25+ desc = "The RPI Math Faculty approved and Union affiliated math club!"
26+ />
27+ </ div >
2628 </ div >
2729 </ div >
2830 </ >
Original file line number Diff line number Diff line change 1- import { NavLink } from 'react-router-dom' ;
1+ import { NavLink , useNavigate } from 'react-router-dom' ;
2+ import type { MouseEvent } from 'react' ;
23
34type NavbarLinkProps = {
4- label : string ;
5- nav : string ;
5+ label : string ;
6+ nav : string ;
67} ;
78
89export default function NavbarLink ( { label, nav } : NavbarLinkProps ) {
9- return (
10- < NavLink to = { nav } className = { ( { isActive } ) => `navlink ${ isActive ? 'active-navlink' : '' } ` } >
11- { label }
12- </ NavLink >
13- ) ;
14- }
10+ const navigate = useNavigate ( ) ;
11+
12+ const handleClick = ( e : MouseEvent < HTMLAnchorElement > ) => {
13+ e . preventDefault ( ) ;
14+
15+ const content = document . querySelector ( '.app-content' ) ;
16+ if ( ! content ) {
17+ navigate ( nav ) ;
18+ return ;
19+ }
20+
21+ content . classList . add ( 'page-transition' ) ;
22+ setTimeout ( ( ) => { navigate ( nav ) ; } , 300 ) ;
23+ setTimeout ( ( ) => { content . classList . remove ( 'page-transition' ) ; } , 400 ) ;
24+ } ;
25+
26+ return (
27+ < NavLink
28+ to = { nav }
29+ onClick = { handleClick }
30+ className = { ( { isActive } ) =>
31+ `navlink ${ isActive ? 'active-navlink' : '' } `
32+ }
33+ >
34+ { label }
35+ </ NavLink >
36+ ) ;
37+ }
Original file line number Diff line number Diff line change 88
99.app-content {
1010 padding : 3rem ;
11- width : 75% ;
11+ width : 100% ;
12+ position : relative;
13+ overflow : hidden;
14+ transition : transform 0.4s ease, opacity 0.4s ease;
1215}
16+
17+ .app-content .page-transition {
18+ transform : scale (0.95 );
19+ opacity : 0.10 ;
20+ }
Original file line number Diff line number Diff line change 44 gap : 4rem ;
55}
66
7+ .carousel-container {
8+ display : flex;
9+ flex-direction : column;
10+ align-items : center;
11+ }
12+
713.carousel {
814 width : 100% ;
915 background : var (--carousel-bg );
You can’t perform that action at this time.
0 commit comments