From 60060617a5a29128b3102a4f1176f2a52d710a37 Mon Sep 17 00:00:00 2001 From: EvanLin3141 Date: Wed, 19 Feb 2025 19:18:51 +0000 Subject: [PATCH] Update: Green User Profile --- frontend/src/assets/styles/index.css | 10 ++- frontend/src/components/Input/Button.tsx | 18 ++++ frontend/src/pages/UserPage.tsx | 109 +++++++++++++++-------- 3 files changed, 96 insertions(+), 41 deletions(-) diff --git a/frontend/src/assets/styles/index.css b/frontend/src/assets/styles/index.css index 8853016..25f124a 100644 --- a/frontend/src/assets/styles/index.css +++ b/frontend/src/assets/styles/index.css @@ -112,6 +112,7 @@ body[data-theme="green"] { --profile-border: #ffffff; --follow-bg: #ffffff; + --follow-text: #2e7d32; --follow-shadow: 0px 0px 15px rgba(84, 255, 92, 0.754); --liveNow: rgba(69, 150, 74, 0.6); @@ -127,9 +128,14 @@ body[data-theme="green"] { /*User Page*/ --user-pfp-border: #ffffff; - --user-pfp-border-shadow: 0px 0px 15px rgba(0, 0, 0, 0.754); + --user-pfp-border-shadow: -10px 15px 25px rgba(0, 0, 0, 0.754); - --user-borderBg: rgb(217, 240, 133); + --user-borderBg: rgb(255, 237, 123); + --user-box: rgb(1, 136, 66); + --user-box-strip: rgb(217, 240, 133); + --user-box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.754); + --user-sideBox: rgb(1, 61, 30); + --user-contentBox: rgb(245, 228, 167); --user-bg: rgb(0, 78, 38); --user-live-bg: rgb(217, 240, 133); diff --git a/frontend/src/components/Input/Button.tsx b/frontend/src/components/Input/Button.tsx index 6c20fbb..83a319c 100644 --- a/frontend/src/components/Input/Button.tsx +++ b/frontend/src/components/Input/Button.tsx @@ -24,6 +24,24 @@ const Button: React.FC = ({ ); }; +interface EditButtonProps extends ButtonProps { +} + +export const EditButton: React.FC = ({ + children = "", + extraClasses = "", + onClick, +}) => { + return ( + + ); +}; + interface ToggleButtonProps extends ButtonProps { toggled?: boolean; } diff --git a/frontend/src/pages/UserPage.tsx b/frontend/src/pages/UserPage.tsx index 458bd0e..f9a6d77 100644 --- a/frontend/src/pages/UserPage.tsx +++ b/frontend/src/pages/UserPage.tsx @@ -7,9 +7,10 @@ import { useParams } from "react-router-dom"; import ListItem from "../components/Layout/ListItem"; import { useFollow } from "../hooks/useFollow"; import { useNavigate } from "react-router-dom"; -import Button from "../components/Input/Button"; +import Button, { EditButton } from "../components/Input/Button"; import DynamicPageContent from "../components/Layout/DynamicPageContent"; + interface UserProfileData { id: number; username: string; @@ -117,42 +118,50 @@ const UserPage: React.FC = () => { >
-
- {/* Profile Section - TOP */} -
-
- - {/* Profile Picture */} -
- {`${profileData.username}'s -
- - {/* Username - Now Directly Below PFP */} -

- Welcome {profileData.username} -

- - {/* User Type (e.g., "USER") - {userPageVariant.toUpperCase()} - - Bio Section -
-

About {profileData.username}

-

{profileData.bio}

-
- */} +
+ {/* Profile Section - TOP */} - {/* Follower Count */} +
+ + {/* Border Overlay (Always on Top) */} +
+ + + {/* Background Box */} +
+
+ +
+ {/* Profile Picture */} +
+ {`${profileData.username}'s +
+ + {/* Username - Now Directly Below PFP */} +

+ {profileData.username} +

+ + + + + + {/* Follower Count */} {userPageVariant === "streamer" && ( <>
@@ -166,7 +175,7 @@ const UserPage: React.FC = () => { )}
- {/* (Un)Follow Button */} + {/* (Un)Follow Button */} {!isFollowing ? ( )} + )}
+ {/* User Type (e.g., "USER") */} + {userPageVariant.toUpperCase()} + + Bio Section +
+

About {profileData.username}

+

{profileData.bio}

+
{/* Content Section */}
{userPageVariant === "streamer" && ( <> @@ -235,8 +253,21 @@ const UserPage: React.FC = () => {
+ className="bg-[var(--user-sideBox)] col-span-1 bg-gray-800 rounded-lg text-center items-center justify-center + flex flex-col flex-grow gap-4 p-[2rem]" + > +
e.currentTarget.style.boxShadow = "var(--follow-shadow)"} + onMouseLeave={(e) => e.currentTarget.style.boxShadow = "none"} + > +

Following www

+ +
+
+ +
{showAuthModal && setShowAuthModal(false)} />}