Skip to content

Commit

Permalink
Merge pull request #86 from SpaceyaTech/new-resources-page-build
Browse files Browse the repository at this point in the history
New resources page build
  • Loading branch information
JimmyTron authored Jan 30, 2024
2 parents 062ba06 + 3398272 commit ffc51c2
Show file tree
Hide file tree
Showing 19 changed files with 1,091 additions and 838 deletions.
1,145 changes: 572 additions & 573 deletions src/ADMIN/pages/events/AddEventPage.jsx

Large diffs are not rendered by default.

234 changes: 117 additions & 117 deletions src/APP/components/Header2.jsx
Original file line number Diff line number Diff line change
@@ -1,117 +1,117 @@
import { useState } from "react";
import { Link, useLocation } from "react-router-dom";

import logo from "../../assets/images/sytLogo.png";
import menu from "../../assets/images/hamburger-menu.svg";

const navLinks = [
{
id: 1,
link: "Home",
route: "/",
},
{
id: 2,
link: "About Us",
route: "/about-us",
},
{
id: 3,
link: "Community",
route: "/community",
},
{
id: 4,
link: "Products",
route: "/products",
},
{
id: 5,
link: "Blogs",
route: "/blogs",
},
// {
// id: 6,
// link: "Resources",
// route: "/resources",
// },
// {
// id: 7,
// link: "Shop",
// route: "/shop",
// },
// {
// id: 8,
// link: "Donate",
// route: "/donate",
// },
];

const Header2 = () => {
const [showNavlinks, setShowNavlinks] = useState(false);

const { pathname } = useLocation();

return (
<header className="py-5 md:px-10 px-5 flex items-center justify-between md:shadow-none shadow-md relative max-w-[1440px] md:mx-auto">
{/* logo */}
<Link to="/">
<img src={logo} alt="logo" className="md:w-16 w-12" />
</Link>

{/* mobile menu */}
<img
src={menu}
alt="logo"
className="md:hidden"
onClick={() => setShowNavlinks((prev) => !prev)}
/>

{/* mobile navlinks */}
<nav
className="flex flex-col items-start justify-start gap-6 text-base absolute top-[90px] left-0 bg-white border-b w-full h-fit z-[1] p-5 pl-12"
style={
showNavlinks
? { display: "flex", height: "calc(100vh - 90px)" }
: { display: "none" }
}
>
{navLinks.map(({ link, id, route }) => {
const isActive = pathname === route;
return (
<Link
key={id}
className={`${
isActive ? "text-primary underline" : "text-gray-900"
} hover:text-primary hover:underline transition-all duration-300 cursor-pointer`}
to={`${route}`}
onClick={() => setShowNavlinks(false)}
>
{link}
</Link>
);
})}
</nav>

{/* navlinks */}
<nav className="md:flex hidden items-center gap-5 text-base">
{navLinks.map(({ id, link, route }) => {
const isActive = pathname === route;
return (
<Link
key={id}
className={`${
isActive ? "text-primary underline" : "text-gray-900"
} hover:text-primary hover:underline transition-all duration-300 cursor-pointer`}
to={`${route}`}
>
{link}
</Link>
);
})}
</nav>
</header>
);
};

export default Header2;
import { useState } from "react";
import { Link, useLocation } from "react-router-dom";

import logo from "../../assets/images/sytLogo.png";
import menu from "../../assets/images/hamburger-menu.svg";

const navLinks = [
{
id: 1,
link: "Home",
route: "/",
},
{
id: 2,
link: "About Us",
route: "/about-us",
},
{
id: 3,
link: "Community",
route: "/community",
},
{
id: 4,
link: "Products",
route: "/products",
},
{
id: 5,
link: "Blogs",
route: "/blogs",
},
// {
// id: 6,
// link: "Resources",
// route: "/resources",
// },
// {
// id: 7,
// link: "Shop",
// route: "/shop",
// },
// {
// id: 8,
// link: "Donate",
// route: "/donate",
// },
];

const Header2 = () => {
const [showNavlinks, setShowNavlinks] = useState(false);

const { pathname } = useLocation();

return (
<header className="py-5 md:px-10 px-5 flex items-center justify-between md:shadow-none shadow-md relative max-w-[1440px] md:mx-auto">
{/* logo */}
<Link to="/">
<img src={logo} alt="logo" className="md:w-16 w-12" />
</Link>

{/* mobile menu */}
<img
src={menu}
alt="logo"
className="md:hidden"
onClick={() => setShowNavlinks((prev) => !prev)}
/>

{/* mobile navlinks */}
<nav
className="flex flex-col items-start justify-start gap-6 text-base absolute top-[90px] left-0 bg-white border-b w-full h-fit z-[1] p-5 pl-12"
style={
showNavlinks
? { display: "flex", height: "calc(100vh - 90px)" }
: { display: "none" }
}
>
{navLinks.map(({ link, id, route }) => {
const isActive = pathname === route;
return (
<Link
key={id}
className={`${
isActive ? "text-primary underline" : "text-gray-900"
} hover:text-primary hover:underline transition-all duration-300 cursor-pointer`}
to={`${route}`}
onClick={() => setShowNavlinks(false)}
>
{link}
</Link>
);
})}
</nav>

{/* navlinks */}
<nav className="md:flex hidden items-center gap-5 text-base">
{navLinks.map(({ id, link, route }) => {
const isActive = pathname === route;
return (
<Link
key={id}
className={`${
isActive ? "text-primary underline" : "text-gray-900"
} hover:text-primary hover:underline transition-all duration-300 cursor-pointer`}
to={`${route}`}
>
{link}
</Link>
);
})}
</nav>
</header>
);
};

export default Header2;
4 changes: 1 addition & 3 deletions src/APP/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Homepage from "./pages/shop/Homepage";
import SingleItemPage from "./pages/shop/pages/SingleItemPage";
import Layout from "./pages/Layout";
import Products from "./pages/products2/Products";
import Resources from "./pages/resources/Resources";
import Resources from "./pages/resources2/Resources";

import Checkout from "./pages/shop/pages/OrderSummary";

Expand All @@ -28,7 +28,6 @@ import Error500 from "./pages/errorPages/Error500";
import ProductDisplay from "./pages/shop/pages/ProductDisplay";
import GalleryPage from "./pages/gallery/GalleryPage";


export {
LandingPage,
Homepage,
Expand All @@ -54,5 +53,4 @@ export {
Error500,
ProductDisplay,
GalleryPage,

};
Loading

0 comments on commit ffc51c2

Please sign in to comment.