Skip to content

Commit fd0dd50

Browse files
authored
Merge pull request #46 from csesoc/I2-14/sticky-nav
[I2-14] - Standardised navbar across all pages
2 parents 5ac79bb + 3dc26ad commit fd0dd50

File tree

6 files changed

+30
-15
lines changed

6 files changed

+30
-15
lines changed

frontend/src/components/Landing/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import Background from '@/components/Background';
2-
import Navbar from '@/components/Navbar';
32

43
const Landing = () => {
54
return (
65
<section
7-
className="flex flex-col min-h-screen justify-between py-8 xl:px-24 md:px-10 px-5 relative overflow-hidden"
6+
className="flex flex-col min-h-screen justify-end py-8 xl:px-24 md:px-10 px-5 relative overflow-hidden"
87
id="landing"
98
>
10-
<Navbar />
9+
1110
<Background />
1211
<div className="flex justify-between items-end">
1312
<div>

frontend/src/components/Layout.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ import React from 'react';
44

55
const Layout = ({ children }: { children: React.ReactNode }) => {
66
return (
7-
<section className="flex flex-col min-h-screen justify-between py-8 xl:px-24 md:px-10 px-5 relative overflow-hidden">
7+
<section className="flex flex-col min-h-screen justify-between py-8 relative">
88
<Navbar />
9-
{children}
10-
<Footer />
9+
10+
<div className='xl:px-24 md:px-10 px-5 '>
11+
{children}
12+
<Footer />
13+
</div>
14+
1115
</section>
1216
);
1317
};

frontend/src/components/Navbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const Navbar = () => {
1212
}, []);
1313

1414
return (
15-
<nav className="flex justify-between items-center relative z-10">
15+
<nav className="sticky top-0 flex justify-between items-center relative z-10 shadow-lg rounded-md bg-black/15 backdrop-blur-md xl:px-24 md:px-10 px-5 py-6">
1616
<Link href="/">
1717
<Image
1818
src="/assets/csesoc_logo.svg"

frontend/src/pages/404.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Navbar from '@/components/Navbar';
33

44
export default function Custom404() {
55
return (
6-
<section className="flex flex-col min-h-screen justify-between py-8 xl:px-24 md:px-10 px-5 relative overflow-hidden">
6+
<section className="flex flex-col min-h-screen justify-between py-8 xl:px-24 md:px-10 px-5 relative">
77
<div className="items-center text-center">
88
<Navbar />
99
<h1 className="text-5xl font-bold pt-24">404 - Page Not Found</h1>

frontend/src/pages/events.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ import Events from '@/components/Event';
55

66
export default function EventsPage() {
77
return (
8-
<section className="flex flex-col min-h-screen justify-between py-8 xl:px-24 md:px-10 px-5 relative overflow-hidden">
8+
<section className="flex flex-col min-h-screen justify-between py-8 relative">
99
<Navbar />
10-
<Events/>
11-
<Footer />
10+
11+
<div className='xl:px-24 md:px-10 px-5 '>
12+
<Events/>
13+
<Footer />
14+
</div>
15+
1216
</section>
1317
);
1418
}

frontend/src/pages/index.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import Navbar from '@/components/Navbar';
12
import Landing from '@/components/Landing';
23
import Sponsors from '@/components/Sponsors/index';
34
import AboutHomePage from '@/components/About/AboutHomepage';
@@ -6,10 +7,17 @@ import EventsBrief from '@/components/Event/EventsBrief';
67
export default function HomePage() {
78
return (
89
<section>
9-
<Landing />
10-
<AboutHomePage />
11-
<EventsBrief />
12-
<Sponsors />
10+
<div className="h-8"></div>
11+
12+
<Navbar />
13+
14+
<div className="-mt-36">
15+
<Landing />
16+
</div>
17+
18+
<AboutHomePage />
19+
<EventsBrief />
20+
<Sponsors />
1321
</section>
1422
);
1523
}

0 commit comments

Comments
 (0)