diff --git a/src/components/EditProfile/index.css b/src/components/EditProfile/index.css index 5c7d4db6e..40629f9b8 100644 --- a/src/components/EditProfile/index.css +++ b/src/components/EditProfile/index.css @@ -5,8 +5,9 @@ left: 50%; width: 50%; transform: translate(-50%, 0%); - padding: 60px; + padding: 30px; background: var(--btn-color); + border-radius: 22px; } .edit-profile-sub-container { @@ -15,6 +16,43 @@ justify-content: center; flex-direction: column; gap: 30px; + width: 98%; + margin: auto; +} + +.edit-profile-header { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + margin: auto; +} + +.edit-profile-image { + position: relative; + left: 50%; + transform: translateX(-50%); + height: 160px; + width: 160px; + display: flex; + cursor: pointer; +} + +.edit-profile-image img { + height: 100%; + width: 100%; + object-fit: cover; +} + +.edit-profile-image-icon { + position: absolute; + left: 98%; + transform: translate(-98%); + color: rgba(8, 17, 123, 0.69); + background-color: rgb(255, 255, 255, 0.7); + border-radius: 50%; + padding: 10px; + cursor: pointer; } .cancel-editing-icon { @@ -25,14 +63,39 @@ cursor: pointer; } +.edit-user-details { + display: flex; + justify-content: space-between; + flex-wrap: wrap; + flex-direction: row; +} + +.user-field { + width: 30%; +} + .edit-profile-label { font-weight: 600; font-size: 17px; + color: var(--text-light-black); + padding: 22px 0 8px; } .edit-profile-input { margin-top: 0; - width: 100% !important; + width: 95% !important; + background-color: transparent; + border: 0; + box-shadow: none; + border-bottom: 1px solid rgba(104, 85, 224, 0.5); + padding-bottom: 5px; + border-radius: 0; +} + +.name-input, +.username-input, +.country-input { + width: 85% !important; } .edit-profile-img { @@ -45,26 +108,22 @@ padding: 10px; font-size: 16px; height: 100px; - border: 1px solid rgba(104, 85, 224, 1); - border-radius: 4px; - box-shadow: 0 0 20px rgba(104, 85, 224, 0.2); + border-bottom: 1px solid rgba(104, 85, 224, 1); + border-top: 0; + /* border-radius: 4px; */ } .edit-profile-save-btn { width: 100%; - padding: 10px; - border-radius: 8px; - font-size: 18px; + color: rgba(8, 17, 123, 0.69); + font-size: 20px; font-weight: 600; - background-color: white; border: none; - color: white; - background: linear-gradient(rgb(102, 102, 250), rgb(81, 81, 245)); cursor: pointer; } .edit-profile-save-btn:hover { - background: linear-gradient(rgb(64, 64, 198), rgb(81, 81, 245)); + color: rgba(8, 17, 123, 0.9); } .edit-profile-save-btn:active { @@ -74,3 +133,45 @@ .error-border { border: 2px solid red; } + +@media only screen and (max-width: 900px) { + .edit-profile-sub-container { + gap: 20px; + } + .edit-profile-image { + height: 140px; + width: 140px; + } + .edit-user-details { + flex-direction: column; + } + .edit-profile-label { + padding: 0; + padding-top: 18px; + } + .name-input, + .username-input, + .country-input, + .user-field { + width: 98% !important; + } + + .edit-user-details label { + padding-bottom: 15px; + } + .edit-profile-container { + width: 60%; + left: 50%; + top: 120px; + } +} +@media only screen and (max-width: 600px) { + .edit-profile-container { + width: 75%; + left: 50%; + } + .edit-profile-image { + height: 120px; + width: 120px; + } +} diff --git a/src/components/EditProfile/index.jsx b/src/components/EditProfile/index.jsx index 775f278b1..1350abd36 100644 --- a/src/components/EditProfile/index.jsx +++ b/src/components/EditProfile/index.jsx @@ -3,8 +3,9 @@ import "./index.css"; import { auth, db, storage } from "../../lib/firebase"; import { useRef, useState } from "react"; -import CancelIcon from "@mui/icons-material/Cancel"; +import BackIcon from "@mui/icons-material/ArrowBackIosNew"; import { ClickAwayListener } from "@mui/material"; +import EditIcon from "@mui/icons-material/Edit"; import { useNavigate } from "react-router-dom"; import { useSnackbar } from "notistack"; @@ -19,6 +20,7 @@ const EditProfile = ({ userData, username, setIsEditing, setUserData }) => { }); const [image, setImage] = useState(null); const [usernameAvailable, setUsernameAvailable] = useState(true); + const { enqueueSnackbar } = useSnackbar(); const usernameRef = useRef(""); const { name, newUsername, bio, country, uid, avatar } = editedData; @@ -193,11 +195,19 @@ const EditProfile = ({ userData, username, setIsEditing, setUserData }) => { setIsEditing(false)}>
- setIsEditing(false)} - /> -
+
+ setIsEditing(false)} + style={{ display: "flex", marginTop: "6px", cursor: "pointer" }} + /> +

Edit Profile

+
+ + Save + +
+
+
{ onChange={handleImgChange} accept="image/*" /> +
- - {/* name */} - - {/* username */} - +
+ {/* name */} +
+ +
+ {/* username */} +
+ +
+ {/* country */} +
+ +
+
{/* bio */} - {/* country */} - -
- -
diff --git a/src/components/Navbar/index.css b/src/components/Navbar/index.css index 846957e10..9d75adac8 100644 --- a/src/components/Navbar/index.css +++ b/src/components/Navbar/index.css @@ -4,8 +4,9 @@ position: fixed; width: 100%; top: 0; - z-index: 999; - padding-block: 10px; + z-index: 9999; + padding-top: 10px; + padding-bottom: 10px; object-fit: contain; display: flex; align-items: center; diff --git a/src/index.css b/src/index.css index 833511ec2..aff9c9584 100644 --- a/src/index.css +++ b/src/index.css @@ -22,6 +22,7 @@ --label-color: rgb(200, 246, 248); --profile-color: #7d7575; --text-light: rgba(0, 0, 0, 0.6); + --text-light-black: rgba(0, 0, 0, 0.6); --text-dim: rgba(0, 0, 0, 0.8); --post-error-boundary: rgba(0, 0, 0, 0.54); --text-black-only: black; @@ -56,6 +57,7 @@ --profile-color: #c8c6c6; --text-black-only: black; --text-light: rgba(255, 255, 255, 0.6); + --text-light-black: rgba(0, 0, 0, 0.6); --text-dim: rgba(255, 255, 255, 0.8); --post-error-boundary: rgba(255, 255, 255, 0.54); --darkmode-white: white;