diff --git a/public/icons/LogoutIcon.tsx b/public/icons/LogoutIcon.tsx new file mode 100644 index 0000000..361a805 --- /dev/null +++ b/public/icons/LogoutIcon.tsx @@ -0,0 +1,29 @@ +import React from "react"; + +const LogoutIcon: React.FC<{ className?: string }> = ({ className }) => ( + + + + + + + + + + +); + +export default LogoutIcon; \ No newline at end of file diff --git a/src/app/components/ProfileCard.tsx b/src/app/components/ProfileCard.tsx index a82916c..18eb281 100644 --- a/src/app/components/ProfileCard.tsx +++ b/src/app/components/ProfileCard.tsx @@ -1,13 +1,26 @@ import React from "react"; +import LogoutIcon from "../../../public/icons/LogoutIcon"; interface ProfileCardProps { hasUiogMembership: boolean; hasDnsMembership: boolean; } -const membershipPerks = [ - { - title: "UIOG", +const membershipStatuses = { + Combined: { + title: "Combined", + description: "You have both memberships, and can enjoy all privileges.", + blurb: "Your added Combined perks:", + missingPerks: [ + "access to UiO Gaming Association Room", + "access to Gangfest Events (2x / year)", + ], + gradient: "bg-success-bg", + image: "/images/p_both.png", + tag: "Combined", + }, + UIOG: { + title: "UiO Gaming", description: "You are missing a DNS Standard membership. You can purchase one below.", blurb: "You will gain Combined perks:", @@ -15,130 +28,104 @@ const membershipPerks = [ "access to UiO Gaming Association Room", "access to Gangfest Events (2x / year)", ], + gradient: "bg-mixed", + image: "/images/uiog.png", + tag: "UiO Gaming", }, - { - title: "DNS", + DNS: { + title: "DNS Standard", description: "You are missing a UiO Gaming membership. You can purchase one below.", + blurb: "", missingPerks: [], + gradient: "bg-mixed", + image: "/images/neuf.png", + tag: "DNS Standard", }, - { - title: "Combined", - description: "You have both memberships, and can enjoy all privileges.", - blurb: "Your added Combined perks:", - missingPerks: [], - }, - { + None: { title: "None", description: "You are missing both memberships. You can purchase them below.", + blurb: "", missingPerks: [], + gradient: "bg-failure-bg", + image: "/images/p_none.png", + tag: "Free", }, -]; +}; const ProfileCard: React.FC = ({ hasUiogMembership, hasDnsMembership, }) => { - let membershipStatus; - if (hasUiogMembership && hasDnsMembership) { - membershipStatus = membershipPerks[2]; // Combined - } else if (hasUiogMembership) { - membershipStatus = membershipPerks[0]; // UIOG - } else if (hasDnsMembership) { - membershipStatus = membershipPerks[1]; // DNS - } else { - membershipStatus = membershipPerks[3]; // None - } + const statusKey = hasUiogMembership + ? hasDnsMembership + ? "Combined" + : "UIOG" + : hasDnsMembership + ? "DNS" + : "None"; - let gradientBottom; - let imagePath; - let tag; - - if (membershipStatus.title === "Combined") { - gradientBottom = "bg-success-bg"; - imagePath = "/images/p_both.png"; - tag = "Combined"; - } else if (membershipStatus.title === "None") { - gradientBottom = "bg-failure-bg"; - imagePath = "/images/p_none.png"; - tag = "Free"; - } else { - gradientBottom = "bg-mixed"; - - if (membershipStatus.title === "UIOG") { - imagePath = "/images/p_uiog.png"; - tag = "UiO Gaming"; - } - - if (membershipStatus.title === "DNS") { - imagePath = "/images/p_neuf.png"; - tag = "DNS Standard"; - } - } + const membershipStatus = membershipStatuses[statusKey]; return (
{/* Top Row */}
{/* User Icon and Name */}
-
+
User Icon
-
+

wailern

-

{tag}

+

{membershipStatus.tag}

{/* Log Out Button */} -
{/* Membership Status */} -
-
-

{hasUiogMembership ? "✅ UiO Gaming" : "❌ UiO Gaming"}

-
🎮
-
-
-

- {hasDnsMembership ? "✅ DNS Standard" : "❌ DNS Standard"} -

-
🐟
-
-
+ {["UIOG", "DNS"].map((key) => { + const isActive = key === "UIOG" ? hasUiogMembership : hasDnsMembership; + const displayName = key === "UIOG" ? "UiO Gaming" : "DNS Standard"; + return ( +
+

{isActive ? `✅ ${displayName}` : `❌ ${displayName}`}

+
{key === "UIOG" ? "🎮" : "🐟"}
+
+ ); + })} {/* Description */} -
-

{membershipStatus.description}

-
-

{membershipStatus.blurb}

- {membershipStatus.missingPerks.length > 0 && ( -
    - {membershipStatus.missingPerks.map((perk, index) => ( -

    + {perk}

    - ))} -
- )} -
+
+

{membershipStatus.description}

+ {membershipStatus.blurb && ( +
+

{membershipStatus.blurb}

+ {membershipStatus.missingPerks.map((perk, index) => ( +

+ + {perk} +

+ ))} +
+ )}
); diff --git a/src/app/globals.css b/src/app/globals.css index 51ab0bb..95f56f9 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -52,7 +52,7 @@ h2 { p { font-family: var(--font-nunito); font-weight: 400; - font-size: 1.25rem; + font-size: 1.45rem; color: white; } @@ -60,12 +60,17 @@ p { font-weight: 800; } +.ph { + font-weight: 600; + font-size: 1.25rem; +} + .po { color: var(--outline); } .pd { - font-size: 1.5rem; + font-size: 1.45rem; color: var(--foreground); } @@ -74,6 +79,15 @@ p { color: var(--foreground) } +.ps { + font-size: 1.25rem; +} + +.psh { + font-size: 1.25rem; + font-weight: 600; +} + .header { font-weight: 800; font-size: 2.5rem; diff --git a/tailwind.config.ts b/tailwind.config.ts index e917e98..c489b34 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -9,18 +9,18 @@ const config: Config = { theme: { extend: { colors: { - background: "var(--background)", - foreground: "var(--foreground)", - primary: "var(--primary)", - overlay: "var(--overlay)", + 'background': "var(--background)", + 'foreground': "var(--foreground)", + 'primary': "var(--primary)", + 'overlay': "var(--overlay)", 'overlay-bright': "var(--overlay-bright)", - outline: "var(--outline)", - outline2: "var(--outline2)", + 'outline': "var(--outline)", + 'outline2': "var(--outline2)", 'success-bg': "var(--success-bg)", - success: "var(--success)", + 'success': "var(--success)", 'failure-bg': "var(--failure-bg)", - failure: "var(--failure)", - mixed: "var(--mixed)", + 'failure': "var(--failure)", + 'mixed': "var(--mixed)", }, }, borderRadius: {