Skip to content

Commit 67004fc

Browse files
committed
device coantiner
1 parent 4bafc45 commit 67004fc

File tree

10 files changed

+290
-172
lines changed

10 files changed

+290
-172
lines changed

.prettierrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": ["prettier-plugin-tailwindcss"]
3+
}

package-lock.json

+95-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
"eslint-plugin-react-hooks": "^4.6.0",
2828
"eslint-plugin-react-refresh": "^0.4.6",
2929
"postcss": "^8.4.38",
30+
"prettier": "^3.2.5",
31+
"prettier-plugin-tailwindcss": "^0.5.14",
3032
"tailwindcss": "^3.4.3",
31-
"vite": "^5.2.9"
33+
"vite": "^5.2.0"
3234
}
3335
}

src/App.jsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import React from "react"
22
import { createBrowserRouter, RouterProvider, } from "react-router-dom";
3-
import RootElement from "./components/RootElement";
3+
import Header from "./components/Header";
44

55
/* Pages Import */
6+
import Login from "./pages/login/Login";
67
import Home from "./pages/home/Home";
78
import Products from "./pages/products/Products";
89
import Blogs from "./pages/blogs/Blogs";
910
import Contact from "./pages/contact/Contact";
10-
import Login from "./pages/login/Login";
1111

1212

1313
const router = createBrowserRouter([
1414
{
1515
path: "/",
16-
element: <RootElement />,
16+
element: <Header/>,
1717
children: [
1818
{
1919
path: "",
@@ -40,7 +40,7 @@ const router = createBrowserRouter([
4040
{
4141
path: "login",
4242
element: (
43-
<h1><Login /></h1>
43+
<h1><Login/></h1>
4444
),
4545
}
4646
]

src/components/Header.jsx

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
import React from "react";
2+
import { Link, Outlet } from "react-router-dom";
3+
4+
/* Icons & Banners*/
5+
import { IoMenu } from "react-icons/io5";
6+
import { IoMail } from "react-icons/io5";
7+
import { FaHeart } from "react-icons/fa";
8+
import { IoLogIn } from "react-icons/io5";
9+
import { IoSearch } from "react-icons/io5";
10+
import { FaAngleDown } from "react-icons/fa";
11+
import { FaCartArrowDown } from "react-icons/fa6";
12+
import { MdOutlinePhoneInTalk } from "react-icons/md";
13+
14+
export default function Header() {
15+
return (
16+
<>
17+
<header className="">
18+
{/* upper Nav */}
19+
<div className=" bg-primary">
20+
<nav className="container flex h-[44px] items-center justify-between gap-10 text-white">
21+
<div className="fflex w-full items-center justify-between lg:w-auto lg:gap-[90px]">
22+
<a href="mailto:[email protected]">
23+
<IoMail className="inline-block align-middle" />{" "}
24+
25+
</a>
26+
<a href="mailto:[email protected]">
27+
<MdOutlinePhoneInTalk className="inline-block align-middle" />{" "}
28+
(12345)67890
29+
</a>
30+
</div>
31+
32+
<div className="flex gap-3 ">
33+
<span className="font-sans">
34+
English
35+
<FaAngleDown className="inline-block" />
36+
</span>
37+
<span className="font-sans">
38+
USD
39+
<FaAngleDown className="inline-block" />
40+
</span>
41+
<Link to="/login" className="font-sans">
42+
Login <IoLogIn className="inline-block" />
43+
</Link>
44+
<span className="font-sans">
45+
Wishlist <FaHeart className="inline-block" />
46+
</span>
47+
<span className="font-sans">
48+
<FaCartArrowDown className="inline-block" />
49+
</span>
50+
</div>
51+
</nav>
52+
</div>
53+
54+
{/* Button Home Nav */}
55+
<nav className=" container justify-between pb-[12px] pt-[18px] sm:flex ">
56+
<div className="flex w-full items-center md:gap-4 ">
57+
<a
58+
className="leading-auto font-Josefin text-[34px] text-primary-dark"
59+
href="/"
60+
>
61+
Hekto
62+
</a>
63+
64+
<div className="hidden md:flex md:gap-4">
65+
{/* flex grow property */}
66+
67+
<Link to="/" className="text-[#FB2E86]">
68+
Home
69+
<FaAngleDown className="inline-block" />{" "}
70+
</Link>
71+
72+
<Link to="/pages" className="hover:text-secondary">
73+
Pages{" "}
74+
</Link>
75+
76+
<Link to="/products" className="hover:text-secondary">
77+
Products{" "}
78+
</Link>
79+
80+
<Link to="/blogs" className="hover:text-secondary">
81+
Blogs{" "}
82+
</Link>
83+
84+
<Link to="/contact" className="hover:text-secondary">
85+
Contact{" "}
86+
</Link>
87+
</div>
88+
<IoMenu className="text-3xl md:hidden " />
89+
</div>
90+
91+
<form className="hidden lg:flex">
92+
<input
93+
className="border-primary-light border px-2 py-1 focus:border-secondary focus:outline-none focus:transition-all "
94+
type="text"
95+
placeholder="Search"
96+
/>
97+
<button className=" bg-secondary px-2">
98+
<IoSearch className="inline-block" />
99+
</button>
100+
</form>
101+
</nav>
102+
</header>
103+
104+
<Outlet />
105+
106+
<footer>
107+
{/* Buttom Navigation */}
108+
<div></div>
109+
110+
{/* Copyright Claim */}
111+
<div></div>
112+
</footer>
113+
</>
114+
);
115+
}

src/components/RootElement.jsx

-83
This file was deleted.

0 commit comments

Comments
 (0)