From 13491c26878b9e050155ffa693aa1d68bf796224 Mon Sep 17 00:00:00 2001 From: sydneyzhang18 <114766656+sydneyzhang18@users.noreply.github.com> Date: Mon, 11 Mar 2024 17:23:55 -0700 Subject: [PATCH 1/8] major mobile/tablet progress --- frontend/src/app/login/login.css | 102 +++++++++++++++++- frontend/src/app/login/page.tsx | 8 +- .../shared/input/InputField/styles.module.css | 15 +++ 3 files changed, 120 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/login/login.css b/frontend/src/app/login/login.css index b085b59..168794f 100644 --- a/frontend/src/app/login/login.css +++ b/frontend/src/app/login/login.css @@ -44,6 +44,10 @@ html { width: 190px; height: 90px; } +.image { + width: 190px; + height: 90px; +} .welcome-text { color: #000; @@ -57,18 +61,19 @@ html { } .login-form { - width: 100%; + width: 80%; margin-top: 22px; /* Gap between Name and Password */ } .input-group { - margin-bottom: 22px; /* Gap between Password and Forgot Password */ + margin-bottom: 32px; /* Gap between Password and Forgot Password */ } label { display: block; margin-bottom: 5px; color: gray; + font-size: 16px; } input { @@ -79,7 +84,12 @@ input { } .forgot-password { - color: blue; + color: #4274f4; + + font-size: 16px; + font-style: normal; + font-weight: 400; + line-height: normal; text-align: center; margin-bottom: 48px; /* Gap between Forgot password and Log In */ } @@ -98,4 +108,90 @@ input { font-style: normal; font-weight: 700; line-height: normal; + margin-bottom: 49px; +} + +/* tablet version */ +@media screen and (max-width: 850px) { + .background-image { + object-fit: cover; + object-position: 35% 10%; + } + .login-box { + width: 90%; + max-width: 500px; + } + + .login-form { + width: 80%; + margin-top: 22px; /* Gap between Name and Password */ + } + + .input-group { + margin-bottom: 32px; /* Gap between Password and Forgot Password */ + } + + .forgot-password { + color: #4274f4; + font-size: 12px; + margin-bottom: 38px; /* Gap between Forgot password and Log In */ + } + + .login-button { + font-size: 18px; + font-weight: 600; + } +} + +/* mobile version */ +@media screen and (max-width: 550px) { + .background-image { + object-fit: cover; + object-position: 35% 10%; + } + .login-box { + width: 90%; + max-width: 500px; + } + + .logo-container { + top: -15%; + padding: 10px; + gap: 10px; + } + + .logo-image { + width: 130px; + height: 60px; + } + .image { + width: 130px; + height: 60px; + } + + .welcome-text { + font-size: 28px; + margin-top: 32px; /* Gap between Welcome and Name field */ + } + + .login-form { + width: 100%; + margin-top: 16px; /* Gap between Name and Password */ + } + + .input-group { + margin-bottom: 32px; /* Gap between Password and Forgot Password */ + } + + .forgot-password { + color: #4274f4; + font-size: 12px; + margin-bottom: 32px; /* Gap between Forgot password and Log In */ + } + + .login-button { + font-size: 18px; + font-weight: 600; + margin-bottom: 17px; + } } diff --git a/frontend/src/app/login/page.tsx b/frontend/src/app/login/page.tsx index 19f2fe3..abae197 100644 --- a/frontend/src/app/login/page.tsx +++ b/frontend/src/app/login/page.tsx @@ -8,6 +8,7 @@ import "@/app/login/login.css"; import { signInWithEmailAndPassword } from "firebase/auth"; import { initFirebase } from "@/firebase/firebase"; import { useRouter } from "next/navigation"; +import { max } from "moment"; const Login = () => { const [email, setEmail] = useState(""); @@ -65,15 +66,18 @@ const Login = () => { src="/Images/login_bg.png" alt="" layout="fill" + objectFit="cover" + // objectPosition="35% 10%" priority /* Inline styling due to using Image Component*/ style={{ position: "absolute", top: "0", left: "0", - right: "0", + right: "30", bottom: "0", }} + className="background-image" />