Skip to content

Commit

Permalink
login signin
Browse files Browse the repository at this point in the history
  • Loading branch information
adarshnjena committed Feb 24, 2023
1 parent 2332523 commit 77f22db
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 2 deletions.
43 changes: 43 additions & 0 deletions components/BodyConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/* eslint-disable react-hooks/rules-of-hooks */
/* eslint-disable @next/next/no-img-element */
/* eslint-disable jsx-a11y/alt-text */
export default function BodyConfig() {
return (
<div className="bg-zinc-900">
<div class="w-full h-[3vh] text-white pl-4 justify-self-center">
Skin Tone
</div>
<div class="w-full bg-zinc-900 text-black pl-4">
<div className="flex bg-zinc-900 m-5 mt-2 gap-x-12">
<button className="bg-zinc-700 text-white rounded-md p-2">
<div className="w-[40px] h-[40px] bg-[#E8BEAC]"></div>
</button>
<button className="bg-zinc-700 text-white rounded-md p-2">
<div className="w-[40px] h-[40px] bg-[#c58c85]"></div>
</button>
<button className="bg-zinc-700 text-white rounded-md p-2">
<div className="w-[40px] h-[40px] bg-[#ecbcb4]"></div>
</button>
<button className="bg-zinc-700 text-white rounded-md p-2">
<div className="w-[40px] h-[40px] bg-[#d1a3a4]"></div>
</button>
<button className="bg-zinc-700 text-white rounded-md p-2">
<div className="w-[40px] h-[40px] bg-[#a1665e]"></div>
</button>
<button className="bg-zinc-700 text-white rounded-md p-2">
<div className="w-[40px] h-[40px] bg-[#503335]"></div>
</button>
<button className="bg-zinc-700 text-white rounded-md p-2">
<div className="w-[40px] h-[40px] bg-[#592f2a]"></div>
</button>
<button className="bg-zinc-700 text-white rounded-md p-2">
<div className="w-[40px] h-[40px] bg-[#8D5524]"></div>
</button>
<button className="bg-zinc-700 text-white rounded-md p-2">
<div className="w-[40px] h-[40px] bg-[#C68642]"></div>
</button>
</div>
</div>
</div>
);
}
10 changes: 9 additions & 1 deletion components/auth.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
"use client"; // this is a client component 👈🏽
import { useRef } from "react";
import style from "../styles/auth.module.css";
import { useRouter } from "next/router";
import { Player } from "@lottiefiles/react-lottie-player";

export default function Auth() {
const ParentCrad = useRef();
const cards = useRef([]);
const pushRef = (el) => cards.current.push(el);
const playerRef = useRef();
const router = useRouter();
return (
<div className={style.auth}>
<div
Expand Down Expand Up @@ -41,7 +43,13 @@ export default function Auth() {
</p>
</div>
</div>
<div className={style.card} ref={pushRef}>
<div
className={style.card}
ref={pushRef}
onClick={() => {
router.push("/configChar", undefined, { shallow: true });
}}
>
<div className={style.cardBorder}></div>
<div className={style.cardContent}>
<div className={style.cardTitle}>Play as a Guest</div>
Expand Down
9 changes: 9 additions & 0 deletions components/genderSelect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default function GenderSelect() {
return (
<div className="bg-zinc-900">
<div class="w-full h-[3vh] text-white pl-4 justify-self-center">
Gender Select
</div>
</div>
);
}
51 changes: 51 additions & 0 deletions pages/configChar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* eslint-disable react-hooks/rules-of-hooks */
/* eslint-disable @next/next/no-img-element */
/* eslint-disable jsx-a11y/alt-text */
"use client"; // this is a client component 👈🏽
import { useRef } from "react";
import BodyConfig from "../components/BodyConfig";
import GenderSelect from "../components/genderSelect";
export default function configChar() {
const pointerRef = useRef();
return (
<body
onMouseMove={(e) => {
pointerRef.current.style.left = e.pageX + "px";
pointerRef.current.style.top = e.pageY + "px";
}}
className="bg-zinc-900"
>
<div class="w-full bg-gradient-to-r from-green-400 to-blue-500 h-[6vh] text-black pl-4 text-4xl font-black justify-self-center">
Avatar
</div>
<div class="w-full bg-zinc-900 h-[94vh] text-black pl-4">
<div className="flex bg-zinc-900 m-5 mt-8 gap-x-12">
<button className="bg-zinc-700 text-white rounded-md p-2">
<img src="./body.png" />
</button>
<button className="bg-zinc-700 text-white rounded-md p-2">
<img src="./hair.png" />
</button>
<button className="bg-zinc-700 text-white rounded-md p-2">
<img src="./pant.png" />
</button>
<button className="bg-zinc-700 text-white rounded-md p-2">
<img src="./tshirt.png" />
</button>
<button className="bg-zinc-700 text-white rounded-md p-2">
<img src="./shoe.png" />
</button>
</div>
<BodyConfig />
<GenderSelect />
</div>

<div className="pointer" ref={pointerRef}>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</body>
);
}
Binary file added public/body.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/hair.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/pant.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/shoe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/tshirt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ module.exports = {
"./src/**/*.{js,ts,jsx,tsx}",
],
theme: {
extend: {},
extend: {
colors: {
"regal-blue": "#243c5a",
},
},
},
plugins: [],
};

1 comment on commit 77f22db

@vercel
Copy link

@vercel vercel bot commented on 77f22db Feb 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

z-space – ./

z-space-git-main-adarshnjena.vercel.app
zspace.vercel.app
z-space-adarshnjena.vercel.app

Please sign in to comment.