66 lines
3.2 KiB
TypeScript
66 lines
3.2 KiB
TypeScript
"use client";
|
||
|
||
import React from "react";
|
||
import { Input } from "./ui/input";
|
||
import Link from "next/link";
|
||
import Search from "./Search";
|
||
import { usePathname } from 'next/navigation'
|
||
|
||
export default function TopNav() {
|
||
const pathname = usePathname()
|
||
|
||
return (
|
||
<div className={`flex justify-between items-center w-full px-8 py-2 z-10 border-b-[#C9CFD7] border-b-[1px] border-solid
|
||
max-md:bg-gray max-md:bg-transparent max-md:px-0 max-md:justify-end max-md:border-b-0
|
||
${pathname === "/" ? "bg-transparent" : "bg-white"} `}>
|
||
|
||
<h1 className="bg-gradient-to-r from-gradient1 to-gradient2 inline-block text-transparent bg-clip-text
|
||
max-md:hidden">
|
||
سال 1402 | مهارم تورم، رشد تولید
|
||
</h1>
|
||
{/* <p>Current pathname: {pathname}</p> */}
|
||
<div className="flex items-center gap-10">
|
||
|
||
|
||
<div className=" flex items-center gap-3 md:ml-4">
|
||
|
||
<p className="bg-gradient-to-r from-gradient1 to-gradient2 inline-block text-transparent bg-clip-text text-sm max-md:text-xs">
|
||
امروز: چهارشنبه 24 آبان 1402
|
||
</p>
|
||
|
||
<svg
|
||
className="max-md:hidden"
|
||
xmlns="http://www.w3.org/2000/svg"
|
||
width="18"
|
||
height="19"
|
||
viewBox="0 0 18 19"
|
||
fill="none"
|
||
>
|
||
<g clip-path="url(#clip0_113_99)">
|
||
<path
|
||
d="M11.2875 4.25C12.02 4.39292 12.6932 4.75119 13.221 5.27895C13.7488 5.80671 14.107 6.47995 14.2499 7.2125L11.2875 4.25ZM11.2875 1.25C12.8094 1.41908 14.2286 2.10063 15.3121 3.18276C16.3956 4.26488 17.079 5.68326 17.2499 7.205L11.2875 1.25ZM16.4999 13.19V15.44C16.5008 15.6489 16.458 15.8556 16.3743 16.047C16.2907 16.2384 16.1679 16.4102 16.014 16.5514C15.8601 16.6926 15.6784 16.8001 15.4805 16.867C15.2826 16.9339 15.073 16.9588 14.8649 16.94C12.5571 16.6892 10.3402 15.9006 8.39245 14.6375C6.58032 13.486 5.04395 11.9496 3.89245 10.1375C2.62493 8.1809 1.83613 5.95325 1.58995 3.635C1.57121 3.4276 1.59586 3.21857 1.66233 3.02122C1.72879 2.82387 1.83563 2.64252 1.97602 2.48872C2.11642 2.33491 2.2873 2.21203 2.47779 2.12789C2.66828 2.04375 2.87421 2.0002 3.08245 2H5.33245C5.69643 1.99642 6.04929 2.12531 6.32527 2.36265C6.60125 2.59999 6.78151 2.92959 6.83245 3.29C6.92742 4.01005 7.10354 4.71705 7.35745 5.3975C7.45836 5.66594 7.4802 5.95769 7.42038 6.23816C7.36056 6.51863 7.2216 6.77608 7.01995 6.98L6.06745 7.9325C7.13512 9.81016 8.68979 11.3648 10.5675 12.4325L11.5199 11.48C11.7239 11.2784 11.9813 11.1394 12.2618 11.0796C12.5423 11.0198 12.834 11.0416 13.1024 11.1425C13.7829 11.3964 14.4899 11.5725 15.21 11.6675C15.5743 11.7189 15.907 11.9024 16.1448 12.1831C16.3827 12.4638 16.5091 12.8222 16.4999 13.19Z"
|
||
stroke="black"
|
||
stroke-linecap="round"
|
||
stroke-linejoin="round"
|
||
/>
|
||
</g>
|
||
<defs>
|
||
<clipPath id="clip0_113_99">
|
||
<rect
|
||
width="18"
|
||
height="18"
|
||
fill="white"
|
||
transform="translate(0 0.5)"
|
||
/>
|
||
</clipPath>
|
||
</defs>
|
||
</svg>
|
||
</div>
|
||
|
||
<Search/>
|
||
|
||
</div>
|
||
</div>
|
||
);
|
||
}
|