Skip to content

Commit

Permalink
Merge branch 'main' of github.com:TMTuringMachine/DBinder
Browse files Browse the repository at this point in the history
  • Loading branch information
gokhalevedant06 committed Dec 3, 2022
2 parents 2a7c6d2 + 9f7ae16 commit 794b43c
Show file tree
Hide file tree
Showing 7 changed files with 238 additions and 27 deletions.
72 changes: 68 additions & 4 deletions client/src/components/Header/Header.component.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
import React from "react";
import { Icon } from "@iconify/react";
import { Typography, Popover, Box, Avatar } from "@mui/material";

const Header = () => {
const [anchorEl, setAnchorEl] = React.useState(null);

const handleClick = (event) => {
setAnchorEl(event.currentTarget);
};

const handleClose = () => {
setAnchorEl(null);
};

const open = Boolean(anchorEl);
const id = open ? "simple-popover" : undefined;

return (
<div className="w-full h-16 px-10 flex items-center justify-between">
<div className="flex items-center gap-24">
Expand All @@ -22,17 +36,67 @@ const Header = () => {
<Icon
icon="mdi:bell"
color="#fff"
// width="20px"
// height="20px"
// width="20px"
// height="20px"
className="w-6 h-6 cursor-pointer"
/>
<Icon
icon="gg:profile"
color="#fff"
// width="20px"
// height="20px"
// width="20px"
// height="20px"
className="w-6 h-6 cursor-pointer"
onClick={handleClick}
aria-describedby={id}
/>
<Popover
id={id}
open={open}
anchorEl={anchorEl}
onClose={handleClose}
anchorOrigin={{
vertical: "bottom",
horizontal: "left",
}}
transformOrigin={{
vertical: "top",
horizontal: "center",
}}
sx={{
marginTop: "20px",
marginRight: "50px",
"& .MuiPopover-paper": {
backgroundColor: "transparent",
},
}}
>
<div className="w-80 h-52 flex flex-col gap-2 bg-background rounded-xl shadow-md p-2">
<div className="flex gap-4 items-center bg-background3 p-2 rounded-lg">
<Avatar />
<h1 className="text-white font-medium">Shivam Gavandi</h1>
</div>
<div className="bg-background3 p-2 rounded-lg flex flex-col gap-2 items-center">
<div className="w-full flex items-center gap-3">
<Icon
icon="ri:copper-coin-fill"
className="w-8 h-8"
color="#00FFED"
/>{" "}
<h1 className="text-white font-semibold text-lg">
233 <span className="font-normal text-sm">debi tokens</span>
</h1>
</div>
<div className="border-t-2 border-text1 w-full flex gap-2 justify-around pt-3">
<div className="text-[#FFD700] text-sm cursor-pointer">
BUY TOKENS
</div>
<div className="text-text1 text-sm cursor-pointer">
VIEW BALANCE
</div>
</div>
</div>
</div>
</Popover>
</div>
</div>
);
Expand Down
Empty file.
4 changes: 4 additions & 0 deletions client/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ code {
html {
overflow-x: hidden;
overflow-y: hidden;
}

::-webkit-scrollbar{
display:'none'
}
23 changes: 1 addition & 22 deletions client/src/pages/landing/loginPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,7 @@ import React, { useState } from "react";
import StyledButton from "../../components/CustomButton/StyledButton";
import axios from "../../utils/axiosInstance";

const CustomTextField = styled(TextField)(() => ({
"& label.Mui-focused": {
color: "rgba(255, 255, 255, 0.685)",
},
"& .MuiInput-underline:after": {
borderBottomColor: "rgba(255, 255, 255, 0.685)",
},
"& .MuiInputLabel-root": {
color: "rgba(255, 255, 255, 0.685)",
},
"& .MuiOutlinedInput-root": {
"& fieldset": {
borderColor: "rgba(255, 255, 255, 0.685)",
},
"&:hover fieldset": {
borderColor: "rgba(255, 255, 255, 0.685)",
},
"&.Mui-focused fieldset": {
borderColor: "rgba(255, 255, 255, 0.685)",
},
},
}));
import { CustomTextField } from "../../globals/global.styles";

const LoginPage = ({ setMode }) => {
const [role, setRole] = useState("");
Expand Down
155 changes: 155 additions & 0 deletions client/src/pages/landing/verify.component.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
import React, { useState, useEffect } from "react";
import Lottie from "react-lottie";
import BubbleLottie from "../../assets/lotties/bubble.json";
import BubbleLottie1 from "../../assets/lotties/bubble1.json";
import BubbleLottie2 from "../../assets/lotties/bubble2.json";
import BubbleLottie3 from "../../assets/lotties/bubble3.json";

import { ReactComponent as LandingImage } from "../../assets/images/landing.svg";
import { CustomTextField } from "../../globals/global.styles";
import { Box, styled } from "@mui/material";
// import CustomButton from "../../components/CustomButton/CustomButton.component";
import StyledButton from "../../components/CustomButton/StyledButton";
// import LandingPage from "./landingPage";
// import SignupPage from "./signupPage";
// import LoginPage from "./loginPage";

const Glass = styled(Box)(() => ({
width: "100vw",
height: "100vh",
backgroundColor: "rgba(255, 255, 255, 0.04)",
backdropFilter: "blur(20px)",
position: "absolute",
top: "0px",
}));

const Landing = () => {
const [mode, setMode] = useState("landing");

// let content;

// if (mode == "landing") {
// content = <LandingPage setMode={setMode} />;
// } else if (mode == "signup") {
// content = <SignupPage setMode={setMode} />;
// } else if (mode == "login") {
// content = <LoginPage setMode={setMode} />;
// }

const defaultOptions1 = {
loop: true,
autoplay: true,
animationData: BubbleLottie1,

rendererSettings: {
preserveAspectRatio: "xMidYMid slice",
},
};
const defaultOptions2 = {
loop: true,
autoplay: true,
animationData: BubbleLottie2,

rendererSettings: {
preserveAspectRatio: "xMidYMid slice",
},
};
const defaultOptions3 = {
loop: true,
autoplay: true,
animationData: BubbleLottie3,

rendererSettings: {
preserveAspectRatio: "xMidYMid slice",
},
};
return (
<>
<div className="w-screen h-screen bg-background overflow-hidden">
<div className="absolute h-[600px] w-[600px]">
<Lottie
options={defaultOptions1}
width="100%"
height="100%"
speed={3}
/>
</div>
<div className="absolute h-[500px] w-[500px] -top-36 -right-36">
<Lottie
options={defaultOptions2}
width="100%"
height="100%"
speed={3}
/>
</div>
<div className="absolute h-[400px] w-[400px] -bottom-24 right-36">
<Lottie
options={defaultOptions3}
width="100%"
height="100%"
speed={3}
/>
</div>
</div>
<Glass>
<div className="w-full h-16 px-10 flex items-center justify-between">
<div className="flex items-center gap-24">
<button
className="text-xl font-bold text-white"
onClick={() => {
setMode("landing");
}}
>
dbinder
</button>
<div className="flex items-center gap-7">
<div className="text-text1 font-normal">List your book</div>
<div className="text-text1 font-normal">Bookstore</div>
</div>
</div>
<div className="flex items-center gap-7">
<button
className="text-text1 font-semibold"
onClick={() => {
setMode("login");
}}
>
Login
</button>
<button
className="text-text1 font-semibold"
onClick={() => {
setMode("signup");
}}
>
Signup
</button>
</div>
</div>
<div className="px-10 mt-8 flex flex-col items-center">
<div className="bg-backgroundT flex flex-col gap-5 items-center p-6 w-2/5 mt-6 h-fit rounded-lg">
<h1 className="font-semibold text-2xl text-text1">
Please enter the OTP sent to your email to verify yourself!
</h1>
<CustomTextField label="Enter OTP" fullWidth />

<StyledButton>VERIFY</StyledButton>
{/* <div className="text-text1">
New to debinder?{" "}
<button
className="text-secondary"
onClick={() => {
setMode("signup");
}}
>
Signup
</button>
</div> */}
</div>
</div>
</Glass>
</>
);
};

export default Landing;
8 changes: 8 additions & 0 deletions client/src/routes/routes.index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export default function Router() {
path: "/",
element: <Landing />,
},
{
path: "/verify/:id",
element: <VerifyOTP />,
},
{
path: "/reader",
element: <MainLayout />,
Expand Down Expand Up @@ -72,3 +76,7 @@ const Home = Loadable(lazy(() => import("../pages/home/home.component")));
const WriterHome = Loadable(
lazy(() => import("../pages/home/writerHome.component"))
);

const VerifyOTP = Loadable(
lazy(() => import("../pages/landing/verify.component"))
);
3 changes: 2 additions & 1 deletion client/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ module.exports = {
surface3: "rgba(255, 255, 255, 0.30)",
color3: "#2FB2E1",
color4: "#818181",
background2:"#2C325A"
background2: "#2C325A",
background3: "#0d131c",
},
boxShadow: {
shadow1: "0px 8px 20px rgba(35, 35, 35, 0.1)",
Expand Down

0 comments on commit 794b43c

Please sign in to comment.