Skip to content

Commit

Permalink
navbar completed
Browse files Browse the repository at this point in the history
  • Loading branch information
longjichen1 committed Apr 3, 2022
1 parent 844a576 commit b39e8bf
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 61 deletions.
45 changes: 19 additions & 26 deletions components/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,25 @@ import Image from "next/image";
import Link from "next/link";

const Navbar = () => {
return (
<div className="bg-[#28315a] sticky flex justify-end shadow-sm ">
<div className="inline-block mr-auto w-[40px] h-[40px]">
<Link href="/">
<div className="m-2 w-[30px] h-[30px]">
<Image
alt="Logo"
src="/logo.png"
width={100}
height={100}
/>
</div>
</Link>
</div>
<div className="text-white m-[20px] hover:underline" id="about">
<Link href="/about">
<a>About Us</a>
</Link>
</div>
<div className="text-white m-[20px] hover:underline" id="events">
<Link href="/events">
<a>Events</a>
</Link>
</div>
</div>
);
return (
<div className="bg-[#28315a] sticky flex justify-end shadow-sm ">
<div className="inline-block mr-auto mt-3 ml-2 w-[40px] h-[40px]">
<Link href="/">
<Image alt="Logo" src="/logo.png" width={100} height={100} />
</Link>
</div>
<div className="text-white m-[20px] hover:underline" id="about">
<Link href="/about">
<a>About Us</a>
</Link>
</div>
<div className="text-white m-[20px] hover:underline" id="events">
<Link href="/events">
<a>Events</a>
</Link>
</div>
</div>
);
};

export default Navbar;
6 changes: 3 additions & 3 deletions pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import '../styles/globals.css'
import "../styles/globals.css";

function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />
return <Component {...pageProps} />;
}

export default MyApp
export default MyApp;
16 changes: 8 additions & 8 deletions pages/about.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from "react";
import Navbar from "../components/navbar";
import Navbar from "../components/Navbar";
import Footer from "../components/Footer";

const about = () => {
return (
<div>
<Navbar />
<h1>About page</h1>
<Footer />
</div>
);
return (
<div>
<Navbar />
<h1>About page</h1>
<Footer />
</div>
);
};

export default about;
16 changes: 8 additions & 8 deletions pages/events.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from "react";
import Navbar from "../components/navbar";
import Navbar from "../components/Navbar";
import Footer from "../components/Footer";

const events = () => {
return (
<div>
<Navbar />
<h1>Events page</h1>
<Footer />
</div>
);
return (
<div>
<Navbar />
<h1>Events page</h1>
<Footer />
</div>
);
};

export default events;
16 changes: 8 additions & 8 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ import Footer from "../components/Footer";
import React from "react";

const Home = () => {
return (
<div>
<Navbar />
return (
<div>
<Navbar />

{/* Logo */}
<div className="h-[100vh] bg-[url('../images/landing_section_one.svg')] text-blue-600"></div>
{/* Logo */}
<div className="h-[100vh] bg-[url('../images/landing_section_one.svg')] text-blue-600"></div>

<Footer />
</div>
);
<Footer />
</div>
);
};

export default Home;
11 changes: 3 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
dependencies:
"glob" "7.1.7"

"@next/swc-darwin-arm64@12.1.4":
"integrity" "sha512-SSST/dBymecllZxcqTCcSTCu5o1NKk9I+xcvhn/O9nH6GWjgvGgGkNqLbCarCa0jJ1ukvlBA138FagyrmZ/4rQ=="
"resolved" "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.4.tgz"
"@next/swc-win32-x64-msvc@12.1.4":
"integrity" "sha512-JtYuWzKXKLDMgE/xTcFtCm1MiCIRaAc5XYZfYX3n/ZWSI1SJS/GMm+Su0SAHJgRFavJh6U/p998YwO/iGTIgqQ=="
"resolved" "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.4.tgz"
"version" "12.1.4"

"@nodelib/fs.scandir@2.1.5":
Expand Down Expand Up @@ -897,11 +897,6 @@
"resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
"version" "1.0.0"

"fsevents@~2.3.2":
"integrity" "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA=="
"resolved" "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz"
"version" "2.3.2"

"function-bind@^1.1.1":
"integrity" "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
"resolved" "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz"
Expand Down

0 comments on commit b39e8bf

Please sign in to comment.