From 97be0afd140c7c9e1fd03ba5ab4e486d90907129 Mon Sep 17 00:00:00 2001 From: Wolfboy248 Date: Tue, 19 Aug 2025 13:23:56 +0200 Subject: organised pages, started work on theme --- frontend/src/components/GameCategory.tsx | 6 ++--- frontend/src/components/GameEntry.tsx | 6 ++--- frontend/src/components/Sidebar.tsx | 43 ++++++++++++++++++-------------- 3 files changed, 30 insertions(+), 25 deletions(-) (limited to 'frontend/src/components') diff --git a/frontend/src/components/GameCategory.tsx b/frontend/src/components/GameCategory.tsx index b18c9d9..7ae3850 100644 --- a/frontend/src/components/GameCategory.tsx +++ b/frontend/src/components/GameCategory.tsx @@ -11,12 +11,12 @@ interface GameCategoryProps { const GameCategory: React.FC = ({ cat, game }) => { return ( {cat.category.name}

+ {cat.category.name}
-

{cat.portal_count}

+ {cat.portal_count} ); }; diff --git a/frontend/src/components/GameEntry.tsx b/frontend/src/components/GameEntry.tsx index f8fd179..6f2b194 100644 --- a/frontend/src/components/GameEntry.tsx +++ b/frontend/src/components/GameEntry.tsx @@ -18,18 +18,18 @@ const GameEntry: React.FC = ({ game }) => { return ( -
+
- {game.name} + {game.name}
-
+
{catInfo.map((cat, index) => { return ( diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx index 88a5297..0083a3e 100644 --- a/frontend/src/components/Sidebar.tsx +++ b/frontend/src/components/Sidebar.tsx @@ -23,15 +23,15 @@ interface SidebarProps { onUploadRun: () => void; } -function OpenSidebarIcon(){ +function OpenSidebarIcon() { return ( - + ) } -function ClosedSidebarIcon(){ +function ClosedSidebarIcon() { return ( - ) + ) } const Sidebar: React.FC = ({ @@ -43,7 +43,7 @@ const Sidebar: React.FC = ({ const [searchData, setSearchData] = React.useState( undefined ); - const [isSidebarLocked, setIsSidebarLocked] = React.useState(false); + // const [isSidebarLocked, setIsSidebarLocked] = React.useState(false); const [isSidebarOpen, setSidebarOpen] = React.useState(false); const [selectedButtonIndex, setSelectedButtonIndex] = React.useState(1); @@ -100,17 +100,16 @@ const Sidebar: React.FC = ({ const getButtonClasses = (buttonIndex: number) => { const baseClasses = "flex items-center gap-3 w-full text-left bg-inherit cursor-pointer border-none rounded-lg py-3 px-3 transition-all duration-300 hover:bg-surface1"; const selectedClasses = selectedButtonIndex === buttonIndex ? "bg-primary text-background" : "bg-transparent text-foreground"; - + return `${baseClasses} ${selectedClasses}`; }; const iconClasses = "w-6 h-6 flex-shrink-0"; return ( -
-
+
+
Logo {isSidebarOpen && ( @@ -124,7 +123,7 @@ const Sidebar: React.FC = ({
)} - +
{/* Sidebar Content */} -
{isSidebarOpen && (
@@ -145,7 +144,7 @@ const Sidebar: React.FC = ({ Search Search
- +
= ({ ].map(({ to, refIndex, icon, alt, label }) => (
-