diff --git a/public/images/p_both.png b/public/images/p_both.png new file mode 100644 index 0000000..331b69e Binary files /dev/null and b/public/images/p_both.png differ diff --git a/public/images/p_neuf.png b/public/images/p_neuf.png new file mode 100644 index 0000000..c652266 Binary files /dev/null and b/public/images/p_neuf.png differ diff --git a/public/images/p_none.png b/public/images/p_none.png new file mode 100644 index 0000000..9e89b57 Binary files /dev/null and b/public/images/p_none.png differ diff --git a/public/images/p_uiog.png b/public/images/p_uiog.png new file mode 100644 index 0000000..0574635 Binary files /dev/null and b/public/images/p_uiog.png differ diff --git a/src/app/components/ProfileCard.tsx b/src/app/components/ProfileCard.tsx index 8d00255..a82916c 100644 --- a/src/app/components/ProfileCard.tsx +++ b/src/app/components/ProfileCard.tsx @@ -1,10 +1,147 @@ +import React from "react"; + interface ProfileCardProps { - hasUiogMembership: boolean; - hasDnsMembership: boolean; + hasUiogMembership: boolean; + hasDnsMembership: boolean; } -const ProfileCard: React.FC = ({hasUiogMembership, hasDnsMembership}) => { - +const membershipPerks = [ + { + title: "UIOG", + description: + "You are missing a DNS Standard membership. You can purchase one below.", + blurb: "You will gain Combined perks:", + missingPerks: [ + "access to UiO Gaming Association Room", + "access to Gangfest Events (2x / year)", + ], + }, + { + title: "DNS", + description: + "You are missing a UiO Gaming membership. You can purchase one below.", + missingPerks: [], + }, + { + title: "Combined", + description: "You have both memberships, and can enjoy all privileges.", + blurb: "Your added Combined perks:", + missingPerks: [], + }, + { + title: "None", + description: + "You are missing both memberships. You can purchase them below.", + missingPerks: [], + }, +]; + +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 + } + + 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"; + } + } + + return ( +
+ {/* Top Row */} +
+ {/* User Icon and Name */} +
+
+ User Icon +
+
+

wailern

+

{tag}

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

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

+
🎮
+
+
+

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

+
🐟
+
+
+ + {/* Description */} +
+

{membershipStatus.description}

+
+

{membershipStatus.blurb}

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

    + {perk}

    + ))} +
+ )} +
+
+
+ ); }; -export default ProfileCard; \ No newline at end of file +export default ProfileCard; diff --git a/src/app/globals.css b/src/app/globals.css index a0ee0f3..51ab0bb 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -7,7 +7,14 @@ --foreground: #261F31; --primary: #392e49; --overlay: #4c3e62; + --overlay-bright: #6d517b; --outline: #987cc4; + --outline2: #dba0f6; + --success-bg: #40684A; + --success: #336054; + --failure-bg: #6b3132; + --failure: #551725; + --mixed: #6B4E31; } @media (prefers-color-scheme: dark) { @@ -16,7 +23,14 @@ --foreground: #261F31; --primary: #392e49; --overlay: #4c3e62; + --overlay-bright: #6d517b; --outline: #987cc4; + --outline2: #dba0f6; + --success-bg: #40684A; + --success: #336054; + --failure-bg: #6b3132; + --failure: #551725; + --mixed: #6B4E31; } } @@ -30,6 +44,11 @@ h1 { font-family: var(--font-nunito); } +h2 { + font-family: var(--font-nunito); + font-weight: 800 !important; +} + p { font-family: var(--font-nunito); font-weight: 400; @@ -37,6 +56,10 @@ p { color: white; } +.pb { + font-weight: 800; +} + .po { color: var(--outline); } diff --git a/src/app/page.tsx b/src/app/page.tsx index 761224c..373bc4c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,6 +1,7 @@ import ButtonSpecial from "./components/ButtonSpecial"; import Button from "./components/Button"; import Image from "next/image"; +import ProfileCard from "./components/ProfileCard"; export default function Home() { return ( diff --git a/tailwind.config.ts b/tailwind.config.ts index 636bf3c..e917e98 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -13,11 +13,20 @@ const config: Config = { foreground: "var(--foreground)", primary: "var(--primary)", overlay: "var(--overlay)", - outline: "var(--outline)" + 'overlay-bright': "var(--overlay-bright)", + outline: "var(--outline)", + outline2: "var(--outline2)", + 'success-bg': "var(--success-bg)", + success: "var(--success)", + 'failure-bg': "var(--failure-bg)", + failure: "var(--failure)", + mixed: "var(--mixed)", }, }, borderRadius: { DEFAULT: "0.5rem", + sm: "0.125rem", + md: "0.375rem", lg: "1rem", xl: "2rem", full: "9999px",