Skip to content

Commit

Permalink
feat: add navigation bar component to app.jsx along with styling updates
Browse files Browse the repository at this point in the history
  • Loading branch information
PmS-crypto committed Dec 2, 2023
1 parent a7d3ba7 commit 2e8f8e5
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 32 deletions.
4 changes: 3 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import { LoginPage } from "./pages/Login/index";
import { RoadmapPage } from "./pages/RoadmapPage/index";
import TaskCard from "./pages/TaskCard/TaskCard"
import Articles from "./pages/Articles/index";
import { NavigationBar } from "./components/NavigationBar";
function App() {
return (
<Router>
<Router>
<NavigationBar />
<Routes>
<>
<Route path="/" element={<LandingPage />} />
Expand Down
8 changes: 6 additions & 2 deletions src/components/NavigationBar/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export const NavigationBar = () => {
}, []);

return (
<div className="top-nav-bar">
<div className="div-wrapper">
<Navbar>
<NavbarBrand>
<div
Expand All @@ -45,12 +47,12 @@ export const NavigationBar = () => {
</NavbarItem>
) : (
<>
<NavbarItem className="nav-button mt-5">
<NavbarItem className="nav-button mt-20 mb-20">
<Link color="login" href="/login" className="login-text">
Login
</Link>
</NavbarItem>
<NavbarItem className="nav-button mt-5">
<NavbarItem className="nav-button mt-20 mb-20">
<Button as={Link} href="/signup" className="signup-text">
Sign Up
</Button>
Expand All @@ -59,6 +61,8 @@ export const NavigationBar = () => {
)}
</NavbarContent>
</Navbar>
</div>
</div>
);
};

Expand Down
15 changes: 15 additions & 0 deletions src/components/NavigationBar/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,19 @@ background-clip: text;
justify-content: center;
align-items: center;
flex-shrink: 0;
}

.top-nav-bar {
height: 98px;
left: 0;
position: fixed;
top: 0;
width: 1440px;
margin-bottom: 20px;
z-index: 1;
}

.div-wrapper {
height: 98px;
position: relative;
}
6 changes: 0 additions & 6 deletions src/pages/LandingPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@ import { Buttons } from "../../components/Buttons";
import "./style.css";
import finalHomepage from "../../assets/finalHomepage.png"
import { useNavigate } from "react-router-dom";
import { NavigationBar } from "../../components/NavigationBar";

export const LandingPage = () => {
const navigateTo = useNavigate()

return (
<div className="landing-page">
<div className="div">
<div className="top-nav-bar">
<div className="div-wrapper">
<NavigationBar />
</div>
</div>
<div className="overlap">
<div className="landing-section">
<img className="image" alt="Image" src={finalHomepage} />
Expand Down
13 changes: 0 additions & 13 deletions src/pages/LandingPage/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@
width: 1440px;
}

.landing-page .top-nav-bar {
height: 84px;
left: 0;
position: absolute;
top: 0;
width: 1440px;
}

.landing-page .div-wrapper {
height: 84px;
position: relative;
}

.landing-page .text-wrapper {
color: #001561;
font-family: "Lato", Helvetica;
Expand Down
7 changes: 0 additions & 7 deletions src/pages/RoadmapPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { LinearPathCard } from "../../components/LinearPathCard";
import { ScrollShadow } from "@nextui-org/react";
import { Tab, Tabs, TabList, TabPanel } from "react-tabs";
import "react-tabs/style/react-tabs.css";
import { NavigationBar } from "../../components/NavigationBar";

export const RoadmapPage = () => {
return (
Expand All @@ -16,12 +15,6 @@ export const RoadmapPage = () => {
All you need for job search success in one place!
</p>

<div className="top-nav-bar">
<div className="div-wrapper">
<NavigationBar />
</div>
</div>

<img className="img" src="src/assets/RoadmapHeroImage.png" />

<div className="overlap">
Expand Down
4 changes: 2 additions & 2 deletions src/pages/TaskCard/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default function TCard({
};

return (
<div key={index} className="flex justify-around m-5 ">
<div key={index} className="flex justify-around m-5 z-0">
<Card
shadow="none"
className={`w-5/6`}
Expand All @@ -71,7 +71,7 @@ export default function TCard({
}`,
}}
>
<CardHeader className="flex justify-between items-center px-3">
<CardHeader className="flex justify-between items-center px-3 z-0">
<div className="flex ">
<Checkbox
isSelected={isChecked}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/TaskCard/TaskCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export default function TaskCard() {
You only get one shot at a first impression, so make it count!
</p>
</div>
<div className="w-2/5">
<div className="w-2/5 z-0">
<Image src={mascot} sizes={"md"} />
</div>
</div>
Expand Down

0 comments on commit 2e8f8e5

Please sign in to comment.