From 9d3223090fb45d375e95c85e6a134efc0f312c5d Mon Sep 17 00:00:00 2001 From: RezaAshrafi77 Date: Mon, 20 Sep 2021 02:04:20 +0430 Subject: [PATCH] reza added Auth --- src/router.tsx | 10 ++++ src/views/Auth/Login/index.tsx | 9 ++++ src/views/Auth/Profile/index.tsx | 9 ++++ src/views/Auth/SignUp/index.scss | 89 ++++++++++++++++++++++++++++++++ src/views/Auth/SignUp/index.tsx | 70 +++++++++++++++++++++++++ src/views/Auth/index.tsx | 15 ++++++ 6 files changed, 202 insertions(+) create mode 100644 src/views/Auth/Login/index.tsx create mode 100644 src/views/Auth/Profile/index.tsx create mode 100644 src/views/Auth/SignUp/index.scss create mode 100644 src/views/Auth/SignUp/index.tsx create mode 100644 src/views/Auth/index.tsx diff --git a/src/router.tsx b/src/router.tsx index 3b36290..bd16c3c 100644 --- a/src/router.tsx +++ b/src/router.tsx @@ -6,6 +6,7 @@ import { Redirect, } from "react-router-dom"; +import Auth from './views/Auth/index'; import Home from "./views/Home/index"; @@ -16,6 +17,15 @@ function router(){ + + + + + + + + + ); diff --git a/src/views/Auth/Login/index.tsx b/src/views/Auth/Login/index.tsx new file mode 100644 index 0000000..60106d1 --- /dev/null +++ b/src/views/Auth/Login/index.tsx @@ -0,0 +1,9 @@ +import React from 'react' + +export default function Login() { + return ( +
+ +
+ ) +} diff --git a/src/views/Auth/Profile/index.tsx b/src/views/Auth/Profile/index.tsx new file mode 100644 index 0000000..01c14ff --- /dev/null +++ b/src/views/Auth/Profile/index.tsx @@ -0,0 +1,9 @@ +import React from 'react' + +export default function Profile() { + return ( +
+ +
+ ) +} diff --git a/src/views/Auth/SignUp/index.scss b/src/views/Auth/SignUp/index.scss new file mode 100644 index 0000000..decc584 --- /dev/null +++ b/src/views/Auth/SignUp/index.scss @@ -0,0 +1,89 @@ +.signup { + width: 100%; + height: 100vh; + position: relative; + font-family: numeralLight; + img { + transform: rotate(-90deg); + } + background: linear-gradient( + 135deg, + hsla(0, 0%, 31%, 1) 0%, + hsla(0, 0%, 0%, 1) 100% + ); + background: -moz-linear-gradient( + 135deg, + hsla(0, 0%, 31%, 1) 0%, + hsla(0, 0%, 0%, 1) 100% + ); + background: -webkit-linear-gradient( + 135deg, + hsla(0, 0%, 31%, 1) 0%, + hsla(0, 0%, 0%, 1) 100% + ); + .footer { + position: fixed; + bottom: 0px; + left: 0px; + } +} + +@media screen and (min-width: 1441px) { + .signup { + section { + width: 410px; + b { + color: white; + font-size: 20px; + margin-bottom: 30px; + font-weight: 500; + p{ + font-size: 16px; + } + } + input { + text-align: center; + background-color: #2a2a2a; + border: 1px solid #a2a2a2; + border-radius: 8px; + font-size: 23px; + padding: 8px 0px; + color: white; + direction: ltr; + &:focus { + border: 1px solid #84de56; + &::placeholder { + color: #84de56; + opacity: 0.3; + } + } + } + button { + margin-top: 25px; + background-color: #84de56; + color: white; + font-size: 20px; + padding: 10px 0px; + border: 0px; + border-radius: 10px; + } + } + &__info { + width: 350px; + margin: 20px auto 0px; + text-align: center; + color: white; + font-size: 13px; + a { + color: #84de56; + } + } + &__back { + margin-bottom: 60px; + a { + color: white; + font-size: 13px; + } + } + } +} diff --git a/src/views/Auth/SignUp/index.tsx b/src/views/Auth/SignUp/index.tsx new file mode 100644 index 0000000..967fbf3 --- /dev/null +++ b/src/views/Auth/SignUp/index.tsx @@ -0,0 +1,70 @@ +import React, { useState } from "react"; +import Navbar from "../../../components/Navbar/index"; +import Footer from "../../../views/Home/Footer/index"; +import { Link } from "react-router-dom"; +import arrow from "../../../assets/icons/dropdown.png"; + +import "./index.scss"; + +interface SignUpFields { + phonenumber?: String; + otp?: String; +} + +export default function SignUp() { + const [level, setLevel] = useState("otp"); + const [signUpFiels, setSignUpFiels] = useState( + undefined + ); + + return ( +
+ + {level === "phonenumber" && ( +
+
+ + بازگشت به صفحه قبل + + +
+ + ثبت نام +
+ لطفا شماره موبایل خود را وارد کنید. +
+ + +

+ با ثبت نام در سرویس ویدئویی دانوین قوانین + شرایط استفاده و حریم خصوصی + استفاده از سرویس های ما را می‌پذیرید +

+
+ )} + {level === "otp" && ( +
+
+ + بازگشت به صفحه قبل + + +
+ + تاییدیه شماره موبایل +
+

+ کد ارسال شده به شماره {signUpFiels?.phonenumber} را وارد کنید. +

+
+ + +

+ +

+
+ )} +
+
+ ); +} diff --git a/src/views/Auth/index.tsx b/src/views/Auth/index.tsx new file mode 100644 index 0000000..237363a --- /dev/null +++ b/src/views/Auth/index.tsx @@ -0,0 +1,15 @@ +import React from 'react'; +import SignUp from './SignUp/index'; +import Profile from './Profile/index'; +import Login from './Login/index'; + +export default function Auth(props : any) { + const {page} = props; + return ( + <> + { page === 'signup' && } + { page === 'login' && } + { page === 'profile' && } + + ) +}