Register Page Started

main
Pedram Keshavarzi 3 years ago
parent 9fc4c07336
commit b6f8d89567
  1. 4
      src/App.js
  2. 4
      src/assets/img/folder-cloud.svg
  3. 7
      src/components/nav/Nav.js
  4. 5
      src/view/LoginSignUp/index.js
  5. 161
      src/view/register/index.js

@ -19,6 +19,7 @@ import avatar5 from "./assets/img/avatar/julian-wan-WNoLnJo7tS8-unsplash.jpg";
import avatar6 from "./assets/img/avatar/nicolas-horn-MTZTGvDsHFY-unsplash.jpg";
import avatar7 from "./assets/img/avatar/pexels-yuri-manei-2690323.jpg";
import LoginSignUp from './view/LoginSignUp';
import Register from './view/register'
let data = [
@ -617,7 +618,7 @@ function App() {
}
}
}
const [LOGIN,setLOGIN]=useState(true);
const [LOGIN,setLOGIN]=useState(false);
const activeLogin=()=>{
setLOGIN(true);
}
@ -662,6 +663,7 @@ function App() {
/>
}
/>
<Route path="/register" element={<Register activeLogin={activeLogin}/>}/>
<Route path="/accounting" element={<Accounting />} />
<Route path="/messages" element={<Messages />} />
<Route path="/dashboard" element={ <Dashboard

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M9 22H7C3 22 2 21 2 17V7C2 3 3 2 7 2H8.5C10 2 10.33 2.44001 10.9 3.20001L12.4 5.20001C12.78 5.70001 13 6 14 6H17C21 6 22 7 22 11V13" stroke="#292D32" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M13.7601 18.32C11.4101 18.49 11.4101 21.89 13.7601 22.06H19.3201C19.9901 22.06 20.6501 21.81 21.1401 21.36C22.7901 19.92 21.91 17.04 19.74 16.77C18.96 12.08 12.1801 13.86 13.7801 18.33" stroke="#292D32" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
</svg>

After

Width:  |  Height:  |  Size: 656 B

@ -4,7 +4,7 @@ import { useState } from "react";
import { loadAnimation } from "lottie-web";
import { defineLordIconElement } from "lord-icon-element";
import logo from "../../assets/img/Mask Group 1.svg";
import logo from "../../assets/img/logo.png";
import img1 from "../../assets/img/Group 1440.svg";
import { Link } from "react-router-dom";
@ -29,7 +29,10 @@ const Nav = ({ logOut }) => {
};
return (
<div className="nav h-full w-[6.5%] absolute top-0 right-0 z-20 overflow-hidden bg-grayEC border-l border-l-color1">
<img src={logo} alt="logo" className="logo w-full h-1/6" />
<div className="h-1/6 flex items-center">
<img src={logo} alt="logo" className="logo w-full" />
</div>
<div
className="back-item-img w-full h-[12.5%] bg-red52 absolute right-0 z-20 transition-all duration-300"
style={

@ -212,11 +212,12 @@ const LoginSignUp = ({ activeLogin }) => {
<VerificationInput />
</div>
<Link
to={register == true ? '/dashboard/register' : `/dashboard`}
to={register == true ? '/register' : `/dashboard`}
className="Login-box-form-btn w-full h-12 rounded-lg bg-red52 text-white flex items-center justify-center mt-4"
onClick={() => {
if(register == false){
activeLogin()
}
}}

@ -0,0 +1,161 @@
import React, { useEffect, useState, useRef } from "react";
import { Link } from "react-router-dom";
import logo from "../../assets/img/logo.png";
import firstPic from '../../assets/img/undraw_professor_-8-lrt.svg';
import secondPic from '../../assets/img/undraw_quiz_nlyh.svg';
import thirdPic from '../../assets/img/undraw_certificate_re_yadi.svg';
import VerificationInput from "../../components/verificationInput";
import Input from "../../components/input";
import FileInput from "../../components/fileInput";
const Register = ({ activeLogin }) => {
const [steps, setSteps] = useState(0);
const [index, setIndex] = useState(1);
const [register, setRegister] = useState(false);
const timeoutRef = useRef(null);
const focusHandler = (id) => {
let inputs = document.querySelectorAll(".Login-box-form-item");
let label = document.querySelectorAll(".Login-box-form-item-label");
let line = document.querySelectorAll(".Login-box-form-item-line");
inputs[id].style.borderColor = "#df1452";
inputs[id].style.backgroundColor = "#fff";
label[id].style.transform = "translate(-10px,-27px)";
label[id].style.color = "#df1452";
line[id].style.backgroundColor = "#fff";
}
const blurHandler = (id) => {
let inputsBox = document.querySelectorAll(".Login-box-form-item");
let inputs = document.querySelectorAll(".Login-box-form-item-input");
let label = document.querySelectorAll(".Login-box-form-item-label");
let line = document.querySelectorAll(".Login-box-form-item-line");
if (inputs[id].value === "") {
inputsBox[id].style.borderColor = "#EBEBEB";
label[id].style.transform = "translate(0px,0px)";
label[id].style.color = "#959595";
line[id].style.backgroundColor = "#EBEBEB";
}
};
const stepCont = [
{
title: 'اطلاعات هویتی',
step: 0
},
{
title: 'مشخصات والدین',
step: 1
},
{
title: 'قوانین و مقررات',
step: 2
},
{
title: 'تایید اطلاعات',
step: 3
},
]
return (
<div className="w-full flex items-center justify-center" style={{ height: '100vh', direction: 'rtl' }}>
<div className="w-11/12 flex ">
{/* form */}
<div className="flex w-1/5 border-0 border-l border-solid border flex-col items-center p-6">
<img src={logo} className="w-1/2 m-4 mt-0" />
<div className="flex flex-col items-center justify-start leading-normal">
<p className="w-3/5 text-red26">
سامانه ثبت نام مدارس موسسه علمی اندیشمند
</p>
<div className="flex flex-col mt-6">
{
stepCont.map((item) => (
<div key={`step__${item.step}`} className="flex my-2 items-center ">
<div className="ml-2">
<div className={`w-6 h-6 rounded-full border border-solid border-gray-200 ${steps == item.step ? 'bg-red52' : ''}`}>
</div>
<span
className=" w-2 mt-2 border-r-4 border-solid border-red46OP"
style={{
// transform: "translateX(-1px)",
}}
></span>
</div>
<h1 className="text-gray-400 font-bold">{item.title}</h1>
</div>
)
)
}
</div>
</div>
</div>
{/* Content */}
<div className="w-4/5 mx-10 flex flex-col items-start text-right b">
{
steps == 0 &&
<>
<div className="w-full px-10 pb-6 border-b border-solid border-gray-200">
<div className="mb-4">
<h1 className="font-black">مشخصات هویتی دانش آموز</h1>
<p className="font-bold text-gray-300 text-sm">اطلاعات هویتی دانش آموز را با دقت تکمیل و عکس مدارک را بارگزاری نمایید</p>
</div>
<div className="flex">
<div className="flex w-2/5 ">
<div className="ml-2">
<Input title="نام" borderType="rounded" gapSize="8" direction='rtl'/>
<Input title="کدملی" borderType="rounded" gapSize="12" id={1} type='number'/>
</div>
<div className="mr-2">
<Input title="نام خانوادگی" borderType="rounded" id={2} direction='rtl'/>
<Input title="تاریخ تولد" borderType="rounded" gapSize="16" id={3} type='number'/>
</div>
</div>
<div className="w-3/5 flex justify-center">
<div className="w-2/5 mx-4">
<FileInput title="بارگزای صفحه اول شناسنامه" />
</div>
<div className="w-2/5 mx-4">
<FileInput title="بارگزای صفحه اول شناسنامه" />
</div>
</div>
<div>
</div>
</div>
</div>
<div className="w-full px-10 py-6 border-b flex items-center border-solid border-gray-200">
<div className="mb-4">
<h1 className="font-black">پایه تحصیلی</h1>
<p className="font-bold text-gray-300 text-sm">لطفا پایه تحصیلی دانش آموز را وارد کنید</p>
</div>
</div>
</>
}
</div>
</div>
</div>
);
};
export default Register;
Loading…
Cancel
Save