Responsived Login and Verify Page
parent
5c26efd928
commit
79ad4f8406
|
|
@ -11,7 +11,7 @@ export default function RequestLayout({
|
||||||
{/* Include shared UI here e.g. a header or sidebar */}
|
{/* Include shared UI here e.g. a header or sidebar */}
|
||||||
<SideMenu />
|
<SideMenu />
|
||||||
<UserHeader />
|
<UserHeader />
|
||||||
<div className=" w-[calc(100%-208px)] bg-rose-200 mt-8">{children}</div>
|
<div className=" w-[calc(100%-208px)] bg-rose-100 flex flex-1 p-10 flex-col overflow-hidden overflow-y-auto fixed top-[60px] left-0 transition-all ">{children}</div>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
106
app/globals.css
106
app/globals.css
|
|
@ -80,7 +80,7 @@
|
||||||
padding: 0;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
/* direction: rtl; */
|
/* direction: rtl; */
|
||||||
font-family: iranyekan;
|
font-family: "iranyekan";
|
||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
--d-header-height: 70px;
|
--d-header-height: 70px;
|
||||||
--d-sideMenu-width-open: 200px;
|
--d-sideMenu-width-open: 200px;
|
||||||
|
|
@ -103,7 +103,7 @@
|
||||||
|
|
||||||
button,
|
button,
|
||||||
input {
|
input {
|
||||||
font-family: iranyekan;
|
font-family: 'iranyekan';
|
||||||
}
|
}
|
||||||
|
|
||||||
@layer utilities {
|
@layer utilities {
|
||||||
|
|
@ -112,102 +112,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "iranyekan";
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: bold;
|
|
||||||
src: url(../assets/fonts/eot/iranyekanwebboldfanum.eot);
|
|
||||||
src: url(../assets/fonts/eot/iranyekanwebboldfanum.eot?#iefix)
|
|
||||||
format("embedded-opentype"),
|
|
||||||
/* IE6-8 */ url(../assets/fonts/woff/iranyekanwebboldfanum.woff) format("woff"),
|
|
||||||
/* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
|
||||||
url(../assets/fonts/ttf/iranyekanwebboldfanum.ttf) format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iranyekan";
|
font-family: "iranyekan";
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: 100;
|
src: url(../assets/fonts/ttf/iranyekanwebregularfanum.ttf);
|
||||||
src: url(../assets/fonts/eot/iranyekanwebthinfanum.eot);
|
}
|
||||||
src: url(../assets/fonts/eot/iranyekanwebthinfanum.eot?#iefix)
|
|
||||||
format("embedded-opentype"),
|
|
||||||
/* IE6-8 */ url(../assets/fonts/woff/iranyekanwebthinfanum.woff) format("woff"),
|
|
||||||
/* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
|
||||||
url(../assets/fonts/ttf/iranyekanwebthinfanum.ttf) format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "iranyekan";
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 300;
|
|
||||||
src: url(../assets/fonts/eot/iranyekanweblightfanum.eot);
|
|
||||||
src: url(../assets/fonts/eot/iranyekanweblightfanum.eot?#iefix)
|
|
||||||
format("embedded-opentype"),
|
|
||||||
/* IE6-8 */ url(../assets/fonts/woff/iranyekanweblightfanum.woff) format("woff"),
|
|
||||||
/* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
|
||||||
url(../assets/fonts/ttf/iranyekanweblightfanum.ttf) format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "iranyekan";
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: normal;
|
|
||||||
src: url(/fonts/eot/iranyekanwebregularfanum.eot);
|
|
||||||
src: url(/fonts/eot/iranyekanwebregularfanum.eot?#iefix)
|
|
||||||
format("embedded-opentype"),
|
|
||||||
/* IE6-8 */ url(/fonts/woff/iranyekanwebregularfanum.woff)
|
|
||||||
format("woff"),
|
|
||||||
/* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
|
||||||
url(/fonts/ttf/iranyekanwebregularfanum.ttf) format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "iranyekan";
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 500;
|
|
||||||
src: url(/fonts/eot/iranyekanwebmediumfanum.eot);
|
|
||||||
src: url(/fonts/eot/iranyekanwebmediumfanum.eot?#iefix)
|
|
||||||
format("embedded-opentype"),
|
|
||||||
/* IE6-8 */ url(/fonts/woff/iranyekanwebmediumfanum.woff) format("woff"),
|
|
||||||
/* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
|
||||||
url(/fonts/ttf/iranyekanwebmediumfanum.ttf) format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "iranyekan";
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 800;
|
|
||||||
src: url(../assets/fonts/eot/iranyekanwebextraboldfanum.eot);
|
|
||||||
src: url(../assets/fonts/eot/iranyekanwebextraboldfanum.eot?#iefix)
|
|
||||||
format("embedded-opentype"),
|
|
||||||
/* IE6-8 */ url(../assets/fonts/woff/iranyekanwebextraboldfanum.woff)
|
|
||||||
format("woff"),
|
|
||||||
/* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
|
||||||
url(../assets/fonts/ttf/iranyekanwebextraboldfanum.ttf) format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "iranyekan";
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 850;
|
|
||||||
src: url(../assets/fonts/eot/iranyekanwebblackfanum.eot);
|
|
||||||
src: url(../assets/fonts/eot/iranyekanwebblackfanum.eot?#iefix)
|
|
||||||
format("embedded-opentype"),
|
|
||||||
/* IE6-8 */ url(../assets/fonts/woff/iranyekanwebblackfanum.woff) format("woff"),
|
|
||||||
/* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
|
||||||
url(../assets/fonts/ttf/iranyekanwebblackfanum.ttf) format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
@font-face {
|
|
||||||
font-family: "iranyekan";
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 900;
|
|
||||||
src: url(../assets/fonts/eot/iranyekanwebextrablackfanum.eot);
|
|
||||||
src: url(../assets/fonts/eot/iranyekanwebextrablackfanum.eot?#iefix)
|
|
||||||
format("embedded-opentype"),
|
|
||||||
/* IE6-8 */ url(../assets/fonts/woff/iranyekanwebextrablackfanum.woff)
|
|
||||||
format("woff"),
|
|
||||||
/* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
|
||||||
url(../assets/fonts/ttf/iranyekanwebextrablackfanum.ttf) format("truetype");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,19 +4,21 @@ import { GoArrowLeft } from "react-icons/go";
|
||||||
import { menuItems } from "@/constants";
|
import { menuItems } from "@/constants";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
import { usePathname } from "next/navigation";
|
||||||
|
|
||||||
const SideMenu = () => {
|
const SideMenu = () => {
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
|
const pathname = usePathname();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`flex flex-col items-start justify-start bg-gradient-to-b from-yellow to-orange-400 h-screen rounded-l-[30px] fixed right-0 top-0 transition-all duration-700 ease-in-out
|
className={` flex flex-col items-start justify-start bg-gradient-to-b from-yellow to-orange-400 h-screen rounded-l-[30px] fixed right-0 top-0 transition-all duration-700 ease-in-out
|
||||||
${open === true ? "w-[200px]" : "w-[70px]"} `}
|
${open === true ? "w-[70px]" : "w-[200px]"} `}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
onClick={() => setOpen(!open)}
|
onClick={() => setOpen(!open)}
|
||||||
className={`flex items-center aspect-square bg-white rounded-full shadow-[0_0_4px_1px_rgba(0,0,0,0.1)] text-yellow cursor-pointer h-8 w-8 justify-center -left-3 absolute top-5 transition-all duration-700 ease-in-out z-[400]
|
className={`flex items-center aspect-square bg-white rounded-full shadow-[0_0_4px_1px_rgba(0,0,0,0.1)] text-yellow cursor-pointer h-8 w-8 justify-center -left-3 absolute top-5 transition-all duration-700 ease-in-out z-[400]
|
||||||
${open === true ? "rotate-180" : "rotate-0"} `}
|
${open === true ? "rotate-0" : "rotate-180"} `}
|
||||||
>
|
>
|
||||||
<GoArrowLeft className="text-yellow" />
|
<GoArrowLeft className="text-yellow" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -31,7 +33,7 @@ const SideMenu = () => {
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"w-10 h-10 aspect-square rounded-md flex items-center justify-center transition-all duration-[0.3s]",
|
"w-10 h-10 aspect-square rounded-md flex items-center justify-center transition-all duration-[0.3s]",
|
||||||
menuItem.id == 1 && "bg-black/30"
|
pathname == menuItem.href && "bg-black/30"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<span className="w-1/2 h-1/2 aspect-square flex items-center justify-center text-white transition-all duration-[0.3s] text-lg">
|
<span className="w-1/2 h-1/2 aspect-square flex items-center justify-center text-white transition-all duration-[0.3s] text-lg">
|
||||||
|
|
@ -40,10 +42,10 @@ const SideMenu = () => {
|
||||||
</div>
|
</div>
|
||||||
<span
|
<span
|
||||||
className={cn(
|
className={cn(
|
||||||
`text-xs text-white mr-1 transition-all overflow-hidden font-bold`,
|
`text-xs text-white mr-1 overflow-hidden font-bold transition-all duration-1000 ease-in-out`,
|
||||||
menuItem.id == 1 && "text-black/70 text-[13px]",
|
pathname == menuItem.href && "text-black/70 text-[13px]",
|
||||||
menuItem.id == 2 && "font-extrabold",
|
menuItem.id == 2 && "font-extrabold",
|
||||||
open === true ? "w-auto opacity-100 " : "w-0 opacity-0"
|
open === true ? "w-0 opacity-0" : "w-auto opacity-100 "
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{menuItem.title}
|
{menuItem.title}
|
||||||
|
|
|
||||||
|
|
@ -2,22 +2,31 @@ import React from "react";
|
||||||
import OnMapRequests from "./OnMapRequests";
|
import OnMapRequests from "./OnMapRequests";
|
||||||
import AllRequests from "./AllRequests";
|
import AllRequests from "./AllRequests";
|
||||||
import NearestRequests from "./NearestRequests";
|
import NearestRequests from "./NearestRequests";
|
||||||
import UserContainer from "../User/UserContainer";
|
// import UserContainer from "../User/UserContainer";
|
||||||
|
|
||||||
function RecentRequests() {
|
function RecentRequests() {
|
||||||
return (
|
return (
|
||||||
<>
|
<section className="w-full flex flex-1 flex-row overflow-hidden bg-white p-[10px]">
|
||||||
<UserContainer />
|
|
||||||
<div id="all" aria-label="همه">
|
|
||||||
<AllRequests />
|
{/* Left */}
|
||||||
|
<div className="">
|
||||||
|
<div id="map" aria-label="نقشه">
|
||||||
|
<OnMapRequests />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="nearest" aria-label="نزدیکترینها">
|
|
||||||
<NearestRequests />
|
{/* Right */}
|
||||||
|
<div className="">
|
||||||
|
<div id="all" aria-label="همه">
|
||||||
|
<AllRequests />
|
||||||
|
</div>
|
||||||
|
<div id="nearest" aria-label="نزدیکترینها">
|
||||||
|
<NearestRequests />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="map" aria-label="نقشه">
|
|
||||||
<OnMapRequests />
|
</section>
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ function LoginForm() {
|
||||||
} = useQuery({
|
} = useQuery({
|
||||||
queryKey: ["Captcha"],
|
queryKey: ["Captcha"],
|
||||||
queryFn: () => getCaptcha(),
|
queryFn: () => getCaptcha(),
|
||||||
refetchOnWindowFocus: false,
|
// refetchOnWindowFocus: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const loginMutation = useMutation({
|
const loginMutation = useMutation({
|
||||||
|
|
@ -112,7 +112,7 @@ function LoginForm() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Form {...form}>
|
<Form {...form}>
|
||||||
<form onSubmit={form.handleSubmit(onSubmit)} className="w-1/2">
|
<form onSubmit={form.handleSubmit(onSubmit)} className=" w-3/4 md:w-1/2">
|
||||||
{/* Phone Number */}
|
{/* Phone Number */}
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
|
|
@ -175,13 +175,13 @@ function LoginForm() {
|
||||||
height={20}
|
height={20}
|
||||||
quality={100}
|
quality={100}
|
||||||
/>
|
/>
|
||||||
<RefreshCcw
|
|
||||||
className="cursor-pointer "
|
|
||||||
onClick={() => refetch()}
|
|
||||||
color="#fcc52d"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
<RefreshCcw
|
||||||
|
className="cursor-pointer h-10 mr-2"
|
||||||
|
onClick={() => refetch()}
|
||||||
|
color="#fcc52d"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|
@ -207,7 +207,7 @@ function LoginForm() {
|
||||||
</form>
|
</form>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
<Link href={"#"} className="mt-6 underline text-[16px]">
|
<Link href={"#"} className="mt-6 underline text-xs md:text-[16px]">
|
||||||
ورود با یزد من{" "}
|
ورود با یزد من{" "}
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,40 @@
|
||||||
|
"use client";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import LoginForm from "./LoginForm";
|
import LoginForm from "./LoginForm";
|
||||||
import { YellowSection } from "./YellowSection";
|
import { YellowSection } from "./YellowSection";
|
||||||
|
import { FaChevronLeft } from "react-icons/fa";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
function SignIn() {
|
function SignIn() {
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="bg-yellow flex h-screen w-full items-stretch justify-center overflow-y-hidden">
|
<section className="bg-white md:bg-yellow flex flex-col-reverse md:flex-row h-screen w-full items-stretch justify-center overflow-y-hidden">
|
||||||
|
<FaChevronLeft
|
||||||
|
className="cursor-pointer z-10 flex md:hidden absolute top-2 left-2"
|
||||||
|
onClick={() => router.refresh()}
|
||||||
|
/>
|
||||||
|
|
||||||
{/* Right Section */}
|
{/* Right Section */}
|
||||||
<div className="flex flex-1 items-center justify-center flex-col bg-white rounded-tl-[50px]">
|
<div className="flex flex-1 items-center justify-center flex-col bg-white md:rounded-tl-[50px]">
|
||||||
<LoginForm />
|
<LoginForm />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Left Section */}
|
|
||||||
<YellowSection />
|
<div className="max-md:flex max-md:flex-col md:hidden">
|
||||||
|
<motion.div
|
||||||
|
initial={{ y: 100, visibility: "hidden", opacity: 0 }} // Initial position above the viewport
|
||||||
|
animate={{ y: 0, visibility: "visible", opacity: 1 }} // Animate to the default position
|
||||||
|
transition={{ type: "spring", damping: 10, stiffness: 100 }} // Define transition animation
|
||||||
|
>
|
||||||
|
<YellowSection />
|
||||||
|
</motion.div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="md:flex w-[30%] hidden">
|
||||||
|
<YellowSection />
|
||||||
|
</div>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import Image from 'next/image'
|
import Image from "next/image";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
import img1 from "@/assets/images/auth_image_1.png";
|
import img1 from "@/assets/images/auth_image_1.png";
|
||||||
import img2 from "@/assets/images/auth_image_6.png";
|
import img2 from "@/assets/images/auth_image_6.png";
|
||||||
import img3 from "@/assets/images/auth_image_4.png";
|
import img3 from "@/assets/images/auth_image_4.png";
|
||||||
|
|
@ -7,64 +7,62 @@ import pishgaman from "@/assets/images/goroh-pishgaman-logo.png";
|
||||||
import shetab from "@/assets/images/shetab-logo.png";
|
import shetab from "@/assets/images/shetab-logo.png";
|
||||||
import ostandari from "@/assets/images/ostandari2.png";
|
import ostandari from "@/assets/images/ostandari2.png";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export const YellowSection = () => {
|
export const YellowSection = () => {
|
||||||
return (
|
return (
|
||||||
<div className="w-[30%] flex flex-col relative pt-10 z-0 h-screen items-center">
|
<div className="w-full flex flex-col justify-end relative md:pt-10 z-0 h-52 md:h-screen items-center max-sm:[clip-path:ellipse(60%_80%_at_50%_7%)] max-md:[clip-path:ellipse(55%_80%_at_50%_10%)] max-md:bg-yellow ">
|
||||||
<div className="flex flex-1 flex-col items-center justify-start w-full">
|
<div className="hidden md:flex flex-1 flex-col items-center justify-start w-full">
|
||||||
<Image
|
|
||||||
src={img1}
|
|
||||||
width={500}
|
|
||||||
height={500}
|
|
||||||
quality={100}
|
|
||||||
alt="img1"
|
|
||||||
className="w-[90%] h-auto mb-5"
|
|
||||||
/>
|
|
||||||
<Image
|
|
||||||
src={img2}
|
|
||||||
width={500}
|
|
||||||
height={500}
|
|
||||||
quality={100}
|
|
||||||
alt="img2"
|
|
||||||
className="w-[90%] h-auto mb-5"
|
|
||||||
/>
|
|
||||||
<div className="flex flex-wrap flex-row w-full items-center justify-center">
|
|
||||||
<Image
|
<Image
|
||||||
src={ostandari}
|
src={img1}
|
||||||
width={500}
|
width={500}
|
||||||
height={500}
|
height={500}
|
||||||
quality={100}
|
quality={100}
|
||||||
alt="img3"
|
alt="img1"
|
||||||
className="w-full max-w-14 h-auto flex-1 my-0 mx-2"
|
className="w-[90%] h-auto mb-5"
|
||||||
/>
|
/>
|
||||||
<Image
|
<Image
|
||||||
src={shetab}
|
src={img2}
|
||||||
width={500}
|
width={500}
|
||||||
height={500}
|
height={500}
|
||||||
quality={100}
|
quality={100}
|
||||||
alt="img4"
|
alt="img2"
|
||||||
className="w-full max-w-14 h-auto flex-1 my-0 mx-2"
|
className="w-[90%] h-auto mb-5"
|
||||||
/>
|
|
||||||
<Image
|
|
||||||
src={pishgaman}
|
|
||||||
width={500}
|
|
||||||
height={500}
|
|
||||||
quality={100}
|
|
||||||
alt="img5"
|
|
||||||
className="w-full max-w-14 h-auto flex-1 my-0 mx-2"
|
|
||||||
/>
|
/>
|
||||||
|
<div className="flex flex-wrap flex-row w-full items-center justify-center">
|
||||||
|
<Image
|
||||||
|
src={ostandari}
|
||||||
|
width={500}
|
||||||
|
height={500}
|
||||||
|
quality={100}
|
||||||
|
alt="img3"
|
||||||
|
className="w-full max-w-14 h-auto flex-1 my-0 mx-2"
|
||||||
|
/>
|
||||||
|
<Image
|
||||||
|
src={shetab}
|
||||||
|
width={500}
|
||||||
|
height={500}
|
||||||
|
quality={100}
|
||||||
|
alt="img4"
|
||||||
|
className="w-full max-w-14 h-auto flex-1 my-0 mx-2"
|
||||||
|
/>
|
||||||
|
<Image
|
||||||
|
src={pishgaman}
|
||||||
|
width={500}
|
||||||
|
height={500}
|
||||||
|
quality={100}
|
||||||
|
alt="img5"
|
||||||
|
className="w-full max-w-14 h-auto flex-1 my-0 mx-2"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<Image
|
<Image
|
||||||
src={img3}
|
src={img3}
|
||||||
width={500}
|
width={500}
|
||||||
height={500}
|
height={500}
|
||||||
quality={100}
|
quality={100}
|
||||||
alt="img6"
|
alt="img6"
|
||||||
className="w-full m-0 max-h-[200px]"
|
className="w-full 2sm:w-5/6 sm:w-2/3 md:w-full m-0 max-h-[200px] max-md:h-fit max-sm:[clip-path:ellipse(60%_80%_at_50%_10%)] max-md:[clip-path:ellipse(70%_80%_at_50%_10%)] mb-4 2sm:-mb-0 md:mb-0"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
);
|
||||||
}
|
};
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@ import SideMenu from '../Menu/SideMenu'
|
||||||
const UserContainerDesktop = () => {
|
const UserContainerDesktop = () => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{/* <UserHeader /> */}
|
UseContainer
|
||||||
<SideMenu />
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,52 @@
|
||||||
import React from 'react'
|
"use client";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { usePathname } from "next/navigation";
|
||||||
|
import { menuItems } from "@/constants";
|
||||||
|
import { FaRegBell } from "react-icons/fa";
|
||||||
|
import { FaRegUser } from "react-icons/fa";
|
||||||
|
|
||||||
|
// w-[calc(100%-208px)]
|
||||||
|
|
||||||
const UserHeader = () => {
|
const UserHeader = () => {
|
||||||
return (
|
const pathname = usePathname();
|
||||||
<div className='bg-lime-400 flex flex-row justify-between items-center w-[calc(100%-208px)] fixed top-0 left-0'>
|
const [isMenupage, setIsMenuPage] = useState();
|
||||||
<div className=''>Section 1</div>
|
|
||||||
<div className=''>Section 2</div>
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
export default UserHeader
|
// {menuItems.map((menuItem) => (
|
||||||
|
// pathname === menuItem.href
|
||||||
|
|
||||||
|
// // setIsMenuPage(menuItem.title)
|
||||||
|
|
||||||
|
// ))}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="flex flex-row justify-between items-center fixed top-0 left-0 z-[200] transition-all p-[10px] w-[calc(100%-208px)]">
|
||||||
|
<div className="flex items-center">
|
||||||
|
<p className="cursor-pointer text-sm font-bold shadow-[0_0_3px_rgba(0,0,0,0.1)] m-0 flex items-center">
|
||||||
|
{pathname}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="flex items-center">
|
||||||
|
{/* Card 1 */}
|
||||||
|
<div className="h-10 mx-1 cursor-pointer bg-gray-200 rounded-3xl px-3 pt-0 flex items-center justify-center relative">
|
||||||
|
<FaRegBell className="text-lg" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Card 2 */}
|
||||||
|
<div className="h-10 mx-1 cursor-pointer bg-gray-200 rounded-3xl px-3 pt-0 flex items-center justify-center relative">
|
||||||
|
<span className="flex items-center justify-center">
|
||||||
|
|
||||||
|
<div className="flex items-center justify-center relative bg-gray-100 rounded-full w-6 h-6">
|
||||||
|
<FaRegUser className="text-gray-200 w-1/2 h-1/2 " />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span className="text-xs font-bold opacity-100 transition-all mr-[5px]">Yasaman</span>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default UserHeader;
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,47 @@
|
||||||
"use client"
|
"use client";
|
||||||
import React from 'react'
|
import React from "react";
|
||||||
import { YellowSection } from '../SignIn/YellowSection'
|
import { YellowSection } from "../SignIn/YellowSection";
|
||||||
import { VerifyInput } from './VerifyInput'
|
import { VerifyInput } from "./VerifyInput";
|
||||||
import { Phone } from 'lucide-react';
|
import { FaChevronLeft } from "react-icons/fa";
|
||||||
import useData from "@/store/useData";
|
import { useRouter } from "next/navigation";
|
||||||
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
|
// import { Phone } from 'lucide-react';
|
||||||
|
// import useData from "@/store/useData";
|
||||||
|
|
||||||
const Verify = () => {
|
const Verify = () => {
|
||||||
const data = useData((state) => state.data);
|
const router = useRouter();
|
||||||
console.log(data);
|
|
||||||
|
// const data = useData((state) => state.data);
|
||||||
|
// console.log(data);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="bg-yellow flex h-screen w-full items-stretch justify-center overflow-y-hidden">
|
<section className="bg-white md:bg-yellow flex flex-col-reverse md:flex-row h-screen w-full items-stretch justify-center overflow-y-hidden">
|
||||||
|
<FaChevronLeft
|
||||||
|
className="z-10 flex md:hidden absolute top-2 left-2 cursor-pointer"
|
||||||
|
onClick={() => router.back()}
|
||||||
|
/>
|
||||||
|
|
||||||
{/* Right Section */}
|
{/* Right Section */}
|
||||||
<div className="flex flex-1 items-center justify-center flex-col bg-white rounded-tl-[50px]">
|
<div className="flex flex-1 items-center justify-start md:justify-center flex-col bg-white rounded-tl-[50px]">
|
||||||
<VerifyInput />
|
<VerifyInput />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Left Section */}
|
<div className="max-md:flex max-md:flex-col md:hidden">
|
||||||
<YellowSection />
|
<motion.div
|
||||||
</section>
|
initial={{ y: 100, visibility: "hidden", opacity: 0 }} // Initial position above the viewport
|
||||||
)
|
animate={{ y: 0, visibility: "visible", opacity: 1 }} // Animate to the default position
|
||||||
}
|
transition={{ type: "spring", damping: 10, stiffness: 100 }} // Define transition animation
|
||||||
|
>
|
||||||
|
<YellowSection />
|
||||||
|
</motion.div>
|
||||||
|
</div>
|
||||||
|
|
||||||
export default Verify
|
<div className="md:flex w-[30%] hidden">
|
||||||
|
<YellowSection />
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Verify;
|
||||||
|
|
|
||||||
|
|
@ -196,7 +196,7 @@ export const VerifyInput = () => {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<p className="text-lg color-black text-center font-bold">
|
<p className="text-sm md:text-lg color-black text-center font-bold">
|
||||||
کد تایید ارسالی به تلفن خود را وارد نمایید.
|
کد تایید ارسالی به تلفن خود را وارد نمایید.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
@ -210,7 +210,7 @@ export const VerifyInput = () => {
|
||||||
<input autoFocus={idx == 0} pattern="[0-9]*" {...props} />
|
<input autoFocus={idx == 0} pattern="[0-9]*" {...props} />
|
||||||
)}
|
)}
|
||||||
containerStyle=" flex justify-center gap-1"
|
containerStyle=" flex justify-center gap-1"
|
||||||
inputStyle=" !w-12 rounded-full h-12 bg-[#F5F5F5] border border-blue/30 text-black"
|
inputStyle="!w-10 h-10 md:!w-12 md:h-12 rounded-full bg-[#F5F5F5] border border-blue/30 text-black"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -224,7 +224,7 @@ export const VerifyInput = () => {
|
||||||
{!isShow && (
|
{!isShow && (
|
||||||
<p
|
<p
|
||||||
onClick={handelResendOtp}
|
onClick={handelResendOtp}
|
||||||
className=" text-blue text-sm font-semibold cursor-pointer"
|
className=" text-blue text-xs md:text-sm font-semibold cursor-pointer"
|
||||||
>
|
>
|
||||||
ارسال مجدد کد تایید
|
ارسال مجدد کد تایید
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { TbWorld } from "react-icons/tb";
|
||||||
import { FaCogs } from "react-icons/fa";
|
import { FaCogs } from "react-icons/fa";
|
||||||
|
|
||||||
export const menuItems = [
|
export const menuItems = [
|
||||||
{ id: 1, title: "صفحه اصلی", href: "/", icon: <FaList/>},
|
{ id: 1, title: "صفحه اصلی", href: "/RecentRequest", icon: <FaList/>},
|
||||||
{ id: 2, title: "ثبت درخواست", href: "/", icon: <FaPlus /> },
|
{ id: 2, title: "ثبت درخواست", href: "/", icon: <FaPlus /> },
|
||||||
{ id: 3, title: "درخواست های من", href: "/", icon: <PiSquaresFourFill /> },
|
{ id: 3, title: "درخواست های من", href: "/", icon: <PiSquaresFourFill /> },
|
||||||
{ id: 4, title: "نظرسنجی ها ", href: "/", icon: <FaChartBar /> },
|
{ id: 4, title: "نظرسنجی ها ", href: "/", icon: <FaChartBar /> },
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
"class-variance-authority": "^0.7.0",
|
"class-variance-authority": "^0.7.0",
|
||||||
"clsx": "^2.1.0",
|
"clsx": "^2.1.0",
|
||||||
"cookies-next": "^4.1.1",
|
"cookies-next": "^4.1.1",
|
||||||
|
"framer-motion": "^11.1.7",
|
||||||
"jwt-decode": "^4.0.0",
|
"jwt-decode": "^4.0.0",
|
||||||
"lucide-react": "^0.365.0",
|
"lucide-react": "^0.365.0",
|
||||||
"next": "14.1.4",
|
"next": "14.1.4",
|
||||||
|
|
@ -2704,6 +2705,30 @@
|
||||||
"url": "https://github.com/sponsors/rawify"
|
"url": "https://github.com/sponsors/rawify"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/framer-motion": {
|
||||||
|
"version": "11.1.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.1.7.tgz",
|
||||||
|
"integrity": "sha512-cW11Pu53eDAXUEhv5hEiWuIXWhfkbV32PlgVISn7jRdcAiVrJ1S03YQQ0/DzoswGYYwKi4qYmHHjCzAH52eSdQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.4.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@emotion/is-prop-valid": "*",
|
||||||
|
"react": "^18.0.0",
|
||||||
|
"react-dom": "^18.0.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@emotion/is-prop-valid": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"react": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"react-dom": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/fs.realpath": {
|
"node_modules/fs.realpath": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
"class-variance-authority": "^0.7.0",
|
"class-variance-authority": "^0.7.0",
|
||||||
"clsx": "^2.1.0",
|
"clsx": "^2.1.0",
|
||||||
"cookies-next": "^4.1.1",
|
"cookies-next": "^4.1.1",
|
||||||
|
"framer-motion": "^11.1.7",
|
||||||
"jwt-decode": "^4.0.0",
|
"jwt-decode": "^4.0.0",
|
||||||
"lucide-react": "^0.365.0",
|
"lucide-react": "^0.365.0",
|
||||||
"next": "14.1.4",
|
"next": "14.1.4",
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,18 @@
|
||||||
import type { Config } from "tailwindcss"
|
import type { Config } from "tailwindcss";
|
||||||
|
|
||||||
const config = {
|
const config = {
|
||||||
darkMode: ["class"],
|
darkMode: ["class"],
|
||||||
content: [
|
content: [
|
||||||
'./pages/**/*.{ts,tsx}',
|
"./pages/**/*.{ts,tsx}",
|
||||||
'./components/**/*.{ts,tsx}',
|
"./components/**/*.{ts,tsx}",
|
||||||
'./app/**/*.{ts,tsx}',
|
"./app/**/*.{ts,tsx}",
|
||||||
'./src/**/*.{ts,tsx}',
|
"./src/**/*.{ts,tsx}",
|
||||||
|
|
||||||
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
"./components/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||||
"./src/**/*.{ts,tsx}",
|
"./src/**/*.{ts,tsx}",
|
||||||
],
|
],
|
||||||
prefix: "",
|
prefix: "",
|
||||||
theme: {
|
theme: {
|
||||||
// container: {
|
// container: {
|
||||||
|
|
@ -23,6 +23,9 @@ const config = {
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
extend: {
|
extend: {
|
||||||
|
screens: {
|
||||||
|
"2sm": "426px",
|
||||||
|
},
|
||||||
colors: {
|
colors: {
|
||||||
gradient1: "#E44D26",
|
gradient1: "#E44D26",
|
||||||
yellow: "#fcc52d",
|
yellow: "#fcc52d",
|
||||||
|
|
@ -86,6 +89,6 @@ const config = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [require("tailwindcss-animate")],
|
plugins: [require("tailwindcss-animate")],
|
||||||
} satisfies Config
|
} satisfies Config;
|
||||||
|
|
||||||
export default config
|
export default config;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue