Skip to content

Commit

Permalink
add new landing
Browse files Browse the repository at this point in the history
  • Loading branch information
EhsanGheychisaz committed Apr 25, 2024
1 parent 05ef6dd commit 795e4d5
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 47 deletions.
12 changes: 4 additions & 8 deletions config/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
"url": "/"
},
{
"name": "قیمت",
"url": "/pricing"
},
{
"name": "تماس با ما",
"url": "/contact"
"name": "محصولات",
"url": "/products"
},
{
"name": "درباره ما",
"url": "/faq"
"url": "/aboutus"
}
],
"footer": [
Expand Down Expand Up @@ -53,7 +49,7 @@
"menu": [
{
"text": "تماس با ما",
"url": "/faq"
"url": "/aboutus"
},
{
"text": "Terms & Conditions",
Expand Down
69 changes: 30 additions & 39 deletions layouts/partials/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,41 +21,14 @@ const Header = () => {

return (
<header className="header">
<nav className="navbar container">
<nav style={{display:"flex" , flexDirection:"row" , justifyContent:"space-around", alignItems:"center"}}>

{/* logo */}
<div className="order-0 w-32">
<div className="order-0 w-64">
<Image src={logo} alt="" />
</div>

{/* navbar toggler */}
<button
id="show-button"
className="order-2 flex cursor-pointer items-center md:hidden md:order-1"
onClick={() => setNavOpen(!navOpen)}
>
{navOpen ? (
<svg className="h-6 fill-current" viewBox="0 0 20 20">
<title>Menu Open</title>
<polygon
points="11 9 22 9 22 11 11 11 11 22 9 22 9 11 -2 11 -2 9 9 9 9 -2 11 -2"
transform="rotate(45 10 10)"
/>
</svg>
) : (
<svg className="h-6 fill-current" viewBox="0 0 20 20">
<title>Menu Close</title>
<path d="M0 3h20v2H0V3z m0 6h20v2H0V9z m0 6h20v2H0V0z" />
</svg>
)}
</button>

{/* Menu */}
<div
id="nav-menu"
style={{width:"700px"}}
className={`order-3 md:order-1 ${
navOpen ? "max-h-[1000px]" : "max-h-0"
}`}
style={{width:"400px"}}
>
<ul className="navbar-nav block w-full items-center md:flex md:w-auto lg:space-x-2">
{main.map((menu, i) => (
Expand Down Expand Up @@ -111,15 +84,33 @@ const Header = () => {
</li>
)}
</ul>
</div>
{/* {enable && (
<div className="d-flex order-1 ml-auto hidden min-w-[200px] items-center justify-end md:ml-0 md:flex md:order-2">
<Link className="btn btn-primary z-0 py-[14px]" href={link} rel="">
{label}
</Link>
</div>
)} */}
</div>
<div>
<button style={{background:"blue" , color:"white", borderRadius:"15px" , paddingInline:"45px", paddingBlock:"20px"}}>
همکاری با ما </button>
</div>
<button
id="show-button"
className="order-2 flex cursor-pointer items-center md:hidden md:order-1"
onClick={() => setNavOpen(!navOpen)}
>
{navOpen ? (
<svg className="h-6 fill-current" viewBox="0 0 20 20">
<title>Menu Open</title>
<polygon
points="11 9 22 9 22 11 11 11 11 22 9 22 9 11 -2 11 -2 9 9 9 9 -2 11 -2"
transform="rotate(45 10 10)"
/>
</svg>
) : (
<svg className="h-6 fill-current" viewBox="0 0 20 20">
<title>Menu Close</title>
<path d="M0 3h20v2H0V3z m0 6h20v2H0V9z m0 6h20v2H0V0z" />
</svg>
)}
</button>
</nav>

</header>
);
};
Expand Down

0 comments on commit 795e4d5

Please sign in to comment.